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

ERROR: Could not detect a working PIO library!

HCY

New member
Hello,
I keep receiving this error when building MPASv8.0.1(the latest version from github?)...
However, it seems that the path is correct (I use PIO-2.5.4)

Code:
$ ls $PIO/lib

libpioc.a  libpioc.la  libpiof.a  libpiof.la

$ ls $PIO/include

piodarray.mod  pio_kinds.mod   pio_meta.h  pionfatt_mod.mod  pio_nf.mod        pio_support.mod  uthash.h
pio.h          piolib_mod.mod  pio.mod     pionfget_mod.mod  pionfput_mod.mod  pio_types.mod

the command i use is
Code:
make $TAR CORE=atmosphere PRECISION=single USE_PIO2=true
while TAR=gnu-mpifort is what I add to the MakeFile(basically it's the same as gnu or gfortran but with mpifort instead of mpif90)
I've also tried 'make gfortran' provided in MakeFile but still received the same error...

What might be the reason causing this?
Thanks!
 
When a working PIO library isn't detected, the build system should print out something like the following:
Code:
*********************************************************
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/tmp -I/Users/duda/local/gnu/9.2.0/include -I/Users/duda/local/gnu/9.2.0/include -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -O3 -L/tmp -L/Users/duda/local/gnu/9.2.0/lib -lnetcdff -lnetcdf -L/Users/duda/local/gnu/9.2.0/lib -lpnetcdf

mpif90 pio2.f90 -o pio2.x  -I/tmp -I/Users/duda/local/gnu/9.2.0/include -I/Users/duda/local/gnu/9.2.0/include -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -O3 -L/tmp -L/Users/duda/local/gnu/9.2.0/lib -lnetcdff -lnetcdf -L/Users/duda/local/gnu/9.2.0/lib -lpnetcdf

The pio1.f90 and pio2.f90 test programs have been left in
the top-level MPAS directory for further debugging.
*********************************************************
What do see when trying to manually run the second of these commands; in my case, this would be
Code:
mpif90 pio2.f90 -o pio2.x  -I/tmp -I/Users/duda/local/gnu/9.2.0/include -I/Users/duda/local/gnu/9.2.0/include -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -O3 -L/tmp -L/Users/duda/local/gnu/9.2.0/lib -lnetcdff -lnetcdf -L/Users/duda/local/gnu/9.2.0/lib -lpnetcdf
In your case, you'll need to check the full message from the build system.
 
Thanks for your help!
After solving this issue, I encounter another issue, which I was suggested to recompile all the libraries with newer compilers(gcc 4.8.5->13.1.0)
However, after I recompile all the libraries, I encounter another problem:
Code:
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/CHARACTER(*)).
mpas_dmpar.F:391:24:

  391 |          call MPI_Bcast(i, 1, MPI_INTEGERKIND, source, dminfo % comm, mpi_ierr)
      |                        1
......
  714 |          call MPI_Bcast(carray, n * len(carray(1)), MPI_CHARACTER, source, dminfo % comm, mpi_ierr)
      |                        2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/CHARACTER(*)).

I have tried adding:

export MPAS_EXTERNAL_FFLAGS="-fallow-argument-mismatch"
export MPAS_EXTERNAL_FCLAGS="-fallow-invalid-boz"
(I tried these since I have encountered similar problem when recompiling netcdf-fotran with gcc-13.1.0)

Could you please help me with this?
Thanks!!!
 
However, after I recompile all the libraries, I encounter another problem:
Code:
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/CHARACTER(*)).
mpas_dmpar.F:391:24:

  391 |          call MPI_Bcast(i, 1, MPI_INTEGERKIND, source, dminfo % comm, mpi_ierr)
      |                        1
......
  714 |          call MPI_Bcast(carray, n * len(carray(1)), MPI_CHARACTER, source, dminfo % comm, mpi_ierr)
      |                        2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/CHARACTER(*)).
Could you create a separate thread for this new issue? We generally try to keep each forum thread focused on one specific topic.
 
Hello,

I ran into a similar first issue, that is why I am contributing to this thread.

