Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

PeleLM Executable not building on MacOS #233

Open
olivecha opened this issue May 20, 2022 · 6 comments
Open

PeleLM Executable not building on MacOS #233

olivecha opened this issue May 20, 2022 · 6 comments

Comments

@olivecha
Copy link
Contributor

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 ?

@drummerdoc
Copy link
Contributor

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

@olivecha
Copy link
Contributor Author

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

@esclapez
Copy link
Contributor

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
Copy link
Contributor

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

@olivecha
Copy link
Contributor Author

olivecha commented May 20, 2022

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 ?

@esclapez
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants