Skip to content

FastVelocityWeakeningLaw has issues when using LIBXSMM as a code generator #1327

@vikaskurapati

Description

@vikaskurapati

Describe the bug

I was trying to run a test case with FastVelocityWeakeningLaw using TPV104 on my laptop with LIBXSMM for some quick testing, and it seems to run into a SEG FAULT in that configuration. It works with PspAMM as a code generator.

Expected behaviour

It should run without any issues as with PspAMM and give the correct output.t

To Reproduce

Steps to reproduce the behaviour:

  1. Branch: master, commit ID: 5e859d3

  2. build settings: CC=mpicc CXX=mpiCC FC=mpif90 cmake -DNUMA_AWARE_PINNING=ON -DASAGI=ON -DCMAKE_BUILD_TYPE=Debug -DEQUATIONS=elastic -DTESTING=OFF -DHOST_ARCH=hsw -DPRECISION=double -DORDER=3 -DGEMM_TOOLS_LIST=auto -DCMAKE_INSTALL_PREFIX=$HOME -DCMAKE_PREFIX_PATH=$HOME:$CMAKE_PREFIX_PATH -DNUMBER_OF_FUSED_SIMULATIONS=1 ..
    Compiler version: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

  3. It is a personal laptop
    Computer details:

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 12
On-line CPU(s) list: 0-11
Vendor ID: GenuineIntel
Model name: 13th Gen Intel(R) Core(TM) i5-1335U

  1. parameter files from here: https://github.com/SeisSol/Examples/tree/master/tpv104. I only scaled the mesh down by adding a -clscale 100` flag to the gmsh command for some quick testing.

Screenshots/Console output

The debug backtrace looks like this:

Thread 1 "SeisSol_Debug_d" received signal SIGSEGV, Segmentation fault.
0x0000555555b2c87b in libxsmm_dense_double_hsw_m16_n1_k16_ldA16_ldB16_ldC16_alpha1_beta0_alignedA1_alignedC1_transAFalse_transBFalse_nopf (
    A=0x5555563d1740 <seissol::init::resample::Values>, B=0x7fffffffa5b0, C=0x7fffffffa630) at /home/vikas-kurapati/WORK/SeisSol-master/build/src/generated_code/subroutine.cpp:2938
2938	  __asm__ __volatile__("movq %0, %%rdi\n\t"

The gdb backtrace is here:

 bt
#0  0x0000555555b2c87b in libxsmm_dense_double_hsw_m16_n1_k16_ldA16_ldB16_ldC16_alpha1_beta0_alignedA1_alignedC1_transAFalse_transBFalse_nopf (
    A=0x5555563d1740 <seissol::init::resample::Values>, B=0x7fffec9f40b0, C=0x7fffec9f4130) at /home/vikas-kurapati/WORK/SeisSol-master/build/src/generated_code/subroutine.cpp:2938
#1  0x0000555555b0be16 in seissol::dynamicRupture::kernel::resampleParameter::execute (this=0x7fffec9f4090)
    at /home/vikas-kurapati/WORK/SeisSol-master/build/src/generated_code/equation-elastic-3-double/kernel.cpp:665
#2  0x0000555555a8fa27 in seissol::dr::friction_law::cpu::FastVelocityWeakeningLaw<seissol::dr::friction_law::cpu::NoTP>::resampleStateVar (this=0x555556afbae0, 
    stateVariableBuffer=..., ltsFace=4) at /home/vikas-kurapati/WORK/SeisSol-master/src/DynamicRupture/FrictionLaws/CpuImpl/FastVelocityWeakeningLaw.h:144
#3  0x0000555555a88eb1 in seissol::dr::friction_law::cpu::RateAndStateBase<seissol::dr::friction_law::cpu::FastVelocityWeakeningLaw<seissol::dr::friction_law::cpu::NoTP>, seissol::dr::friction_law::cpu::NoTP>::postHook (this=0x555556afbae0, stateVariableBuffer=..., ltsFace=4)
    at /home/vikas-kurapati/WORK/SeisSol-master/src/DynamicRupture/FrictionLaws/CpuImpl/RateAndState.h:85
#4  0x0000555555aa4817 in _ZN7seissol2dr12friction_law3cpu15BaseFrictionLawINS2_16RateAndStateBaseINS2_24FastVelocityWeakeningLawINS2_4NoTPEEES6_EEE8evaluateERNS_11initializer5LayerEPKNSA_14DynamicRuptureEdPKdRNS_8parallel7runtime13StreamRuntimeE._omp_fn.0(void) ()
    at /home/vikas-kurapati/WORK/SeisSol-master/src/DynamicRupture/FrictionLaws/CpuImpl/BaseFrictionLaw.h:105
#5  0x00007ffff7f6579f in gomp_thread_start (xdata=<optimized out>) at ../../../src/libgomp/team.c:129
#6  0x00007ffff769caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
#7  0x00007ffff7729c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions