PIO check fail during compilation of MPAS 7.0

Discussions related to downloading and compiling MPAS-Atmosphere.
Post Reply
srafkin
Posts: 4
Joined: Thu Nov 07, 2019 6:02 pm

PIO check fail during compilation of MPAS 7.0

Post by srafkin » Thu Nov 07, 2019 6:05 pm

The MPAS 7.0 compilation fails during the pio check. I've edited the Makefile so the output is sent to standard output rather than /dev/null. Result is below along with additional info. Looks like a pathname problem related to a mystery MPAS include file (maybe?), but I've been unable to hunt it down. Thanks in advance for any help.

-bash-4.2$ make gfortran
( make all
"FC_PARALLEL = mpif90"
"CC_PARALLEL = mpicc"
"CXX_PARALLEL = mpicxx"
"FC_SERIAL = gfortran"
"CC_SERIAL = gcc"
"CXX_SERIAL = g++"
"FFLAGS_PROMOTION = -fdefault-real-8 -fdefault-double-8"
"FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fconvert=big-endian -ffree-form"
"CFLAGS_OPT = -O3 -m64"
"CXXFLAGS_OPT = -O3 -m64"
"LDFLAGS_OPT = -O3 -m64"
"FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow"
"CFLAGS_DEBUG = -g -m64"
"CXXFLAGS_DEBUG = -O3 -m64"
"LDFLAGS_DEBUG = -g -m64"
"FFLAGS_OMP = -fopenmp"
"CFLAGS_OMP = -fopenmp"
"CORE = atmosphere"
"DEBUG = "
"USE_PAPI = "
"OPENMP = "
"CPPFLAGS = -D_MPI" )
make[1]: Entering directory `/home/rafkin/MPAS-Model'
Checking for a usable PIO library...
pio1.f90:1:137:

program pio1; use pio; use pionfatt_mod; integer, parameter :: MPAS_IO_OFFSET_KIND = PIO_OFFSET; integer, parameter :: MPAS_INT_FILLVAL = NF_FILL_INT; end program
1
Error: Parameter 'nf_fill_int' at (1) has not been declared or is a variable, which does not reduce to a constant expression
pio2.f90:1:66:

program pio2; use pio; integer, parameter :: MPAS_IO_OFFSET_KIND = PIO_OFFSET_KIND; integer, parameter :: MPAS_INT_FILLVAL = PIO_FILL_INT; end program
1
Error: Parameter 'pio_offset_kind' at (1) has not been declared or is a variable, which does not reduce to a constant expression
pio2.f90:1:124:

program pio2; use pio; integer, parameter :: MPAS_IO_OFFSET_KIND = PIO_OFFSET_KIND; integer, parameter :: MPAS_INT_FILLVAL = PIO_FILL_INT; end program
1
Error: Parameter 'pio_fill_int' at (1) has not been declared or is a variable, which does not reduce to a constant expression
************ ERROR ************
Failed to compile a PIO test program
Please ensure the PIO environment variable is set to the PIO installation directory
************ ERROR ************
make[1]: *** [pio_test] Error 1
make[1]: Leaving directory `/home/rafkin/MPAS-Model'
make: *** [gfortran] Error 2

I'm on CentOS7 using gfortran 5.5.0_4 with mpich 3.3.1, NetCDF 4.6.3_1, PNetCDF 1.7.0_2, and pio 1.7.2.

-bash-4.2$ echo $CORE $NETCDF $PNETCDF $PIO
atmosphere /home/linuxbrew/.linuxbrew/Cellar/netcdf/4.6.3_1 /home/linuxbrew/.linuxbrew/Cellar/parallel-netcdf/1.7.0_2 /home/linuxbrew/.linuxbrew/Cellar/pio/1.7.2

bash-4.2$ uname -a
Linux mpas.boulder.swri.edu 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

srafkin
Posts: 4
Joined: Thu Nov 07, 2019 6:02 pm

Re: PIO check fail during compilation of MPAS 7.0

Post by srafkin » Fri Nov 08, 2019 4:04 pm

I've managed to pass the pio check by adding "use pnetcdf" to the pio code generation line:

@echo "program pio1; use pio; use pnetcdf; use pionfatt_mod; integer, parameter :: MPAS_IO_OFFSET_KIND = PIO_OFFSET; integer, parameter :: MPAS_INT_FILLVAL = NF_FILL_INT; end program" > pio1.f90

@echo "program pio2; use pio; use pnetcdf; integer, parameter :: MPAS_IO_OFFSET_KIND = PIO_OFFSET_KIND; integer, parameter :: MPAS_INT_FILLVAL = PIO_FILL_INT; end program" > pio2.f90

