Error compiling INLET_TEST Case

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
koyo
Posts: 1
Joined: Wed Apr 07, 2010 5:44 pm
Location: Universidad Nacional de Colombia
Contact:

Error compiling INLET_TEST Case

#1 Unread post by koyo »

Hi all

This is the first approximation to the model ROMS, I'm trying to run the example INLET_TEST (SWAN-ROMS). But, in the compilation the following error arises:

Code: Select all

cd /home/Modelos/ROMS/UPWELLING/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -I/usr/local/include -ffree-form -ffree-line-length-none mod_sources.f90
cd /home/Modelos/ROMS/UPWELLING/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -I/usr/local/include -ffree-form -ffree-line-length-none analytical.f90
analytical.f90:798.45:

     &                        OCEAN(ng) % bed,                          &
                                             1
Error: 'bed' at (1) is not a member of the 't_ocean' structure
analytical.f90:848.27:

      logical :: EWperiodic=.FALSE.
                           1
Error: Symbol 'ewperiodic' at (1) already has basic type of LOGICAL
analytical.f90:849.27:

      logical :: NSperiodic=.FALSE.
                           1
Error: Symbol 'nsperiodic' at (1) already has basic type of LOGICAL
analytical.f90:713.22:

      IF (EASTERN_EDGE) THEN
                      1
Error: Symbol 'eastern_edge' at (1) has no IMPLICIT type
analytical.f90:737.23:

      IF (NORTHERN_EDGE) THEN
                       1
Error: Symbol 'northern_edge' at (1) has no IMPLICIT type
analytical.f90:729.23:

      IF (SOUTHERN_EDGE) THEN
                       1
Error: Symbol 'southern_edge' at (1) has no IMPLICIT type
analytical.f90:721.22:

      IF (WESTERN_EDGE) THEN
                      1
Error: Symbol 'western_edge' at (1) has no IMPLICIT type
analytical.f90:325.23:

      IF (NORTHERN_EDGE) THEN
                       1
Error: Symbol 'northern_edge' at (1) has no IMPLICIT type
make: *** [/home/Modelos/ROMS/UPWELLING/Build/analytical.o] Error 1
I am using the gcc/gfortran compiler v4.5.3

What can be causing this error?

Thank you very much

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Error compiling INLET_TEST Case

#2 Unread post by arango »

It seems that you are using an inconsistent analytical file with the new version of ROMS. All the lateral boundary conditions C-preprocessing options were removed in ROMS 3.6. Your analytical files need to be consistent with version 3.6. The NORTHERN_EDGE and friend directives have been removed form ROMS and replaced with logical switches instead. You are mixing various versions of ROMS. See release notes for :arrow: 3.5 and :arrow: 3.6.

You can download the test repository to run this application. Everything is provided for you. Check :arrow: wikiROMS for instructions.

User avatar
Will
Posts: 4
Joined: Fri Sep 28, 2012 3:54 pm
Location: INOCAR

Re: Error compiling INLET_TEST Case

#3 Unread post by Will »

I have the same error trying to compile the last svn version!


/mpif90 -c -frepack-arrays -g -fbounds-check -ffree-form -ffree-line-length-none mp_exchange.f90
cd /Users/willingtonrenteria/roms/trunk/projects/upwelling/Build; /usr/local/bin/mpif90 -c -frepack-arrays -g -fbounds-check -ffree-form -ffree-line-length-none analytical.f90
analytical.f90:396.14:

ana_grid.h: no values provided for Xsize, Esize, depth, f0, beta.
1
Error: 'ana_grid' at (1) is not a variable
analytical.f90:1351.14:

ana_vmix.h: no values provided for Akv.
1
Error: 'ana_vmix' at (1) is not a variable
analytical.f90:1370.14:

ana_vmix.h: no values provided for Akt.
1
Error: 'ana_vmix' at (1) is not a variable
make: *** [/Users/willingtonrenteria/roms/trunk/projects/upwelling/Build/analytical.o] Error 1

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Error compiling INLET_TEST Case

#4 Unread post by m.hadfield »

I have no trouble compiling INLET_TEST with an up-to-date copy of the trunk code.

Did you clear out all the files generated during your first attempt before re-trying?

User avatar
Will
Posts: 4
Joined: Fri Sep 28, 2012 3:54 pm
Location: INOCAR

Re: Error compiling INLET_TEST Case

#5 Unread post by Will »

Well, i need to be more accurate!
This is my first attempt to compile ROMS following the "Tutorial: Installing ROMS on a Macintosh". I got this error, and found that this is similar to the INLET_TEST Case.
I have cleaned the *.mod *.o generated files, however the "analytical.o" is not generated, and this avoid the compilation(i thought).
Thanks for your help!
By the way, this is the error that y got:
frepack-arrays -g -fbounds-check -ffree-form -ffree-line-length-none analytical.f90
analytical.f90:396.14:

ana_grid.h: no values provided for Xsize, Esize, depth, f0, beta.
1
Error: 'ana_grid' at (1) is not a variable
analytical.f90:1351.14:

ana_vmix.h: no values provided for Akv.
1
Error: 'ana_vmix' at (1) is not a variable
analytical.f90:1370.14:

ana_vmix.h: no values provided for Akt.
1
Error: 'ana_vmix' at (1) is not a variable
make: *** [/Users/willingtonrenteria/ROMS/trunk/Projects/Upwelling/Build/analytical.o] Error 1

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Error compiling INLET_TEST Case

#6 Unread post by m.hadfield »

OK. If you look at ROMS/Functionals/ana_grid.h, you'll see a block of code that looks like the following (with a lot of lines in the middle deleted)

Code: Select all

#if defined BASIN
      Xsize=3600.0E+03_r8
      Esize=2800.0E+03_r8
      depth=5000.0_r8
      f0=1.0E-04_r8
      beta=2.0E-11_r8
...
#elif defined WINDBASIN
      Xsize=2000.0_r8*REAL(Lm(ng),r8)
      Esize=1000.0_r8*REAL(Mm(ng),r8)
      depth=50.0_r8
      f0=1.0E-04_r8
      beta=0.0_r8
#else
      ana_grid.h: no values provided for Xsize, Esize, depth, f0, beta.
#endif
The second-last line is what gets written to analytical.f90 by the preprocessor if none of the preceding "if defined" conditions has been satisfied. It's not valid Fortran, so the compiler chokes on it (with an irrelevant message).

The fact that you get this error means that none of the prepocessor symbols tested for has been defined. You need to remedy this deficiency; the usual way to do this is with a line like the following near the start of build.bash:

Code: Select all

export   ROMS_APPLICATION=INLET_TEST
Last edited by m.hadfield on Mon Jan 14, 2013 8:02 pm, edited 1 time in total.

User avatar
Will
Posts: 4
Joined: Fri Sep 28, 2012 3:54 pm
Location: INOCAR

Re: Error compiling INLET_TEST Case

#7 Unread post by Will »

This worked very well!
Thanks

Post Reply