How to successfully install PIO 1.9.23?

Discussions related to downloading and compiling MPAS-Atmosphere.
Post Reply
yanhongyi
Posts: 9
Joined: Fri Oct 25, 2019 9:06 am

How to successfully install PIO 1.9.23?

Post by yanhongyi » Wed Mar 31, 2021 8:44 am

I'm a new user who tries to start MPAS-A.
But I face some problems...
I have netcdf pnetcdf and so on OK, but I fail to install pio.
In the tutorial PIO 1.9.23 was suggeted, however, the tar.gz file in github doesn't inclue bin and cmake, which need to clone in another website. How ever, the files in those websites seem to be out-time...
PIO 2.xx version doesn't need to do this, which can directly use configure and make. But its code need to use "-std=c99", I announced this in CFLAGS in makefile, but it seems has no use...
so, how to install PIO....
Please help me...

mcurry
Posts: 85
Joined: Mon Oct 29, 2018 5:33 pm
Location: Boulder, Co

Re: How to successfully install PIO 1.9.23?

Post by mcurry » Thu Apr 08, 2021 9:41 pm

Hi sorry for the late reply on this.

Try Parallel IO 1.7.1, if you don't need NetCDF 4 I/O.

You can use the configure script (inside the PIO directory) to install and you can find the instructions for installing on this webpage (under the "Building PIO C and Fortran Libraries" header).

Hopefully that works for you.
NCAR|MMM

yanhongyi
Posts: 9
Joined: Fri Oct 25, 2019 9:06 am

Re: How to successfully install PIO 1.9.23?

Post by yanhongyi » Fri Apr 16, 2021 10:51 am

Thanks! now i can run the pio installation, but finally it still failed to install.

I installed WRF in the tutorial of installing WRF official website. I already have netcdf-c and netcdf-fortran (these two are both in netcdf).

Next, I installed hdf5 and pnetcdf on my own.

I use the following command to install pio:

export CPPFLAGS='-I$DIR/netcdf/include -I$DIR/mpich/include -I/ddn_lustre/hongyongyu/MPAS/LIBplus/pnetcdf/include -I/ddn_lustre/hongyongyu/MPAS/LIBplus/hdf5/include'
export LDFLAGS='-L$DIR/netcdf/lib -L$DIR/mpich/lib -L/ddn_lustre/hongyongyu/MPAS/LIBplus/pnetcdf/lib -L/ddn_lustre/hongyongyu/MPAS/LIBplus/hdf5/lib'
export CC=mpicc
export FC=mpif90
export CFLAGS='-g -Wall'

After "./configure --enable-fortran" and "make" I got this:

(base) [hongyongyu@login01 pio]$ make install
install -c -d -m 755 /usr/local/lib
install -c -d -m 755 /usr/local/include
install -c -m 644 libpio.a /usr/local/lib/libpio.a
install: cannot create regular file ‘/usr/local/lib/libpio.a’: Permission denied
make: *** [install] Error 1

how to solve this?

mcurry
Posts: 85
Joined: Mon Oct 29, 2018 5:33 pm
Location: Boulder, Co

Re: How to successfully install PIO 1.9.23?

Post by mcurry » Mon Apr 19, 2021 5:24 pm

You need to use the --prefix argument in your ./configure command. Please see this Stack Exchange answer on the --prefix argument: https://askubuntu.com/a/960975 for more information.
NCAR|MMM

yanhongyi
Posts: 9
Joined: Fri Oct 25, 2019 9:06 am

Re: How to successfully install PIO 1.9.23?

Post by yanhongyi » Sun Apr 25, 2021 8:24 am

Thanks!
I use "./configure --prefix=/ddn_lustre/hongyongyu/MPAS/LIBplus/pio --enable-fortran" to configure.
Firstly, it said that it can't find NETCDF_PATH, so I set that as same as NETCDF. After that, I also set PNETCDF_PATH.
Finally I still have this problem:
=======================================================
checking for nf90_inq_grps... yes
using PNETCDF_PATH from environment
checking for pnetcdf.inc in /ddn_lustre/hongyongyu/MPAS/LIBplus/pnetcdf/include... configure: WARNING: pnetcdf.inc not found in /ddn_lustre/hongyongyu/MPAS/LIBplus/pnetcdf/include disabling pnetcdf support
checking for libpnetcdf.a in /ddn_lustre/hongyongyu/MPAS/LIBplus/pnetcdf/lib... yes

Output Variables: {CC=mpicc} {FC=mpif90} {CXX=g++} {MPICC=mpicc} {MPIFC=mpif90}{MPICXX=} {FPPFLAGS=} {LD=mpif90} {OPT=} {BIT64=} {REAL8=} {ENDIAN=} {FFLAGS=-m64 } {CFLAGS=-g -Wall} {FCFLAGS= -m64 -I/ddn_lustre/hongyongyu/WRF/Libraries/netcdf/include} {FC_DEFINE=-D} {MPI_INC=} {MPI_LIB=} {MODINC=} {AR=ar} {ARFLAGS=cq} {USE_PNETCDF=no} {PNETCDF_PATH=/ddn_lustre/hongyongyu/MPAS/LIBplus/pnetcdf} {USE_NETCDF=yes} {NETCDF_PATH=/ddn_lustre/hongyongyu/WRF/Libraries/netcdf} {USE_COMPRESSION=no} {CPPDEFS= -DSPMD -DHAVE_MPI -DNO_C_SIZEOF -DUSEMPIIO -DSYSLINUX -D_NETCDF -I/ddn_lustre/hongyongyu/WRF/Libraries/netcdf/include -D_NOPNETCDF} {INCLUDEPATH= } {LDLIBS= -L/ddn_lustre/hongyongyu/WRF/Libraries/netcdf/lib -lnetcdff -lnetcdf -lhdf5 -lhdf5_hl } {DEBUG=no}

