compile error - problem with PIO

748 views
Skip to first unread message

moj...@gmail.com

unread,
Nov 13, 2015, 6:26:32 AM11/13/15
to MPAS-Atmosphere Help
Hi,
I am trying to compile MPAS v4.0 on a super computer and of course I don't have permissions as a superuser. Netcdf library which is installed by superuser is v4.3.2, and I've installed Parallel-NetCDF v1.6.0 and PIO v2.0.0 (I guess!) on my own local directory (/home1/amjadi/bin/netcdf-p and /home1/amjadi/bin/pio , respectively). After successful installation I exported the pathes on bashrc as follows:

export PATH=$PATH:/home1/amjadi/bin/netcdf-p/bin
export PATH=$PATH:/home1/amjadi/bin/netcdf-p/include
export PATH=$PATH:/home1/amjadi/bin/netcdf-p/lib

export PATH=$PATH:/home1/amjadi/bin/pio/usr/local/lib
export PATH=$PATH:/home1/amjadi/bin/pio/usr/local/include

I encountered this error during compilation of the MPAS:

mpas_derived_types.F:24.7:

use pio
1
Fatal Error: Can't open module file 'pio.mod' for reading at (1): No such file or directory

I checked over "pio.mod" and it exists on "/home1/amjadi/bin/pio/usr/local/include". What is wrong with pio?

I look forward to any advice.

Best regards,
Mojgan

Dominikus Heinzeller

unread,
Nov 13, 2015, 7:29:12 AM11/13/15
to moj...@gmail.com, MPAS-Atmosphere Help
Hi Moijgan,

As of now MPAS doesn’t work with PIO v2+. The API of PIO v2+ is very different from all the 1.x.z versions and require substantial modifications of the code (I did this for testing, but this code is not ready for release). I recommend to download pio-1.9.19, which works very well with MPAS v4.0. If you can’t find it online anymore, let me know and I can provide a download link.

Cheers

Dom
> --
> You received this message because you are subscribed to the Google Groups "MPAS-Atmosphere Help" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mpas-atmosphere-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

moj...@gmail.com

unread,
Nov 13, 2015, 10:37:06 AM11/13/15
to MPAS-Atmosphere Help, moj...@gmail.com
Dear Dominikus,

Thank you for your quick replying. The version you mentioned is available on https://github.com/NCAR/ParallelIO/releases/tag/pio1_9_19 . I will do it and report the results.

All the best

Mojgan

moj...@gmail.com

unread,
Nov 13, 2015, 3:08:49 PM11/13/15
to MPAS-Atmosphere Help, moj...@gmail.com
Dear Dominikus,
I tried to install pio-1.9.19 both on super computer and on my laptop. And the same error happened in either cases. I searched about it a lot and didn't find any clear resolve. The netcdf-cxx version is 4.4.2.1 and the netcdf-fortran is 4.4.2 . What does the error mean (It is as follows)?

[amjadi@localhost ParallelIO-pio1_9_19]$ CC=mpicc FC=mpif90 cmake -DNetCDF_Fortran_PATH=/home1/amjadi/bin/netcdf-f -DNetCDF_C_PATH=/home1/amjadi/bin/netcdf-c -DPnetCDF_PATH=/home1/amjadi/bin/netcdf-p /home1/amjadi/bin/ParallelIO-pio1_9_19

-- The C compiler identification is GNU 4.9.2
-- The Fortran compiler identification is GNU
-- Check for working C compiler: /usr/lib64/mpich/bin/mpicc
-- Check for working C compiler: /usr/lib64/mpich/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working Fortran compiler: /usr/lib64/mpich/bin/mpif90
-- Check for working Fortran compiler: /usr/lib64/mpich/bin/mpif90 -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/lib64/mpich/bin/mpif90 supports Fortran 90
-- Checking whether /usr/lib64/mpich/bin/mpif90 supports Fortran 90 -- yes
CMake Error at CMakeLists.txt:11 (add_executable):
Cannot find source file:

//TryCSizeOf.f90

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx


CMake Error: Internal CMake error, TryCompile generation of cmake failed
-- Fortran compiler does not support c_sizeof function
CMake Error at CMakeLists.txt:11 (add_executable):
Cannot find source file:

//TryMPISERIAL.f90

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx


CMake Error: Internal CMake error, TryCompile generation of cmake failed
Building PIO with mpi serial stubs library
CMake Error at pio/CMakeLists.txt:45 (FIND_PACKAGE):
By not providing "FindNETCDF_Fortran.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"NETCDF_Fortran", but CMake did not find one.

Could not find a package configuration file provided by "NETCDF_Fortran"
with any of the following names:

