Compilation error during coupling test

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
nishtha_2
Posts: 7
Joined: Wed Dec 07, 2016 3:03 pm
Location: University of Allahabad

Compilation error during coupling test

#1 Unread post by nishtha_2 »

Hi,

I am trying to compile the coupling test case. I have compiled MCT and now I am running build.bash and getting the following error

$ ./build.bash

...

/usr/bin/cpp -P -traditional -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/student/Desktop/roms_rutgers"' -DCOUPLING -D'HEADER="coupling.h"' -D'ROMS_HEADER="/home/student/Desktop/roms_rutgers/Project/coupling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/student/Desktop/roms_rutgers/Project"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="exported"' -IROMS/Include -I/home/student/Desktop/roms_rutgers/Project -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/student/Desktop/roms_rutgers/Project -IMaster -ICompilers -D'HEADER_DIR="/home/student/Desktop/roms_rutgers/Project"' ROMS/Modules/mod_coupling.F > /home/student/Desktop/roms_rutgers/Project/Build/mod_coupling.f90
ROMS/Bin/cpp_clean /home/student/Desktop/roms_rutgers/Project/Build/mod_coupling.f90
cd /home/student/Desktop/roms_rutgers/Project/Build; /usr/bin/gfortran -c -frepack-arrays -O3 -ffast-math mod_coupling.f90
mod_coupling.f90:38.43:

TYPE (T_COUPLING), allocatable :: 1(:)
1
Error: Invalid character in name at (1)
mod_coupling.f90:59.30:

IF (ng.eq.1) allocate ( 1(Ngrids) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:63.17:

allocate ( 1(ng) % DU_avg1(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:64.17:

allocate ( 1(ng) % DU_avg2(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:65.17:

allocate ( 1(ng) % DV_avg1(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:66.17:

allocate ( 1(ng) % DV_avg2(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:67.17:

allocate ( 1(ng) % Zt_avg1(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:68.17:

allocate ( 1(ng) % rufrc(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:69.17:

allocate ( 1(ng) % rvfrc(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:70.17:

allocate ( 1(ng) % rhoA(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:71.17:

allocate ( 1(ng) % rhoS(LBi:UBi,LBj:UBj) )
1
Error: Syntax error in ALLOCATE statement at (1)
mod_coupling.f90:189.14:

1(ng) % DU_avg1(i,j) = IniVal
1
Error: Non-numeric character in statement label at (1)
mod_coupling.f90:189.14:

1(ng) % DU_avg1(i,j) = IniVal
1
Error: Unclassifiable statement at (1)
mod_coupling.f90:190.14:

1(ng) % DU_avg2(i,j) = IniVal
1
Error: Non-numeric character in statement label at (1)
mod_coupling.f90:190.14:

1(ng) % DU_avg2(i,j) = IniVal
1
Error: Unclassifiable statement at (1)
mod_coupling.f90:191.14:

1(ng) % DV_avg1(i,j) = IniVal
1
Error: Non-numeric character in statement label at (1)
mod_coupling.f90:191.14:

1(ng) % DV_avg1(i,j) = IniVal
1
Error: Unclassifiable statement at (1)
mod_coupling.f90:192.14:

1(ng) % DV_avg2(i,j) = IniVal
1
Error: Non-numeric character in statement label at (1)
mod_coupling.f90:192.14:

1(ng) % DV_avg2(i,j) = IniVal
1
Error: Unclassifiable statement at (1)
mod_coupling.f90:193.14:

1(ng) % Zt_avg1(i,j) = IniVal
1
Error: Non-numeric character in statement label at (1)
mod_coupling.f90:193.14:

1(ng) % Zt_avg1(i,j) = IniVal
1
Error: Unclassifiable statement at (1)
mod_coupling.f90:194.14:

1(ng) % rufrc(i,j) = IniVal
1
Error: Non-numeric character in statement label at (1)
mod_coupling.f90:194.14:

1(ng) % rufrc(i,j) = IniVal
1
Error: Unclassifiable statement at (1)
mod_coupling.f90:195.14:

1(ng) % rvfrc(i,j) = IniVal
1
Error: Non-numeric character in statement label at (1)
mod_coupling.f90:195.14:

1(ng) % rvfrc(i,j) = IniVal
1
Error: Unclassifiable statement at (1)
Fatal Error: Error count reached limit of 25.
make: *** [/home/student/Desktop/roms_rutgers/Project/Build/mod_coupling.o] Error 1

Any idea what's wrong here?

Nishtha

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Compilation error during coupling test

#2 Unread post by kate »

Yes, I know exactly what's going on. The C preprocessor is changing this code:

Code: Select all

      IF (ng.eq.1) allocate ( COUPLING(Ngrids) )
Via "-DCOUPLING" to:

Code: Select all

      IF (ng.eq.1) allocate ( 1(Ngrids) )
You have named your case "coupling" and that is in conflict of another use of that string.

nishtha_2
Posts: 7
Joined: Wed Dec 07, 2016 3:03 pm
Location: University of Allahabad

Re: Compilation error during coupling test

#3 Unread post by nishtha_2 »

Thanks!

I just renamed it and it is working now...

Nishtha

Post Reply