configure: creating ./config.status
config.status: creating Makefile.conf
config.status: creating config.h
config.status: config.h is unchanged
configure: WARNING: unrecognized options: --enable-fortran
Please check the Makefile.conf
Have a nice day!
===============================================================
↑this is what i have after order "./configure xxxxxxxxxxxxxx"

when I start to use "make", it became like this:
(base) [hongyongyu@login01 pio]$ make
Done updating dependencies
make[1]: Entering directory `/ddn_lustre/hongyongyu/MPAS/LIBplus/ParallelIO-pio1_7_1/pio'
make[1]: `libpio.a' is up to date.
make[1]: Leaving directory `/ddn_lustre/hongyongyu/MPAS/LIBplus/ParallelIO-pio1_7_1/pio'

I don't know what to do...

mcurry
Posts: 85
Joined: Mon Oct 29, 2018 5:33 pm
Location: Boulder, Co

Re: How to successfully install PIO 1.9.23?

Post by mcurry » Thu Apr 29, 2021 4:20 pm

It appears that the --enable-fortran option is not available with this version. I believe you can remove the option and try again.
NCAR|MMM

yanhongyi
Posts: 9
Joined: Fri Oct 25, 2019 9:06 am

Re: How to successfully install PIO 1.9.23?

Post by yanhongyi » Mon May 17, 2021 6:42 am

mcurry wrote:
Thu Apr 29, 2021 4:20 pm
It appears that the --enable-fortran option is not available with this version. I believe you can remove the option and try again.
Thank you very much for your patient response. I'm sorry that I have not looked at the forum because I have been busy these days.
I think that my configure step should be successful, but the subsequent make and make install still report errors.


↓ when i use ./configure --prefix=/ddn_lustre/hongyongyu/MPAS/LIBplus/pio:

configure: creating ./config.status
config.status: creating Makefile.conf
config.status: creating config.h
config.status: config.h is unchanged
Please check the Makefile.conf
Have a nice day!

(base) [hongyongyu@login01 pio]$ make check
make: *** No rule to make target `check'. Stop.

(base) [hongyongyu@login01 pio]$ make
Done updating dependencies
make[1]: Entering directory `/ddn_lustre/hongyongyu/MPAS/LIBplus/ParallelIO-pio1_7_1/pio'
make[1]: `libpio.a' is up to date.
make[1]: Leaving directory `/ddn_lustre/hongyongyu/MPAS/LIBplus/ParallelIO-pio1_7_1/pio'
(base) [hongyongyu@login01 pio]$ ^C
(base) [hongyongyu@login01 pio]$ make install
install -c -d -m 755 /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/lib
install -c -d -m 755 /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/include
install -c -m 644 libpio.a /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/lib/libpio.a
install -c -m 644 pio.mod pio_kinds.mod nf_mod.mod ionf_mod.mod pio_types.mod calcdecomp.mod piolib_mod.mod pio_mpi_utils.mod pio_nf_utils.mod pio_utils.mod pio_msg_mod.mod calcdisplace_mod.mod pio_support.mod pionfatt_mod.mod pionfread_mod.mod pionfwrite_mod.mod pionfput_mod.mod pionfget_mod.mod alloc_mod.mod box_rearrange.mod rearrange.mod iompi_mod.mod piodarray.mod pio_spmd_utils.mod /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/include


I think it may still be a problem with the package version... So, can you please tell me, from the netcdf, mpich... series, what version of the package should I use?

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

Re: How to successfully install PIO 1.9.23?

Post by mgduda » Mon May 24, 2021 10:06 pm

yanhongyi wrote:
Mon May 17, 2021 6:42 am
(base) [hongyongyu@login01 pio]$ make
Done updating dependencies
make[1]: Entering directory `/ddn_lustre/hongyongyu/MPAS/LIBplus/ParallelIO-pio1_7_1/pio'
make[1]: `libpio.a' is up to date.
make[1]: Leaving directory `/ddn_lustre/hongyongyu/MPAS/LIBplus/ParallelIO-pio1_7_1/pio'
(base) [hongyongyu@login01 pio]$ ^C
(base) [hongyongyu@login01 pio]$ make install
install -c -d -m 755 /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/lib
install -c -d -m 755 /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/include
install -c -m 644 libpio.a /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/lib/libpio.a
install -c -m 644 pio.mod pio_kinds.mod nf_mod.mod ionf_mod.mod pio_types.mod calcdecomp.mod piolib_mod.mod pio_mpi_utils.mod pio_nf_utils.mod pio_utils.mod pio_msg_mod.mod calcdisplace_mod.mod pio_support.mod pionfatt_mod.mod pionfread_mod.mod pionfwrite_mod.mod pionfput_mod.mod pionfget_mod.mod alloc_mod.mod box_rearrange.mod rearrange.mod iompi_mod.mod piodarray.mod pio_spmd_utils.mod /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/include
Based on this output from "make" and "make install", it looks like installation of the PIO library may have been successful. Could you verify that the /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/lib/libpio.a file exists, and that the /ddn_lustre/hongyongyu/MPAS/LIBplus/pio/include directory includes various *.mod files? If so, I think you could try setting the PIO environment variable to /ddn_lustre/hongyongyu/MPAS/LIBplus/pio before trying to compile MPAS-Atmosphere.
NCAR/MMM

yanhongyi
Posts: 9
Joined: Fri Oct 25, 2019 9:06 am

Re: How to successfully install PIO 1.9.23?

Post by yanhongyi » Sun Jun 20, 2021 9:39 am

Ok I would have a try, thanks!

Post Reply

Return to “Compilation / installation”