I am trying to build MPAS-A in ARCHER2 with the PrgEnv-gnu environment, so I used target ftn in the Makefile, the only modification I did to ftn was to add -fallow-argument-mismatch -fallow-invalid-boz to FFLAGS_OPT. My error messages are:

make[1]: Entering directory '/mnt/lustre/a2fs-work2/work/ta109/ta109/vmagar/BCMPAS/MPAS-Model'
Checking for a working PIO library...
*** Note: The USE_PIO2 option has been deprecated and will be ignored.
*********************************************************
ERROR: Could not detect a working PIO library!

Both of the following commands to compile a test program
failed with errors:

ftn pio1.f90 -o pio1.x -I/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/include -I/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/include -i4 -
gopt -O2 -Mvect=nosse -Kieee -convert big_endian -fallow-argument-mismatch -fallow-invalid-boz -r8 -L/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/lib -lpiof -lpioc -L/opt/cray/pe/netcdf-hdf5parallel
/4.9.0.1/gnu/9.1/lib -lnetcdff -lnetcdf -L/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/lib -lpnetcdf

ftn pio2.f90 -o pio2.x -I/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/include -I/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/include -i4 -
gopt -O2 -Mvect=nosse -Kieee -convert big_endian -fallow-argument-mismatch -fallow-invalid-boz -r8 -L/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/lib -lpiof -lpioc -L/opt/cray/pe/netcdf-hdf5parallel
/4.9.0.1/gnu/9.1/lib -lnetcdff -lnetcdf -L/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/lib -lpnetcdf

The pio1.f90 and pio2.f90 test programs have been left in
the top-level MPAS directory for further debugging.
*********************************************************
So following your suggestion, I ran the second command line with the following errors:

vmagar@ln01:/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build> ftn pio2.f90 -o pio2.x -I/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/include -I/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/include -i4 -gopt -O2 -Mvect=nosse -Kieee -convert big_endian -fallow-argument-mismatch -fallow-invalid-boz -r8 -L/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/lib -lpiof -lpioc -L/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/lib -lnetcdff -lnetcdf -L/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/lib -lpnetcdf
gfortran: error: unrecognized debug output level 'opt'
gfortran: error: unrecognized command-line option '-i4'
gfortran: error: unrecognized command-line option '-Mvect=nosse'
gfortran: error: unrecognized command-line option '-Kieee'
gfortran: error: unrecognized command-line option '-convert'; did you mean '-fconvert='?
gfortran: error: unrecognized command-line option '-r8'; did you mean '-k8'?


Maybe, since I change the program environment from cray to gnu, I should use the gnu target instead, and change the Parallel wrappers in the Makefile to ftn, CC and cc for that target?

Thanks,
Vanesa
 
Hello,

I ran into a similar first issue, that is why I am contributing to this thread.

I am trying to build MPAS-A in ARCHER2 with the PrgEnv-gnu environment, so I used target ftn in the Makefile, the only modification I did to ftn was to add -fallow-argument-mismatch -fallow-invalid-boz to FFLAGS_OPT. My error messages are:

make[1]: Entering directory '/mnt/lustre/a2fs-work2/work/ta109/ta109/vmagar/BCMPAS/MPAS-Model'
Checking for a working PIO library...
*** Note: The USE_PIO2 option has been deprecated and will be ignored.
*********************************************************
ERROR: Could not detect a working PIO library!

Both of the following commands to compile a test program
failed with errors:

ftn pio1.f90 -o pio1.x -I/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/include -I/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/include -i4 -
gopt -O2 -Mvect=nosse -Kieee -convert big_endian -fallow-argument-mismatch -fallow-invalid-boz -r8 -L/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/lib -lpiof -lpioc -L/opt/cray/pe/netcdf-hdf5parallel
/4.9.0.1/gnu/9.1/lib -lnetcdff -lnetcdf -L/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/lib -lpnetcdf

ftn pio2.f90 -o pio2.x -I/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/include -I/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/include -i4 -
gopt -O2 -Mvect=nosse -Kieee -convert big_endian -fallow-argument-mismatch -fallow-invalid-boz -r8 -L/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/lib -lpiof -lpioc -L/opt/cray/pe/netcdf-hdf5parallel
/4.9.0.1/gnu/9.1/lib -lnetcdff -lnetcdf -L/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/lib -lpnetcdf

