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

PIO1.f90 error &

Whatheway

Active member
Getting two errors when trying to make init_atmosphere.


Code:
PAS_EXE_NAME=init_atmosphere_model -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=v7.3 -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -c mpas_derived_types.F -I/home/will/MPAS-A/Libs/grib2/include -I/home/will/MPAS-A/Libs/NETCDF/include -I/home/will/MPAS-A/Libs/grib2/include -I/home/will/MPAS-A/Libs/NETCDF/include -I/home/will/MPAS-A/Libs/grib2/include -I/home/will/MPAS-A/Libs/grib2/include -I/home/will/MPAS-A/Libs/NETCDF/include -I/home/will/MPAS-A/Libs/grib2/include -I/home/will/MPAS-A/Libs/NETCDF/include -I/home/will/MPAS-A/Libs/grib2/include -I../external/esmf_time_f90
mpas_io_types.inc:4:46:

    4 |    integer, parameter :: MPAS_IO_OFFSET_KIND = PIO_OFFSET
      |                                              1
Error: Parameter ‘pio_offset’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpas_io_types.inc:70:20:

   70 |       integer (kind=MPAS_IO_OFFSET_KIND) :: frame_number = 1
      |                    1
Error: Parameter ‘mpas_io_offset_kind’ at (1) has not been declared or is a variable, which does not reduce to a constant expression



Code:
make[1]: Entering directory '/home/will/MPAS-A/MPAS-Model'
Checking for a usable PIO library...
=> PIO 1 detected
f951: Error: Cannot open file ‘pio1.f90’
<built-in>: Fatal Error: cannot open input file: pio1.f90
compilation terminated.
f951: Error: Cannot open file ‘pio1.f90’
<built-in>: Fatal Error: cannot open input file: pio1.f90
compilation terminated.

All libraries are installed properly and exports are as followed.

Code:
export MPAS_EXTERNAL_LIBS="-L$DIR/NETCDF/lib -L$DIR/grib2/lib -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ldl -lz"
export MPAS_EXTERNAL_INCLUDES="-I$DIR/NETCDF/include -I$DIR/grib2/include"
export PIO=$DIR/grib2
export LD_LIBRARY_PATH=$DIR/NETCDF/lib:$LD_LIBRARY_PATH
export NETCDF=$DIR/NETCDF
export PNETCDF=$DIR/grib2
export HDF5=$DIR/grib2
 

Whatheway

Active member
Tried this fix and still gets the same error

Code:
make gfortran CORE=init_atmosphere USE_PIO2=true PRECISION=single
 

Whatheway

Active member
There was a problem with the links for hdf5 and netcdf. Needed to link them directly.
Code:
export MPAS_EXTERNAL_LIBS="-L$DIR/NETCDF/lib -L$DIR/grib2/lib -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ldl -lz"
export MPAS_EXTERNAL_INCLUDES="-I$DIR/NETCDF/include -I$DIR/grib2/include"
 

mgduda

Administrator
Staff member
Whatheway said:
There was a problem with the links for hdf5 and netcdf. Needed to link them directly.
Code:
export MPAS_EXTERNAL_LIBS="-L$DIR/NETCDF/lib -L$DIR/grib2/lib -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ldl -lz"
export MPAS_EXTERNAL_INCLUDES="-I$DIR/NETCDF/include -I$DIR/grib2/include"
Just to make sure I understand, you were able to successfully build after making some adjustments to the HDF5 and NetCDF links?
 

Whatheway

Active member
mgduda said:
Whatheway said:
There was a problem with the links for hdf5 and netcdf. Needed to link them directly.
Code:
export MPAS_EXTERNAL_LIBS="-L$DIR/NETCDF/lib -L$DIR/grib2/lib -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ldl -lz"
export MPAS_EXTERNAL_INCLUDES="-I$DIR/NETCDF/include -I$DIR/grib2/include"
Just to make sure I understand, you were able to successfully build after making some adjustments to the HDF5 and NetCDF links?

