Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Compiling MPAS-Atmosphere with Compass Conda Environment

anamitra

New member
I am attempting to compile MPAS-Atmosphere in a compass conda environment, which I have created with the following command:
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.
 

Attachments

  • stderr.txt
    331.6 KB · Views: 3
Could you direct both stdout and stderr to the same log file when trying the second command (mpif90 pio2.f90 ...)?

Also, what do you see when listing the contents of the '/net/flood/home/anamitra/.micromamba/envs/mpas' directory (which you've indicated with your PIO environment variable)?
 
Apologies for delayed response. I am attaching the log file with both stdout and stderr.

/net/flood/home/anamitra/.micromamba/envs/mpas directory is where the conda environment mpas is installed. (I mistakenly wrote the command for installation as 'conda create -n compass', but it should be 'conda create -n mpas'. The directory includes the directories bin, lib, include etc.
 

Attachments

  • log.txt
    454.4 KB · Views: 1
The previous log file is for the second command. I am attaching the log for the first command as well.
 

Attachments

  • log1.txt
    966 bytes · Views: 0
Top