PeleLM icon indicating copy to clipboard operation
PeleLM copied to clipboard

PeleLM Executable not building on MacOS

Open olivecha opened this issue 2 years ago • 6 comments

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 ?

olivecha avatar May 20 '22 03:05 olivecha

I assume that you are using COMP=gcc in the GNUmakefile? Can you try again using COMP=llvm?

drummerdoc avatar May 20 '22 05:05 drummerdoc

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" :

Backtrace.txt

olivecha avatar May 20 '22 05:05 olivecha

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 ?

esclapez avatar May 20 '22 06:05 esclapez

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

esclapez avatar May 20 '22 06:05 esclapez

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 ?

olivecha avatar May 20 '22 12:05 olivecha

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.

esclapez avatar May 23 '22 18:05 esclapez