I am trying the latest ROMS svn978 code, by a ROMS + SWAN coupling application, activated by CPP option " #define SWAN_COUPLING, #define NEARSHORE_MELLOR08", but got a error message as follows:
The reported ocpmix.f90 (SWAN code) code is as follows:$ mpirun -np 20 ./romsM ./Input/coupling_eams_20190730.in > log.20190730
forrtl: severe (194): Run-Time Check Failure. The variable 'lsplit_$RITM' is being used in 'ocpmix.f90(2220,24)' without being defined
Image PC Routine Line Source
romsM 000000000096671B lsplit_ 2220 ocpmix.f90
romsM 00000000008A6CC2 rbfile_ 5038 swanmain.f90
romsM 00000000008A53D1 snexti_ 4374 swanmain.f90
romsM 00000000008A0EAC swan_run_ 455 swanmain.f90
romsM 00000000004055F5 MAIN__ 91 master.f90
romsM 0000000000404B3E Unknown Unknown Unknown
libc-2.17.so 00007FA4C82A53D5 __libc_start_main Unknown Unknown
romsM 0000000000404A49 Unknown Unknown Unknown
Code: Select all
2141 !
2142 INTEGER ICR1, IENT, ILL, IITM, LENLIN, RITM
2143 !
2144 ! LCHSTR : if True, program is reading a string (enclosed in quotes)
2145 !
2146 LOGICAL LCHSTR
2147 !
2148 ! 8. SUBROUTINE USED
2149 !
2150 ! ------
2151 !
2152 ! 9. SUBROUTINES CALLING
2153 !
2154 ! SWBOUN
2155 !
2156 ! 10. ERROR MESSAGES
2157 !
2158 ! Too many data items on input line
2159 !
2160 ! 11. REMARKS
2161 !
2162 ! 12. STRUCTURE
2163 !
2164 ! 13. SOURCE TEXT
2165 !
2166 SAVE IENT, QUOTE
2167 DATA IENT /0/, QUOTE /''''/
2168 CALL STRACE (IENT, 'LSPLIT')
2169 !
2170 LENLIN = LEN(RELINE)
2171 LCHSTR = .FALSE.
2172 DO IITM = 1, NUMITM
2173 DATITM(IITM) = ' '
2174 ENDDO
2175 IF (ITEST.GE.150) WRITE (PRTEST,*) ' test LSPLIT ', RELINE
2176 !
2177 ! free format: separate the line into data items
2178 ! blanks and commas serve as separation between data items
2179 ! DATITM is string containing one data item
2180 !
2181 IITM = 0
2182 DO 170 ILL = 1, LENLIN
2183 CRL = RELINE(ILL:ILL)
2184 IF (LCHSTR) THEN
2185 ! reading a character string enclosed in quotes
2186 IF (CRL.EQ.QUOTE) THEN
2187 ! closing quote
2188 LCHSTR = .FALSE.
2189 RITM = 2
2190 IF (IITM.GT.NUMITM) THEN
2191 CALL MSGERR (2, 'too many items on input line')
2192 WRITE (PRINTF, *) ' -> ', TRIM(RELINE)
2193 ENDIF
2194 DATITM(IITM) = RELINE (ICR1:ILL-1)
2195 ENDIF
2196 ELSE
2197 IF (CRL.EQ.',') THEN
2198 IF (RITM.EQ.0) THEN
2199 ! empty item
2200 IITM = IITM + 1
2201 IF (IITM.GT.NUMITM) THEN
2202 CALL MSGERR (2, 'too many items on input line')
2203 WRITE (PRINTF, *) ' -> ', TRIM(RELINE) 40.03
2204 ENDIF
2205 DATITM(IITM) = ' '
2206 ELSE
2207 IF (RITM.EQ.1) DATITM(IITM) = RELINE(ICR1:ILL)
2208 RITM = 0
2209 ENDIF
2210 ELSE IF (CRL.EQ.' ' .OR. CRL.EQ.TABC) THEN
2211 IF (RITM.EQ.1) THEN
2212 IF (IITM.GT.NUMITM) THEN
2213 CALL MSGERR (2, 'too many items on input line')
2214 WRITE (PRINTF, *) ' -> ', TRIM(RELINE) 40.03
2215 ENDIF
2216 DATITM(IITM) = RELINE(ICR1:ILL)
2217 RITM = 2
2218 ENDIF
2219 ELSE
2220 IF (RITM.NE.1) THEN
2221 IITM = IITM + 1
2222 IF (IITM.GT.NUMITM) THEN
2223 CALL MSGERR (2, 'too many items on input line')
2224 WRITE (PRINTF, *) ' -> ', TRIM(RELINE) 40.03
2225 ENDIF
2226 IF (CRL.EQ.QUOTE) THEN
2227 ICR1 = ILL+1
2228 LCHSTR = .TRUE.
2229 ELSE
2230 ICR1 = ILL
2231 RITM = 1
2232 ENDIF
2233 ENDIF
2234 ENDIF
2235 ENDIF
2236 IF (ITEST.GE.250) WRITE (PRTEST, 165) CRL, RITM,
2237 & IITM, ICR1
2238 165 FORMAT (' test LSPLIT ', A1, 3I3, 2X, A20)
2239 170 CONTINUE
The traceback option locates the line of 2220, which trigger the error.TPAR
20190720.00 0.1047 0.9145 75.4095 20
20190720.03 0.0923 0.8901 74.8351 20
20190720.06 0.0927 0.8433 73.8963 20
20190720.09 0.0990 0.8544 69.3413 20
20190720.12 0.1358 0.9314 70.2427 20
The variable "RITM" seems not initialized properly (assign a initial value), and somehow it works for svn 902 but report error in svn 978. Could someone give me some advice on this?
BTW, I am using intel ifort compiler 18.0.2 20180210 with openmpi setting.
Best,
Yao