NETCDF_FortranConfig.cmake
netcdf_fortran-config.cmake

Add the installation prefix of "NETCDF_Fortran" to CMAKE_PREFIX_PATH or set
"NETCDF_Fortran_DIR" to a directory containing one of the above files. If
"NETCDF_Fortran" provides a separate development package or SDK, be sure it
has been installed.


-- Configuring incomplete, errors occurred!
See also "/home1/amjadi/bin/ParallelIO-pio1_9_19/CMakeFiles/CMakeOutput.log".

Dominikus Heinzeller

unread,
Nov 15, 2015, 4:35:24 AM11/15/15
to moj...@gmail.com, MPAS-Atmosphere Help
Hi there,

Apologies for the late reply. I found it quite tricky to get PIO compiled, and different tricks worked on different machines.

What looks a bit weird are the messages about “cannot find .. .f90” - check first if ./pio/cmake/TryCSizeOf.f90 and ./pio/cmake/TryMPISERIAL.f90 are there.

I used the following to compile PIO on a machine where like in your case the NetCDF-Fortran and NetCDF-C libraries are installed in different places (which is not a particularly good idea - MPAS and WRF expect them to be in the same place and you need to patch MPAS’ makefile to make it work). Some of the settings here might be redundant but as long as it works ...

tar -xvzf pio1_9_19.tar.gz
cd pio1_9_19
export MPI_INCLUDE_DIRS="-I$MPIROOT/include"
export NETCDF_INCLUDE_DIRS=`nf-config --fflags`
export NETCDF_LIBS=`nf-config --flibs`
export NETCDF_Fortran_INCLUDE_DIR=`nf-config --fflags`
CC=mpicc \
CFLAGS="$NETCDF_INCLUDE_DIRS $NETCDF_LIBS" \
CXX=mpicxx \
CXXFLAGS="$NETCDF_INCLUDE_DIRS $NETCDF_LIBS" \
F77=mpif77 \
FFLAGS="$NETCDF_INCLUDE_DIRS $NETCDF_LIBS" \
FC=mpif90 \
FCFLAGS="$NETCDF_INCLUDE_DIRS $NETCDF_LIBS" \
PNETCDF_PATH=$PNETCDF \
NETCDF_PATH=$NETCDF \
HDF5_DIR=$PHDF5 \
NETCDF_Fortran_INCLUDE_DIR=`nf-config --fflags` \
cmake -D CMAKE_INSTALL_PREFIX=$INSTALLDST -D HDF5_DIR=$PHDF5 -D PNETCDF_DIR=$PNETCDF -D NETCDF_DIR=$NETCDF -D NETCDF_Fortran_INCLUDE_DIR=`nf-config --fflags` -D CMAKE_VERBOSE_MAKEFILE=1 .
make 2>&1 | tee log.make

Of course you need to have set $NETCDF, $PNETCDF, $PHDF5 and $MPIROOT beforehand.

Cheers

Dom

Message has been deleted

moj...@gmail.com

unread,
Nov 16, 2015, 2:55:26 PM11/16/15
to MPAS-Atmosphere Help, moj...@gmail.com
Dear Dominikus,

Thanks for the tips you mentioned. About "TryCSizeOf.f90" and "TryMPISERIAL.f90", before successful installation there are no ./pio/cmake/TryCSizeOf.f90 and ./pio/cmake/TryMPISERIAL.f90 .

As you commented, installing NetCDF-Fortran and NetCDF-C libraries in different places is not recommended. Once I had installed them by linux package manager to compile WRF on my own PC and it works fine. But I installed them manually again, because I thought I have to insert their direct local installation path to install other MPAS requirements.

By the way I did the tips you mentioned, but the same error occured. I don't know why?!!! :-(

After this failure, I searched about PIO more and found a helpful website " the MPAS tutorial practice guide" (http://www2.mmm.ucar.edu/projects/mpas/tutorial/UK2015/). I found that there is another PIO (v-1.7.1 for ease of installation) which MPAS works with it, too. So I downloaded PIO v1.7.1 and installed the requirments step by step. At last, I compiled the MPAS init-Atmosphere and atmosphere cores and they run fine. :-)

Thank you for your helpful notes.
Mojgan

ted.m...@noaa.gov

unread,
Jan 8, 2016, 3:38:18 PM1/8/16
to MPAS-Atmosphere Help, moj...@gmail.com
Thank you for posting this tip! PIO v1.7.1 seems to work for me, too. It would be nice if this were added to the MPAS 4.0 User Guide, which doesn't say anything about the version of PIO.

- Ted

Reply all
Reply to author
Forward
0 new messages