The pio1.f90 and pio2.f90 test programs have been left in
the top-level MPAS directory for further debugging.
*********************************************************
So following your suggestion, I ran the second command line with the following errors:

vmagar@ln01:/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build> ftn pio2.f90 -o pio2.x -I/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/include -I/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/include -i4 -gopt -O2 -Mvect=nosse -Kieee -convert big_endian -fallow-argument-mismatch -fallow-invalid-boz -r8 -L/work/ta109/ta109/vmagar/BCMPAS/ParallelIO-pio2_6_2/ParalleIO_Build/lib -lpiof -lpioc -L/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1/gnu/9.1/lib -lnetcdff -lnetcdf -L/opt/cray/pe/parallel-netcdf/1.12.3.1/gnu/9.1/lib -lpnetcdf
gfortran: error: unrecognized debug output level 'opt'
gfortran: error: unrecognized command-line option '-i4'
gfortran: error: unrecognized command-line option '-Mvect=nosse'
gfortran: error: unrecognized command-line option '-Kieee'
gfortran: error: unrecognized command-line option '-convert'; did you mean '-fconvert='?
gfortran: error: unrecognized command-line option '-r8'; did you mean '-k8'?


Maybe, since I change the program environment from cray to gnu, I should use the gnu target instead, and change the Parallel wrappers in the Makefile to ftn, CC and cc for that target?

Thanks,
Vanesa
I solved it using the gnu target with Parallel wrappers... Thanks. I will check now if there is a thread about cray vs. gnu PrgEnvs.... probably better to use the (default) PrgEnv-cray than the PrgEnv-gnu ...
 
When a working PIO library isn't detected, the build system should print out something like the following:
Code:
*********************************************************
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/tmp -I/Users/duda/local/gnu/9.2.0/include -I/Users/duda/local/gnu/9.2.0/include -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -O3 -L/tmp -L/Users/duda/local/gnu/9.2.0/lib -lnetcdff -lnetcdf -L/Users/duda/local/gnu/9.2.0/lib -lpnetcdf

mpif90 pio2.f90 -o pio2.x  -I/tmp -I/Users/duda/local/gnu/9.2.0/include -I/Users/duda/local/gnu/9.2.0/include -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -O3 -L/tmp -L/Users/duda/local/gnu/9.2.0/lib -lnetcdff -lnetcdf -L/Users/duda/local/gnu/9.2.0/lib -lpnetcdf

The pio1.f90 and pio2.f90 test programs have been left in
the top-level MPAS directory for further debugging.
*********************************************************
What do see when trying to manually run the second of these commands; in my case, this would be
Code:
mpif90 pio2.f90 -o pio2.x  -I/tmp -I/Users/duda/local/gnu/9.2.0/include -I/Users/duda/local/gnu/9.2.0/include -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -O3 -L/tmp -L/Users/duda/local/gnu/9.2.0/lib -lnetcdff -lnetcdf -L/Users/duda/local/gnu/9.2.0/lib -lpnetcdf
In your case, you'll need to check the full message from the build system.
Dear @mgduda
I am facing a similar problem. And when I checked to run the second of these commands, this result comes:

Code:
mpif90 pio2.f90 -o pio2.x  -I/home/faiz/Build_MPAS2/LIBRARIES/pio2.4.4 -I/home/faiz/Build_MPAS2/LIBRARIES/netcdf-c-4.7.0/include -I/home/faiz/Build_MPAS2/LIBRARIES/pnetcdf-1.12.3/include -O3 -convert big_endian -free -align array64byte -O3 -L/home/faiz/Build_MPAS2/LIBRARIES/pio2.4.4 -L/home/faiz/Build_MPAS2/LIBRARIES/netcdf-c-4.7.0/lib -lnetcdff -lnetcdf -L/home/faiz/Build_MPAS2/LIBRARIES/pnetcdf-1.12.3/lib -lpnetcdf

[RESULT]
gfortran: error: big_endian: No such file or directory
gfortran: error: array64byte: No such file or directory
gfortran: error: unrecognized command line option ‘-convert’
gfortran: error: unrecognized command line option ‘-align’


Best regards and thank you.
 
Top