Error in compiling bio_toy

Discussion about coupled ecosystem models

Moderators: arango, robertson

Post Reply
Message
Author
mariefrahman
Posts: 12
Joined: Wed Jun 14, 2023 2:54 am
Location: Meteorological agency of Indonesia (BMKG)

Error in compiling bio_toy

#1 Unread post by mariefrahman »

Hi all,

I found this error when compiling build_roms.sh on the bio_toy test case, I didn't find this error when trying the upwelling test case. does anyone know how to solve this error?

Thank you.
Arief

Code: Select all

biology.f90:1:1:

    1 | /
      | 1
Error: Invalid character in name at (1)
biology.f90:2:1:

    2 | *
      | 1
Error: Invalid character in name at (1)
biology.f90:3:2:

    3 | ** git $Id$
      |  1
Error: Invalid character in name at (1)
biology.f90:4:2:

    4 | ************************************************************************
      |  1
Error: Invalid character in name at (1)
biology.f90:5:2:

    5 | **                                                                    **
      |  1
Error: Invalid character in name at (1)
biology.f90:6:2:

    6 | ** The current design allows the user to have a lot of latitude for   **
      |  1
Error: Invalid character in name at (1)
biology.f90:7:2:

    7 | ** customizing or adding any particular ecosystem model.              **
.
.
.
Error: Invalid character in name at (1)
biology.f90:98:2:

   98 | */
      |  1
Error: Invalid character in name at (1)
cd /home/roms/Project/roms_test/bio_toy/Build_romsM; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch        -O3 -ffast-math ADfromTL.f90
cd /home/roms/Project/roms_test/bio_toy/Build_romsM; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch        -O3 -ffast-math state_dotprod.f90
cd /home/roms/Project/roms_test/bio_toy/Build_romsM; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch        -O3 -ffast-math state_initialize.f90
make: *** [ROMS/Nonlinear/Biology/Module.mk:14: /home/roms/Project/roms_test/bio_toy/Build_romsM/biology.o] Error 1
make: *** Waiting for unfinished jobs....

mariefrahman
Posts: 12
Joined: Wed Jun 14, 2023 2:54 am
Location: Meteorological agency of Indonesia (BMKG)

Re: Error in compiling bio_toy

#2 Unread post by mariefrahman »

Hi all,

I think i find a way to solve this. I change something in /ROMS/Nonlinear/Biology/biology.F

from this

Code: Select all

#include "cppdefs.h"
#if defined NONLINEAR && defined BIOLOGY
/
*
** git $Id$
to this

Code: Select all

#include "cppdefs.h"
#if defined NONLINEAR && defined BIOLOGY

