PeleLM
PeleLM copied to clipboard
PeleLM Executable not building on MacOS
the make -j4
did not work on MacOS because the c++ standard was not specified in the Makefile and an older standard was used by default
Adding CXXFLAG = -std=gnu++17
to the Makefile allowed the PeleLM Executable to be built
I do not know if the flag could be specified by default ?
I assume that you are using COMP=gcc in the GNUmakefile? Can you try again using COMP=llvm?
I just tried using COMP=llvm.
The PeleLM Executable built without error, but the inputs.2d-regt example problem failed from an "Erroneous arithmetic operation" :
I'm assuming you're following the GettingStarted section ? https://pelelm.readthedocs.io/en/latest/GettingStarted.html
Which of the two methods did you use to get the code and its dependencies ?
Okay, I think I get it. On Mac, the floating point error catching mechanism get false positive if activated while the code hasn't been compiled in Debug mode. Can you try commenting out or removing the following lines (last 3 ones) from the input file ?
amrex.fpe_trap_invalid = 1
amrex.fpe_trap_zero = 1
amrex.fpe_trap_overflow = 1
With these line commented out the example ran fine. Any idea why that wasn't a problem with the gcc compiler ? Anyway, maybe a note for MacOC users in the getting started guide could be helpful ?
I've updated the default input file to prevent FPE checks so the problem should no longer arise. We'll activate them manually when doing tests.