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

MPAS Make error

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

arun2019

New member
To compile MPAS-Atmosphere model, first I have installed following required libraries:
zlib-1.2.11
hdf-1.10.5
netcdf-c-4.6.2
netcdf-fortran-4.4.5
parallel-netcdf-1.10.0
ParallelIO-pio1_7_1

According to the section 1.2 of the tutorial provided in the link http://www2.mmm.ucar.edu/projects/mpas/tutorial/Boulder2019/index.html ,
I checked the shell environment which should be sufficient to allow the MPAS cores to be compiled.

But when I run the make command as follow:
make -j4 ifort CORE=init_atmosphere PRECISION=single

I got the error which I am not able to understand. I have attached the log of the Make command.

Please help me in this regard

Thanks & Regards
Arun
 

Attachments

  • make.log
    25.4 KB · Views: 104
I think this may be due to an issue with PIO 1.7.1 when compiled against newer versions of the parallel-netCDF library. In parallel-netCDF 1.10.0, there is a parameter (nf_max_var_dims) that is defined as 2147483647. PIO 1.7.1 defines PIO_MAX_VAR_DIMS as nf_max_var_dims and statically allocates several arrays with dimension PIO_MAX_VAR_DIMS, leading to the linking errors that you're seeing.

One easy workaround is to change the definition of PIO_MAX_VAR_DIMS in the PIO 1.7.1 source code before recompiling and reinstalling PIO. In the pio/poi_types.F90 file, you can change the definition of PIO_MAX_VAR_DIMS to something like 6 around lines 305 and 324.

Alternatively, you could use a newer version of PIO that contains workarounds for this issue. The PIO 2.4.4 library seems to work well with MPAS, but it requires CMake to install. If you have a relatively recent version of CMake, you can build and install PIO 2.4.4 with something like the following:
Code:
git clone https://github.com/NCAR/ParallelIO
cd ParallelIO
git checkout -b pio-2.4.4 pio2_4_4
export PIOSRC=`pwd`
cd ..
mkdir pio
cd pio
export CC=mpicc
export FC=mpifort
cmake -DNetCDF_C_PATH=$NETCDF -DNetCDF_Fortran_PATH=$NETCDF -DPnetCDF_PATH=$PNETCDF -DHDF5_PATH=$NETCDF -DCMAKE_INSTALL_PREFIX=$LIBBASE -DPIO_USE_MALLOC=ON -DCMAKE_VERBOSE_MAKEFILE=1 -DPIO_ENABLE_TIMING=OFF $PIOSRC
make
make install
You'll just need to ensure that the NETCDF and PNETCDF environment variables are set, and that the environment variable LIBBASE specifies the path where you'd like to install PIO.
 
Just to help others find this thread when searching for similar error messages, here are the relevant errors from the make.log file:
Code:
mpiifort -O3 -o init_atmosphere_model driver/*.o -L. -ldycore -lops -lframework -L/home/arund/amodel/amodel_libs/lib -lpio -L/home/arund/amodel/amodel_libs/lib -lnetcdff -lnetcdf -L/home/arund/amodel/amodel_libs/lib -lpnetcdf -I./external/esmf_time_f90 -L./external/esmf_time_f90 -lesmf_time
driver/mpas_subdriver.o: In function `mpas_subdriver_mp_mpas_run_':
mpas_subdriver.F:(.text+0x36): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x52): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
driver/mpas_subdriver.o: In function `mpas_subdriver_mp_mpas_finalize_':
mpas_subdriver.F:(.text+0x136): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x155): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x21a): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x226): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x247): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x24c): relocation truncated to fit: R_X86_64_32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x2a7): relocation truncated to fit: R_X86_64_PC32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
driver/mpas_subdriver.o: In function `mpas_subdriver_mp_mpas_init_':
mpas_subdriver.F:(.text+0x115d): relocation truncated to fit: R_X86_64_32 against symbol `mpas_subdriver_mp_domain_ptr_' defined in COMMON section in driver/mpas_subdriver.o
mpas_subdriver.F:(.text+0x1167): additional relocation overflows omitted from the output
 
Top