AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
292 stars 99 forks source link

amrex::Error::0::Error: initial data has rho <~ small_dens !!! #2855

Closed EiPha closed 1 month ago

EiPha commented 1 month ago

I encountered the following error while testing the standard Sedov problem: ./Castro2d.gnu.ex inputs.2d.cyl_in_cartcoords

Castro git describe: 24.05 AMReX git describe: 24.05 Microphysics git describe: 24.05

reading extern runtime parameters ... 1 Species: X
Successfully read inputs file ... Initializing the data at level 0 amrex::Error::0::Error: initial data has rho <~ small_dens !!! SIGABRT See Backtrace.0 file for details

./Castro2d.gnu.ex --describe

build date: 2024-05-27 13:13:30.491171 build machine: Linux user-Super-Server 5.15.0-105-generic #115~20.04.1-Ubuntu SMP Mon Apr 15 17:33:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux build dir: /home/eipha/.ccal/Castro/Exec/hydro_tests/Sedov AMReX dir: /home/eipha/.ccal/Castro//external/amrex

COMP: gnu COMP version: 9.4.0

C++ compiler: g++ C++ flags: -Werror=return-type -g -O3 -finline-limit=43210 -std=c++17 -pthread -DBL_NO_FORT -DAMREX_GPU_MAX_THREADS=0 -DBL_SPACEDIM=2 -DAMREX_SPACEDIM=2 -DBL_FORT_USE_UNDERSCORE -DAMREX_FORT_USE_UNDERSCORE -DBL_Linux -DAMREX_Linux -DAMREX_DIMENSION_AGNOSTIC -DNDEBUG -DAMREX_NO_PROBINIT -DSPONGE -DSTRANG -DSCREEN_METHOD=SCREEN_METHOD_screen5 -DNAUX_NET=0 -Itmp_build_dir/s/2d.gnu.EXE -I. -I/home/eipha/.ccal/Castro//external/amrex/Src/Base -I/home/eipha/.ccal/Castro//external/amrex/Src/Base/Parser -I/home/eipha/.ccal/Castro//external/amrex/Src/AmrCore -I/home/eipha/.ccal/Castro//external/amrex/Src/Amr -I/home/eipha/.ccal/Castro//external/amrex/Src/Boundary -I/home/eipha/.ccal/Castro//external/Microphysics/util -I/home/eipha/.ccal/Castro//external/Microphysics/util/gcem/include -I./ -I/home/eipha/.ccal/Castro//Source/driver -I/home/eipha/.ccal/Castro//Source/hydro -I/home/eipha/.ccal/Castro//Source/problems -I/home/eipha/.ccal/Castro//Source/sources -I/home/eipha/.ccal/Castro//external/Microphysics/EOS -I/home/eipha/.ccal/Castro//external/Microphysics/EOS/gamma_law -I/home/eipha/.ccal/Castro//external/Microphysics/networks/general_null -I/home/eipha/.ccal/Castro//external/Microphysics/EOS -I/home/eipha/.ccal/Castro//external/Microphysics/networks -I/home/eipha/.ccal/Castro//external/Microphysics/interfaces -I/home/eipha/.ccal/Castro//external/Microphysics/constants -Itmp_build_dir/castro_sources/2d.gnu.EXE -I/home/eipha/.ccal/Castro//external/amrex/Tools/C_scripts

Fortran comp: gfortran Fortran flags: -g -O3 -ffree-line-length-none -fno-range-check -fno-second-underscore -fimplicit-none

Link flags: -L. Libraries:

EOS: /home/eipha/.ccal/Castro//external/Microphysics/EOS/gamma_law NETWORK: /home/eipha/.ccal/Castro//external/Microphysics/networks/general_null

Castro git describe: 24.05 AMReX git describe: 24.05 Microphysics git describe: 24.05

Print more details about rho and small_dens:

