In the case where the tests target build configuration (e.g. COMP, USE_MPI, USE_OMP, etc.) is the same as the examples target build configuration (the default for the BinaryBH example is USE_MPI = TRUE but USE_MPI = FALSE for the tests), building the all target in the base directory in parallel i.e. doing
cd /path/to/GRTeclyn
make all -j 16 USE_MPI=TRUE
can lead to compilation errors. For example, I sometimes (but not always) get the following error:
In file included from /home/mr618/amrex/Src/Base/AMReX.H:4,
from /home/mr618/amrex/Src/Base/AMReX_error_fi.cpp:2:
/home/mr618/GRTeclyn/tmp_build_dir/s/3d.gnu.MPI.EXE/AMReX_Config.H:54:2: error: #endif without #if
54 | #endif
| ^~~~~
I think this is a race condition on both targets trying to build AMReX_Config.H and AMReX_Version.H for the same configuration at the same time.
In the case where the
tests
target build configuration (e.g.COMP
,USE_MPI
,USE_OMP
, etc.) is the same as theexamples
target build configuration (the default for the BinaryBH example isUSE_MPI = TRUE
butUSE_MPI = FALSE
for the tests), building theall
target in the base directory in parallel i.e. doingcan lead to compilation errors. For example, I sometimes (but not always) get the following error:
I think this is a race condition on both targets trying to build
AMReX_Config.H
andAMReX_Version.H
for the same configuration at the same time.