I am attempting to compile MPAS-Atmosphere in a compass conda environment, which I have created with the following command:
The reason I would like to use the conda environment is not having to compile each dependency manually. However, I am not sure if it's feasible to compile MPAS-Atmosphere this way. The examples in Compass documentation are of MPAS-Ocean, and MPAS-Atmosphere is not mentioned.
Once the conda env is activated, I run the the following script to compile the model:
I am receiving the following error:
This is the same error found in this thread ERROR: Could not detect a working PIO library! However, I could not figure out a solution from the suggestions in that thread. I attempted to run the second command (mpif90 pio2.f90 -o pio2.x ...) which results into runtime error. I am attaching the full stderr output of that command, but I am not exactly sure how to make sense of it. Any suggestion on how to resolve this issue is appreciated.
conda create -n compass -c conda-forge -c e3sm/label/compass python=3.10 "compass=*=mpi_openmpi*"
The reason I would like to use the conda environment is not having to compile each dependency manually. However, I am not sure if it's feasible to compile MPAS-Atmosphere this way. The examples in Compass documentation are of MPAS-Ocean, and MPAS-Atmosphere is not mentioned.
Once the conda env is activated, I run the the following script to compile the model:
export NETCDF=$(dirname $(dirname $(which nc-config)))
export NETCDFF=$(dirname $(dirname $(which nf-config)))
export PNETCDF=$(dirname $(dirname $(which pnetcdf-config)))
export MPAS_EXTERNAL_LIBS="-lgomp"
export PIO=/net/flood/home/anamitra/.micromamba/envs/mpas
export USE_PIO2=true
export HDF5_USE_FILE_LOCKING=FALSE
git -C MPAS-Model pull || git clone https://github.com/MPAS-Dev/MPAS-Model.git MPAS-Model
cd MPAS-Model
make clean CORE=init_atmosphere_model
make -j8 gnu CORE=init_atmosphere PRECISION=single USE_PIO2=true
make clean CORE=atmosphere
make -j8 gnu CORE=atmosphere PRECISION=single USE_PIO2=true
I am receiving the following error:
ERROR: Could not detect a working PIO library!
Both of the following commands to compile a test program
failed with errors:
mpif90 pio1.f90 -o pio1.x -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -std=f2008 -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -O3 -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lpiof -lpioc -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lnetcdff -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lnetcdff -lnetcdf -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lpnetcdf -lgomp
mpif90 pio2.f90 -o pio2.x -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -I/net/flood/home/anamitra/.micromamba/envs/mpas/include -std=f2008 -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -O3 -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lpiof -lpioc -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lnetcdff -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lnetcdff -lnetcdf -L/net/flood/home/anamitra/.micromamba/envs/mpas/lib -lpnetcdf -lgomp
The pio1.f90 and pio2.f90 test programs have been left in
the top-level MPAS directory for further debugging.
This is the same error found in this thread ERROR: Could not detect a working PIO library! However, I could not figure out a solution from the suggestions in that thread. I attempted to run the second command (mpif90 pio2.f90 -o pio2.x ...) which results into runtime error. I am attaching the full stderr output of that command, but I am not exactly sure how to make sense of it. Any suggestion on how to resolve this issue is appreciated.