WRF icon indicating copy to clipboard operation
WRF copied to clipboard

WRFCHEM fails to build with compile_new, KPP Enabled or standalone

Open HathewayWill opened this issue 7 months ago • 5 comments

Describe the bug Using the configure_new and compile_new commands I attempted to install WRFCHEM with and without KPP.

Both attempts ended in the build failing.

Below are the attached log file for WRFCHEM installation and WRFCHEM w/KPP using the script command in the terminal.

wrfchem.log checkout_externals.log registry.log

it appears to build past kpp, if i read the log file write, i think it is something with the wrfchem physics?

To Reproduce

	./configure_new -x -p "oneAPI LLVM" -- -DCMAKE_Fortran_COMPILER=ifx -DMPI_Fortran_COMPILER=mpiifx -DMPI_C_COMPILER=mpiicx -DWRF_CORE=ARW -DWRF_NESTING=BASIC -DWRF_CASE=EM_REAL -DENABLE_CHEM=ON -DUSE_MPI=ON -DUSE_HDF5=${HDF5_ROOT} -DUSE_JASPER=${Jasper_ROOT} 2>&1 | tee wrf_configure_new.log

[wrfchem.log](https://github.com/user-attachments/files/19930378/wrfchem.log)

	./configure_new -x -p "oneAPI LLVM" -- -DCMAKE_Fortran_COMPILER=ifx -DMPI_Fortran_COMPILER=mpiifx -DMPI_C_COMPILER=mpiicx -DWRF_CORE=ARW -DWRF_NESTING=BASIC -DWRF_CASE=EM_REAL -DENABLE_CHEM=ON -DENABLE_KPP=ON -DUSE_MPI=ON -DUSE_HDF5=${HDF5_ROOT} -DUSE_JASPER=${Jasper_ROOT} 2>&1 | tee wrf_configure_new.log

[wrfchemkpp.log](https://github.com/user-attachments/files/19930442/wrfchemkpp.log)

	./compile_new -j $CPU_QUARTER_EVEN 2>&1 | tee wrf_compile_new.log

cpu_quarter_even = 8

Environment: Zlib_Version=1.3.1 Libpng_Version=1.6.39 Jasper_Version=1.900.1 HDF5_Version=1.14.6 Pnetcdf_Version=1.14.0 Netcdf_C_Version=4.9.3 Netcdf_Fortran_Version=4.6.2

Intel OneAPI LLVM version = 2025.1.0

Additional context One thing I noticed is that there is a massive memory spike located around here (see photo) It maxed out my 64GB RAM and most of my 32GB SWAP RAM

Image Image Image

I tried compiling with -j 2 and the results are the same

HathewayWill avatar Apr 27 '25 15:04 HathewayWill

installs with -j 16 without a problem with GNU

GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

HathewayWill avatar Apr 28 '25 04:04 HathewayWill

The fix in #2223 should resolve this particular issue.

Note that the heavy memory usage is probably still linked to the new Intel compilers taking tons of memory. Coupled with the fact that chem code adds even more to be compiled to the heavy memory use offending files I am not surprised that it is proving difficult to satisfy the insatiable RAM consumption.

I don't have a good fix for that right now especially if compiling with -j 1 is not proving sufficient.

islas avatar May 05 '25 21:05 islas

The fix in #2223 should resolve this particular issue.

Note that the heavy memory usage is probably still linked to the new Intel compilers taking tons of memory. Coupled with the fact that chem code adds even more to be compiled to the heavy memory use offending files I am not surprised that it is proving difficult to satisfy the insatiable RAM consumption.

I don't have a good fix for that right now especially if compiling with -j 1 is not proving sufficient.

@islas #2223 seems to have passed the tests

I used these commands

	cd "${WRF_FOLDER}"
	git clone https://github.com/wrf-model/WRF.git

	cd WRF
	git submodule update --init --recursive
	gh pr checkout 2223
	
./configure_new -x -p "oneAPI LLVM" -- -DCMAKE_Fortran_COMPILER=ifx -DMPI_Fortran_COMPILER=mpiifx -DMPI_C_COMPILER=mpiicx -DWRF_CORE=ARW -DWRF_NESTING=BASIC -DWRF_CASE=EM_REAL -DENABLE_CHEM=ON -DENABLE_KPP=ON -DUSE_MPI=ON -DUSE_HDF5=${HDF5_ROOT} -DUSE_JASPER=${Jasper_ROOT} 2>&1 | tee wrf_configure_new.log

./compile_new -j 4 2>&1 | tee compile_new.log

The largest memory spike at these lines maxed out a 64GB everything else stayed below 32GB


[ 96%] Building Fortran object CMakeFiles/WRF_Core.dir/external/RSL_LITE/feedback_domain_em_part1.F.o
[ 96%] Building Fortran object CMakeFiles/WRF_Core.dir/external/RSL_LITE/feedback_domain_em_part2.F.o
[ 96%] Building Fortran object CMakeFiles/WRF_Core.dir/external/RSL_LITE/force_domain_em_part2.F.o
[ 96%] Building Fortran object CMakeFiles/WRF_Core.dir/external/RSL_LITE/interp_domain_em_part1.F.o
[ 96%] Building Fortran object CMakeFiles/WRF_Core.dir/external/RSL_LITE/interp_domain_em_part2.F.o
[ 96%] Building Fortran object CMakeFiles/WRF_Core.dir/external/RSL_LITE/interp_domain_em_part3.F.o

compile_new.log wrf_configure_new.log

HathewayWill avatar May 06 '25 01:05 HathewayWill

I think this issue can be closed right @islas ?

HathewayWill avatar May 13 '25 15:05 HathewayWill