Successfully read inputs file ... Initializing the data at level 0 Error: S_arr(0,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(1,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(2,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(3,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(4,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(5,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(6,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(7,0,0,URHO) = 0.000000 < 0.000000 Error: S_arr(8,0,0,URHO) = 0.000000 < 0.000000 .....

amrex::Error::0::Error: initial data has rho <~ small_dens!!! SIGABRT See Backtrace.0 file for details

In addition, Intel-classic complier works well but gcc complier show this 'amrex Error'

zingale commented 1 month ago

unfortunately, I can't reproduce this on my machine (using GCC 14.1). I've tried in debug mode and with valgrind too.

Can you try using a later version of GCC?

EiPha commented 1 month ago

I have try GCC 12/13.2, but it still doesn't work.

It seems to be caused by the version of operating system, according to the comments in #2762 and #1584.

So weird !

DETAILS: build dir: /home/eipha/.ccal/Castro24.05/Exec/hydro_tests/Sedov AMReX dir: /home/eipha/.ccal/Castro//external/amrex

COMP: gnu COMP version: 13.2.0

C++ compiler: g++ C++ flags: -Werror=return-type -gdwarf-4 -O3 -finline-limit=43210 -std=c++17 -pthread -DBL_NO_FORT -DAMREX_GPU_MAX_THREADS=0 -DBL_SPACEDIM=2 -DAMREX_SPACEDIM=2 -DBL_FORT_USE_UNDERSCORE -DAMREX_FORT_USE_UNDERSCORE -DBL_Linux -DAMREX_Linux -DAMREX_DIMENSION_AGNOSTIC -DNDEBUG -DAMREX_NO_PROBINIT -DSPONGE -DSTRANG -DSCREEN_METHOD=SCREEN_METHOD_screen5 -DNAUX_NET=0 -Itmp_build_dir/s/2d.gnu.EXE -I. -I/home/eipha/.ccal/Castro//external/amrex/Src/Base -I/home/eipha/.ccal/Castro//external/amrex/Src/Base/Parser -I/home/eipha/.ccal/Castro//external/amrex/Src/AmrCore -I/home/eipha/.ccal/Castro//external/amrex/Src/Amr -I/home/eipha/.ccal/Castro//external/amrex/Src/Boundary -I/home/eipha/.ccal/Castro//external/Microphysics/util -I/home/eipha/.ccal/Castro//external/Microphysics/util/gcem/include -I./ -I/home/eipha/.ccal/Castro//Source/driver -I/home/eipha/.ccal/Castro//Source/hydro -I/home/eipha/.ccal/Castro//Source/problems -I/home/eipha/.ccal/Castro//Source/sources -I/home/eipha/.ccal/Castro//external/Microphysics/EOS -I/home/eipha/.ccal/Castro//external/Microphysics/EOS/gamma_law -I/home/eipha/.ccal/Castro//external/Microphysics/networks/general_null -I/home/eipha/.ccal/Castro//external/Microphysics/EOS -I/home/eipha/.ccal/Castro//external/Microphysics/networks -I/home/eipha/.ccal/Castro//external/Microphysics/interfaces -I/home/eipha/.ccal/Castro//external/Microphysics/constants -Itmp_build_dir/castro_sources/2d.gnu.EXE -I/home/eipha/.ccal/Castro//external/amrex/Tools/C_scripts

Fortran comp: gfortran Fortran flags: -g -O3 -ffree-line-length-none -fno-range-check -fno-second-underscore -fimplicit-none

Link flags: -L. Libraries:

EOS: /home/eipha/.ccal/Castro//external/Microphysics/EOS/gamma_law NETWORK: /home/eipha/.ccal/Castro//external/Microphysics/networks/general_null

Castro git describe: 24.05 AMReX git describe: 24.05 Microphysics git describe: 24.05

zingale commented 1 month ago

maybe it is a ccache issue?

can you try:

ccache -c
zingale commented 1 month ago

sorry... it should be

ccache -C
WeiqunZhang commented 1 month ago

I cannot reproduce it on the same OS (Ubuntu 20.04) with the same compiler (GCC 9.4.0).

WeiqunZhang commented 1 month ago

Maybe you can try with a fresh clone.

EiPha commented 1 month ago

I found the error was due to my incorrect use of Hypre. The following PATH variables in '.bashrc' caused the error:

export LD_LIBRARY_PATH=~/.ccal/hypre-2.30.0/src/hypre/lib:$LD_LIBRARY_PATH export C_INCLUDE_PATH=~/.ccal/hypre-2.30.0/src/hypre/include:$C_INCLUDE_PATH export CPLUS_INCLUDE_PATH=~/.ccal/hypre-2.30.0/src/hypre/include:$CPLUS_INCLUDE_PATH

Now I know the correct way is to add HYPRE_DIR in Make.Castro.

Thanks for the replies.

zingale commented 1 month ago

great. Glad it is working.