Error in compilation

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
Renato_Cecilio
Posts: 5
Joined: Wed Aug 24, 2022 4:08 pm
Location: renatocecilio.org

Error in compilation

#1 Unread post by Renato_Cecilio »

Hello everyone.
I am trying a new ROMS installation for a colleague and got stuck for days with the following errors in the compilation of the upwelling test-case.
Any ideas on the reason?
Thank you!

First the warnings:
------------------------------

Code: Select all

cd /opt/OurROMS/Tests/upwelling/Build_romsG; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch        -g -O0 -fbounds-check -fbacktrace -fcheck=all -finit-real=nan -ffpe-trap=invalid,zero,overflow mod_diags.f90
distribute.f90:4178:26:

 4178 |       CALL mpi_allreduce (Asend, Areduce, Npts, MP_FLOAT, handle,       &
      |                          1
......
 4411 |         CALL mpi_allreduce (Asend, Areduce, Isize,                      &
      |                            2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
distribute.f90:4065:28:

 4065 |         CALL mpi_allreduce (Asend(i), Areduce(i), 1, MPI_INTEGER,       &
      |                            1
......
 4411 |         CALL mpi_allreduce (Asend, Areduce, Isize,                      &
      |                            2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
distribute.f90:3836:26:

 3836 |       CALL mpi_allgather (my_bounds, np, MPI_INTEGER,                   &
      |                          1
......
 5587 |       CALL mpi_allgather (Asend, Npts, MP_FLOAT, Arecv, Npts, MP_FLOAT, &
      |                          2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
distribute.f90:1407:22:

 1407 |       CALL mpi_bcast (ibuffer, Npts, MPI_INTEGER, MyMaster,             &
      |                      1
......
 5035 |       CALL mpi_bcast (A, Asize, MP_FLOAT, MyMaster, OCN_COMM_WORLD,     &
      |                      2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
distribute.f90:217:22:

  217 |       CALL mpi_bcast (A, Npts, MP_FLOAT, MyMaster, MyCOMM, MyError)
      |                      1
......
 5035 |       CALL mpi_bcast (A, Asize, MP_FLOAT, MyMaster, OCN_COMM_WORLD,     &
      |                      2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
Then after a long list... the errors:

-----------------------------

Code: Select all

cd /opt/OurROMS/Tests/upwelling/Build_romsG; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch        -g -O0 -fbounds-check -fbacktrace -fcheck=all -finit-real=nan -ffpe-trap=invalid,zero,overflow sed_settling.f90
stats.f90:181:35:

  181 |       CALL get_hash (Cwrk, Npts, S.checksum, .TRUE.)
      |                                   1
Error: Syntax error in argument list at (1)
stats.f90:401:35:

  401 |       CALL get_hash (Cwrk, Npts, S.checksum, .TRUE.)
      |                                   1
Error: Syntax error in argument list at (1)
stats.f90:630:35:

  630 |       CALL get_hash (Cwrk, Npts, S.checksum, .TRUE.)
      |                                   1
Error: Syntax error in argument list at (1)
cd /opt/OurROMS/Tests/upwelling/Build_romsG; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch        -g -O0 -fbounds-check -fbacktrace -fcheck=all -finit-real=nan -ffpe-trap=invalid,zero,overflow vwalk_floats.f90
And these are the results of nf-config and nc-config:

------------------------------

Code: Select all

nf-config --all

This netCDF-Fortran 4.5.4 has been built with the following features: 
  --cc        -> gcc
  --cflags    -> -I/usr/include -Wdate-time -D_FORTIFY_SOURCE=2
  --fc        -> gfortran
  --fflags    -> -I/usr/include -I/usr/include
  --flibs -> -L/usr/lib/x86_64-linux-gnu -lnetcdff -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -lnetcdf -lnetcdf -lm 
  --has-f90   -> 
  --has-f03   -> yes
  --has-nc2   -> yes
  --has-nc4   -> yes
  --prefix    -> /usr
  --includedir-> /usr/include
  --version   -> netCDF-Fortran 4.5.4
--------------------

Code: Select all

nc-config --all:

This netCDF 4.8.1 has been built with the following features: 
  --cc            -> /usr/bin/cc
  --cflags        -> -I/usr/include -I/usr/include/hdf5/serial
  --libs          -> -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf
  --static        -> -lhdf5_hl -lhdf5 -lcrypto -lcurl -lpthread -lsz -lz -ldl -lm
  --has-c++       -> no
  --cxx           -> 
  --has-c++4      -> no
  --cxx4          -> 
  --has-fortran   -> yes
  --fc            -> gfortran
  --fflags        -> -I/usr/include -I/usr/include
  --flibs         -> -L/usr/lib/x86_64-linux-gnu -lnetcdff -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -lnetcdf -lnetcdf -lm
  --has-f90       -> 
  --has-f03       -> yes
  --has-dap       -> yes
  --has-dap2      -> yes
  --has-dap4      -> yes
  --has-nc2       -> yes
  --has-nc4       -> yes
  --has-hdf5      -> yes
  --has-hdf4      -> no
  --has-logging   -> no
  --has-pnetcdf   -> no
  --has-szlib     -> yes
  --has-cdf5      -> yes
  --has-parallel4 -> no
  --has-parallel  -> no
  --has-nczarr    -> yes
  --prefix        -> /usr
  --includedir    -> /usr/include
  --libdir        -> /usr/lib/x86_64-linux-gnu
  --version       -> netCDF 4.8.1

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Error in compilation

#2 Unread post by robertson »

Yes, this is indeed a syntax error caused by a typo: S.checksum should be S%checksum.

Thank you for reporting this error. The correction has been made, please update your code.

Post Reply