However, the compile for MPAS now fails in mpas_io.F, no doubt for the same reason. Does 'use pnetcdf' now need to be included in various source files and modules?

mpif90 -D_MPI -DCORE_ATMOSPHERE -DMPAS_NAMELIST_SUFFIX=atmosphere -DMPAS_EXE_NAME=atmosphere_model -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=v7.0-dirty -O3 -m64 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -c mpas_io.F -I/home/linuxbrew/.linuxbrew/include -I/home/linuxbrew/.linuxbrew/Cellar/netcdf/4.6.3_1/include -I/home/linuxbrew/.linuxbrew/Cellar/parallel-netcdf/1.7.0_2/include -I/home/linuxbrew/.linuxbrew/include -I/home/linuxbrew/.linuxbrew/Cellar/netcdf/4.6.3_1/include -I/home/linuxbrew/.linuxbrew/Cellar/parallel-netcdf/1.7.0_2/include -I../external/esmf_time_f90
mpas_io.F:30:43:

integer, parameter :: MPAS_INT_FILLVAL = NF_FILL_INT
1
Error: Parameter 'nf_fill_int' at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpas_io.F:31:53:

character, parameter :: MPAS_CHAR_FILLVAL = achar(NF_FILL_CHAR)
1
Error: Parameter 'nf_fill_char' at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpas_io.F:44:54:

real (kind=RKIND), parameter :: MPAS_REAL_FILLVAL = NF_FILL_DOUBLE
1
Error: Parameter 'nf_fill_double' at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpas_io.F:278:37:

pio_mode = PIO_64BIT_DATA
1
Error: Symbol 'pio_64bit_data' at (1) has no IMPLICIT type
make[3]: *** [mpas_io.o] Error 1
make[3]: Leaving directory `/home/rafkin/MPAS-Model/src/framework'
make[2]: *** [frame] Error 2
make[2]: Leaving directory `/home/rafkin/MPAS-Model/src'
make[1]: *** [mpas_main] Error 2
make[1]: Leaving directory `/home/rafkin/MPAS-Model'
make: *** [gfortran] Error 2

mgduda
Posts: 362
Joined: Mon Feb 26, 2018 7:35 pm

Re: PIO check fail during compilation of MPAS 7.0

Post by mgduda » Fri Nov 08, 2019 8:47 pm

After a bit of testing, I think the issue is that your PIO library was not compiled with support for the parallel-netCDF library. The simplest workaround may be to install the PIO 1.7.2 library from source rather than using Homebrew. You can do this by downloading the PIO 1.7.2 source code from here: https://github.com/NCAR/ParallelIO/rele ... g/pio1_7_2 . After unpacking the PIO 1.7.2 tar file, you'll need to clone the genf90 repository in the top-level directory with:

Code: Select all

git clone https://github.com/PARALLELIO/genf90.git bin
Then, after setting the FC, CC, NETCDF_PATH, and PNETCDF_PATH environment variables, you can run

Code: Select all

./configure --prefix=/where/to/install/pio
make
make install
from the pio/ subdirectory. Setting the PIO environment variable to the installation prefix specified in the configure command should be all that's needed before building MPAS.
NCAR/MMM

srafkin
Posts: 4
Joined: Thu Nov 07, 2019 6:02 pm

Re: PIO check fail during compilation of MPAS 7.0

Post by srafkin » Fri Nov 08, 2019 8:52 pm

Thanks. I think I've come to the same conclusion. I'm now downloading the latest PIO (v 2.x) as well as the latest pnetcdf. Then I'll have the most current everything, and I will try a clean install. I appreciate the compile tips. I'll keep hacking away and see if I can get some incarnation of some version to work.

mgduda
Posts: 362
Joined: Mon Feb 26, 2018 7:35 pm

Re: PIO check fail during compilation of MPAS 7.0

Post by mgduda » Fri Nov 08, 2019 9:06 pm

The "iolib_installation.sh" script at http://www2.mmm.ucar.edu/people/duda/fi ... s/sources/ may be helpful in installing the software stack needed by MPAS.
NCAR/MMM

srafkin
Posts: 4
Joined: Thu Nov 07, 2019 6:02 pm

Re: PIO check fail during compilation of MPAS 7.0

Post by srafkin » Sat Nov 09, 2019 1:09 am

mgduda wrote:
Fri Nov 08, 2019 9:06 pm
The "iolib_installation.sh" script at http://www2.mmm.ucar.edu/people/duda/fi ... s/sources/ may be helpful in installing the software stack needed by MPAS.
^THAT is a beautiful thing. It worked. Thanks a bunch for the help.

Post Reply

Return to “Compilation / installation”