error when executing SHT_example.f

Issue #23 open
Jérémy Rekier created an issue

Segmentation error during call to "shtns_sh_to_spat_ml":

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x10211a1d2
#1  0x1021194f0
#2  0x7fff8519d529
Segmentation fault: 11

thanks for the great work

Comments (8)

  1. Nathanaël Schaeffer repo owner

    Hello,

    The Fortran example works well here. Did you change something in the code ? Can you reconfigure SHTns with the --disable-simd option ?

    ./configure --disable-simd
    make SHT_fort_ex
    ./SHT_fort_ex
    

    In any case, I will need some informations about your compiler (gcc ? clang ?), OS (linux ? 32 or 64 bit ?, etc...) and CPU.

  2. Jérémy Rekier reporter

    Hi,

    configuring with

    ./configure --disable-simd 
    

    seems to do the trick. I have just been testing again without this flag and got the same segmentation error. I haven't changed anything to the code.

    I am using gcc on MacOSX (64 bit). CPU is 2 GHz Intel Core i7.

    Cheers,

  3. Nathanaël Schaeffer repo owner

    Hi,

    As I don't own a Mac, if you want to help me fix this, you could compile after having added "-g -O0" to the CFLAGS line in the Makefile. then run the example with gdb:

    gdb ./SHT_fort_ex
    run
    

    and when you have a crash you should have some meaningful output, that you could paste here. Thanks !

  4. Jérémy Rekier reporter

    Hi Nathanael

    I am finally going back to that issue using a brand new OSX dist. after a few weeks using SHTns on a linux cluster without any problem.

    I can now run make SHT_fort_ex from root directory and the executable now builds without problem. I will try this later on OSX I used formerly just to be sure I did not miss any important flag when reporting the above issue.

    Thanks for your help. Cheers,

  5. Log in to comment