Correct, for some reason due to changing the default locations of the NETCDF and other libraries the code needed them to be included to the path. So I used -I and -L and it made it work.

Still didn't like the PIO1 files not being in certain location. Kept on saying it couldn't find/open them even though they exist and can be seen. So I used PIO2 and it worked fine for compiling and installation.
 

daniloceano

New member
Hello.

I was not sure if I should continue the thread here or create a new post... but I am facing the same issue:

Code:
danilocs@svante2:/scr1/danilocs/MPAS/MPAS-Model$ make -j4 gfortran CORE=init_atmosphere PRECISION=single DEBUG=true USE_PIO2=true > log_build.txt
gfortran: error: pio1.f90: Arquivo ou diretório não encontrado
gfortran: error: pio2.f90: Arquivo ou diretório não encontrado
make[6]: aviso: -jN forçado no submake: desabilitando o modo jobserver.
make[6]: aviso: -jN forçado no submake: desabilitando o modo jobserver.
mpas_log.F:42:7:

   42 |    use mpas_derived_types
      |       1
Fatal Error: Cannot read module file ‘mpas_derived_types.mod’ opened at (1), because it was created by a different version of GNU Fortran
compilation terminated.
make[3]: ** [mpas_log.o] Erro 1
make[2]: ** [frame] Erro 2
make[2]: ** Esperando que outros processos terminem.
make[1]: ** [mpas_main] Erro 2
make: ** [gfortran] Erro 2

Attached is the configuration file with export for all libraries

Any suggestions?
 

daniloceano

New member
Just a small update: I change the system language to english and here it its my error log

Code:
danilocs@svante2:/scr1/danilocs/MPAS/MPAS-Model$ make -j4 gfortran CORE=init_atmosphere PRECISION=single DEBUG=true USE_PIO2=true > log_build.txt
gfortran: error: pio1.f90: No such file or directory
gfortran: error: pio2.f90: No such file or directory
make[6]: warning: -jN forced in submake: disabling jobserver mode.
make[6]: warning: -jN forced in submake: disabling jobserver mode.
mpas_log.F:42:7:

   42 |    use mpas_derived_types
      |       1
Fatal Error: Cannot read module file 'mpas_derived_types.mod' opened at (1), because it was created by a different version of GNU Fortran
compilation terminated.
make[3]: *** [mpas_log.o] Error 1
make[2]: *** [frame] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [mpas_main] Error 2
make: *** [gfortran] Error 2

And attached the error log
 

Attachments

  • log_build.txt
    11.4 KB · Views: 0

Whatheway

Active member
Hello.

I was not sure if I should continue the thread here or create a new post... but I am facing the same issue:

Code:
danilocs@svante2:/scr1/danilocs/MPAS/MPAS-Model$ make -j4 gfortran CORE=init_atmosphere PRECISION=single DEBUG=true USE_PIO2=true > log_build.txt
gfortran: error: pio1.f90: Arquivo ou diretório não encontrado
gfortran: error: pio2.f90: Arquivo ou diretório não encontrado
make[6]: aviso: -jN forçado no submake: desabilitando o modo jobserver.
make[6]: aviso: -jN forçado no submake: desabilitando o modo jobserver.
mpas_log.F:42:7:

   42 |    use mpas_derived_types
      |       1
Fatal Error: Cannot read module file ‘mpas_derived_types.mod’ opened at (1), because it was created by a different version of GNU Fortran
compilation terminated.
make[3]: ** [mpas_log.o] Erro 1
make[2]: ** [frame] Erro 2
make[2]: ** Esperando que outros processos terminem.
make[1]: ** [mpas_main] Erro 2
make: ** [gfortran] Erro 2

Attached is the configuration file with export for all libraries

Any suggestions?
@daniloceano

If you wouldn't mind creating a new post. The Admins like the board to keep different issues separated since they are usually different environments.
 
Top