/*
** git $Id$

mariefrahman
Posts: 12
Joined: Wed Jun 14, 2023 2:54 am
Location: Meteorological agency of Indonesia (BMKG)

Re: Error in compiling bio_toy

#3 Unread post by mariefrahman »

Hi all,

another thing, Does anyone know why the input data cannot be used when running the model?

Code: Select all

 Process Information:

 Node #    0 (pid=   21169) is active.

 INITIAL: Configuring and initializing forward nonlinear model ...
 *******
 Found Error: -51  Line: 9402     Source: ROMS/Modules/mod_netcdf.F, netcdf_open

 NETCDF_OPEN - unable to open existing NetCDF file:
               /home/coawst/roms/Project/roms_test/bio_toy/Data/bio_toy_grd.nc
               call from:  ROMS/Utility/get_grid.F, get_grid_nf90
               NetCDF: Unknown file format
 Found Error: 3    Line: 154      Source: ROMS/Utility/get_grid.F, get_grid_nf90

 GET_GRID_NF90 - unable to open grid NetCDF file: /home/coawst/roms/Project/roms_test/bio_toy/Data/bio_toy_grd.nc
 Found Error: 3    Line: 91       Source: ROMS/Utility/get_grid.F
 Found Error: 3    Line: 88       Source: ROMS/Utility/set_grid.F
 Found Error: -51  Line: 9402     Source: ROMS/Modules/mod_netcdf.F, netcdf_open

 NETCDF_OPEN - unable to open existing NetCDF file:
               /home/coawst/roms/Project/roms_test/bio_toy/Data/bio_toy_ini_fennel.nc
               call from:  ROMS/Utility/get_state.F, get_state_nf90
               NetCDF: Unknown file format
 Found Error: 3    Line: 308      Source: ROMS/Utility/get_state.F, get_state_nf90

  GET_STATE_NF90 - NLM: unable to open input NetCDF file: /home/coawst/roms/Project/roms_test/bio_toy/Data/bio_toy_ini_fennel.nc
 Found Error: 3    Line: 151      Source: ROMS/Utility/get_state.F
 Found Error: 3    Line: 420      Source: ROMS/Nonlinear/initial.F
 Found Error: 3    Line: 211      Source: ROMS/Drivers/nl_roms.h, ROMS_initialize

Elapsed wall CPU time for each process (seconds):

 Node   #    0 CPU:       0.000
 Total:                   0.000

  Unique kernel(s) regions profiled ................         0.000       NaN %
  Residual, non-profiled code ......................         0.000       NaN %


 All percentages are with respect to total time =            0.000


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 Dynamic and Automatic memory (MB) usage for Grid 01:  4x4x30  tiling: 1x1

     tile          Dynamic        Automatic            USAGE      MPI-Buffers

        0             6.73             0.45             7.18             0.00

    TOTAL             6.73             0.45             7.18             0.00

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 Found Error: 3    Line: 85       Source: ROMS/Utility/close_io.F, close_file_nf90
 Found Error: 3    Line: 85       Source: ROMS/Utility/close_io.F, close_file_nf90
 Found Error: 3    Line: 85       Source: ROMS/Utility/close_io.F, close_file_nf90
 Found Error: 3    Line: 85       Source: ROMS/Utility/close_io.F, close_file_nf90
 Found Error: 3    Line: 85       Source: ROMS/Utility/close_io.F, close_file_nf90

 ROMS/TOMS - Output NetCDF summary for Grid 01:
 Found Error: 3    Line: 413      Source: ROMS/Utility/close_io.F, close_out

 ROMS/TOMS - Output error ............ exit_flag: 3


 ERROR: Abnormal termination: NetCDF OUTPUT.
 REASON: NetCDF: Unknown file format
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
ERROR STOP

Error termination. Backtrace:
#0  0x7fa9c5a83960 in ???
#1  0x7fa9c5a844d9 in ???
#2  0x7fa9c5a85b47 in ???
#3  0x7fa9c5e4cf64 in ???
#4  0x7fa9c5e4cb8e in ???
#5  0x7fa9c55c9d8f in __libc_start_call_main
        at ../sysdeps/nptl/libc_start_call_main.h:58
#6  0x7fa9c55c9e3f in __libc_start_main_impl
        at ../csu/libc-start.c:392
#7  0x7fa9c5e4cbe4 in ???
#8  0xffffffffffffffff in ???
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[36777,1],0]
  Exit code:    1

jcwarner
Posts: 1204
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Error in compiling bio_toy

#4 Unread post by jcwarner »

i think the path needs to be
Data/ROMS/grid/bio_toy.nc

mariefrahman
Posts: 12
Joined: Wed Jun 14, 2023 2:54 am
Location: Meteorological agency of Indonesia (BMKG)

Re: Error in compiling bio_toy

#5 Unread post by mariefrahman »

Hi John,
I used the test case file from the roms github, and looks like the path is roms_test/Data/bio_toy*.nc, there is no grid directory inside Data directory.

https://github.com/myroms/roms_test/tre ... o_toy/Data

jcwarner
Posts: 1204
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Error in compiling bio_toy

#6 Unread post by jcwarner »

ok. well you need to look around a bit.
I have it here:
COAWST/Data/ROMS/Grid/bio_toy_grd.nc
and Rutgers has it here
roms_test/bio_toy/Data/bio_toy_grd.nc

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

Re: Error in compiling bio_toy

#7 Unread post by robertson »

Most likely you checked out the code without the git-lfs filters enabled. In the instructions section for the roms_test repository we give a couple different options. The issue is that git itself won't download large files like NetCDF files, so git-lfs (Large File Support) is needed to download the actual files. While you have a bunch of '.nc' files in the Data directory, they will be very small and the contents of the file would be something like:

Code: Select all

version https://git-lfs.github.com/spec/v1
oid sha256:79c6d9070d9ea52d993d513231ffe11833af5d27f1f1f1e6320349420413cd58
size 11616
The first step is to make sure your machine has git-lfs installed by issuing the git lfs install command. If you get the output:

Code: Select all

git: 'lfs' is not a git command. See 'git --help'.

Did you mean this?
	log
Then git-lfs is not installed on your system and you (or a sysadmin) will need to install it first. If you get the output:

Code: Select all

Git LFS initialized.
then git-lfs is installed and you have just configured git to automatically use the lfs filter for future repository clones and pulls. The results of the 'install' command can be seen in your ~/.gitconfig file. You will see the following section in that file:

Code: Select all

[filter "lfs"]
        clean = git-lfs clean -- %f
        smudge = git-lfs smudge -- %f
        process = git-lfs filter-process
        required = true
In order to retrieve the NetCDF files for the roms_test repository you have already downloaded, go to your /home/coawst/roms/Project/roms_test directory and run the command git lfs pull. This may take a little while since there is over 2GB of data to download. Once that is finished, try running your testcase again.

If, however, the NetCDF files are normal size and readable by ncdump, you have a different problem.

mariefrahman
Posts: 12
Joined: Wed Jun 14, 2023 2:54 am
Location: Meteorological agency of Indonesia (BMKG)

Re: Error in compiling bio_toy

#8 Unread post by mariefrahman »

I miss the git-lfs step. I already install the git-lfs and and I'm currently downloading the data using git lfs pull. I'll let you know when I finish downloading and trying the bio_toy test case again.

Arief

mariefrahman
Posts: 12
Joined: Wed Jun 14, 2023 2:54 am
Location: Meteorological agency of Indonesia (BMKG)

Re: Error in compiling bio_toy

#9 Unread post by mariefrahman »

Thanks John and David, the bio_toy test case run normally.

Code: Select all

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

 ROMS/TOMS - Output NetCDF summary for Grid 01:
             number of time records written in HISTORY file = 21
             number of time records written in RESTART file = 2
             number of time records written in AVERAGE file = 20

 Analytical header files used:

     ROMS/Functionals/ana_btflux.h
     ROMS/Functionals/ana_cloud.h
     ROMS/Functionals/ana_rain.h
     ROMS/Functionals/ana_srflux.h
     ROMS/Functionals/ana_stflux.h

 Biology model header files used:

     ROMS/Nonlinear/Biology/fennel.h

 ROMS/TOMS: DONE... Thursday - October 3, 2024 -  2:49:19 PM

Post Reply