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 &

  • Thread starter Deleted member 3607
  • Start date
D

Deleted member 3607

Guest
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
 
Tried all the fixes listed on the forum and no luck.
 
attached debug output
 

Attachments

  • make.out.txt
    22 KB · Views: 3
Tried this fix and still gets the same error

Code:
make gfortran CORE=init_atmosphere USE_PIO2=true PRECISION=single
 
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"
 
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?
 
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.
 
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?
 
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
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.
 
Hello!

I am trying to compile the MPAS model, but I have been problems with thw PIO library. Someone had the same problem and could resolved it?
 

Attachments

  • Make_file_error_PIO.JPG
    Make_file_error_PIO.JPG
    217.9 KB · Views: 6
Hello!

I am trying to compile the MPAS model, but I have been problems with thw PIO library. Someone had the same problem and could resolved it?
Have you set the PIO environment variable to the installation path of the PIO library? What do you see if you run the commands
Code:
echo $PIO
ls -l $PIO/lib
 
Have you set the PIO environment variable to the installation path of the PIO library? What do you see if you run the commands
Code:
echo $PIO
ls -l $PIO/lib
Yes of course, I attached a screen capture
 

Attachments

  • Make_file_error_PIO2.JPG
    Make_file_error_PIO2.JPG
    30.3 KB · Views: 4
It looks like you may have installed a PIO 1.x version, rather than the newer PIO 2.x library, based on the presence of just a libpio.a file in your $PIO/lib directory. Is that correct?

Anyway, if you're using MPAS v8.0 or later, an alternative may be to use the SMIOL I/O library rather than PIO. To activate SMIOL at compile time, you can just unset the PIO environment variable, and SMIOL will be automatically compiled along with the rest of the MPAS source code. The only library requirement for SMIOL is the Parallel-NetCDF library, whose installation directory should be indicated by the PNETCDF environment variable.

As a side note about posting on the forum, it's better to quote the actual text from your terminal screen, rather than posting a screen shot. Text within a screenshot isn't searchable on the forum, and it's also not possible, for example, for someone to copy and paste the text in a reply.
 
It looks like you may have installed a PIO 1.x version, rather than the newer PIO 2.x library, based on the presence of just a libpio.a file in your $PIO/lib directory. Is that correct?

Anyway, if you're using MPAS v8.0 or later, an alternative may be to use the SMIOL I/O library rather than PIO. To activate SMIOL at compile time, you can just unset the PIO environment variable, and SMIOL will be automatically compiled along with the rest of the MPAS source code. The only library requirement for SMIOL is the Parallel-NetCDF library, whose installation directory should be indicated by the PNETCDF environment variable.

As a side note about posting on the forum, it's better to quote the actual text from your terminal screen, rather than posting a screen shot. Text within a screenshot isn't searchable on the forum, and it's also not possible, for example, for someone to copy and paste the text in a reply.


Thank you very much for your support!!!

First, indeed the versions of the libraries were wrong.

Second, thank you very much for your support again, a part has already been solved just by compiling MPAS V8.0.1, however, during the "make" process it now shows me the following errors:



mpif90 -D_MPI -DCORE_INIT_ATMOSPHERE -DMPAS_NAMELIST_SUFFIX=init_atmosphere -DMPAS_EXE_NAME=init_atmosphere_model -DSINGLE_PRECISION -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -DMPAS_BUILD_TARGET=gfortran -DMPAS_SMIOL_SUPPORT -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -c mpas_geotile_manager.F -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I/home/mpas/MPAS/MPAS-Model-8.0.1/src/external/SMIOL -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I./inc -I../framework -I../operators -I../external/esmf_time_f90
mpas_geotile_manager.F:625.27:

c_tile_ptr = c_loc(tile % tile)
1
Error: El argumento 'tile' para 'c_loc' en (1) debe ser un POINTER escalar asociado
make[3]: *** [mpas_geotile_manager.o] Error 1
make[3]: se sale del directorio `/home/mpas/MPAS/MPAS-Model-8.0.1/src/core_init_atmosphere'
make[2]: *** [dycore] Error 2
make[2]: se sale del directorio `/home/mpas/MPAS/MPAS-Model-8.0.1/src'
make[1]: *** [mpas_main] Error 2
make[1]: se sale del directorio `/home/mpas/MPAS/MPAS-Model-8.0.1'
make: *** [gfortran] Error 2
[mpas@localhost MPAS-Model-8.0.1]$
 
Thank you very much for your support!!!
Always glad to help!

Second, thank you very much for your support again, a part has already been solved just by compiling MPAS V8.0.1, however, during the "make" process it now shows me the following errors:



mpif90 -D_MPI -DCORE_INIT_ATMOSPHERE -DMPAS_NAMELIST_SUFFIX=init_atmosphere -DMPAS_EXE_NAME=init_atmosphere_model -DSINGLE_PRECISION -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -DMPAS_BUILD_TARGET=gfortran -DMPAS_SMIOL_SUPPORT -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -c mpas_geotile_manager.F -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I/home/mpas/MPAS/MPAS-Model-8.0.1/src/external/SMIOL -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I/home/mpas/MPAS/Libs/netcdf/include -I/home/mpas/MPAS/Libs/grib2/include -I./inc -I../framework -I../operators -I../external/esmf_time_f90
mpas_geotile_manager.F:625.27:

c_tile_ptr = c_loc(tile % tile)
1
Error: El argumento 'tile' para 'c_loc' en (1) debe ser un POINTER escalar asociado
make[3]: *** [mpas_geotile_manager.o] Error 1
make[3]: se sale del directorio `/home/mpas/MPAS/MPAS-Model-8.0.1/src/core_init_atmosphere'
make[2]: *** [dycore] Error 2
make[2]: se sale del directorio `/home/mpas/MPAS/MPAS-Model-8.0.1/src'
make[1]: *** [mpas_main] Error 2
make[1]: se sale del directorio `/home/mpas/MPAS/MPAS-Model-8.0.1'
make: *** [gfortran] Error 2
[mpas@localhost MPAS-Model-8.0.1]$
Which version of the 'gfortran' compiler are you using?
 
It may be that you will need a newer version of the GNU compilers. I have verified that MPAS-A v8.0.1 will build successfully with the GNU 7.4.0 compilers, but it's been a while since I've tried anything older than that.
 
It may be that you will need a newer version of the GNU compilers. I have verified that MPAS-A v8.0.1 will build successfully with the GNU 7.4.0 compilers, but it's been a while since I've tried anything older than that.
Ok ok thank you very much, I'll to update the compiler and I let you know if it worked
 
Top