Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Fri Dec 14, 2018 7:49 am




Post new topic Reply to topic  [ 6 posts ] 

All times are UTC

Author Message
PostPosted: Thu Apr 27, 2017 11:34 pm 
Offline

Joined: Tue Sep 11, 2007 6:57 pm
Posts: 25
Location: University of Washington
Dear All

I am trying to compile ROMS (checked out today using svn) in a new Linux server with Intel Fortran Compiler and OPEN MPI and get this compilation error:
Code:
ran_state.f90(112): error #6284: There is no matching specific function for this generic function reference.   [REALLOCATE]
        ranseeds => reallocate (ranseeds, length, 5_i8b)
--------------------^
ran_state.f90(112): error #6678: When the target is an expression it must deliver a pointer result.   [REALLOCATE]
        ranseeds => reallocate (ranseeds, length, 5_i8b)
--------------------^
ran_state.f90(113): error #6284: There is no matching specific function for this generic function reference.   [REALLOCATE]
        ranv => reallocate (ranv, length-1_i8b)
----------------^
ran_state.f90(113): error #6678: When the target is an expression it must deliver a pointer result.   [REALLOCATE]
        ranv => reallocate (ranv, length-1_i8b)
----------------^
ran_state.f90(128): error #6284: There is no matching specific function for this generic function reference.   [ARTH]
      ranseeds(new:,2:5)=SPREAD(arth(new,1_i8b,sz),2,4)
--------------------------------^
ran_state.f90(128): error #6283: The DIM specification is out-of-range.   [2]
      ranseeds(new:,2:5)=SPREAD(arth(new,1_i8b,sz),2,4)
---------------------------------------------------^
ran_state.f90(128): error #6366: The shapes of the array expressions do not conform.   [RANSEEDS]
      ranseeds(new:,2:5)=SPREAD(arth(new,1_i8b,sz),2,4)


I am not sure what is the reason behind this error. When compared to an earlier version of the code the numbers in this new file have changed from "_i4b" to "i_8b". Coincidentally, a friend of mine tried to compile ROMS (checked out today using svn) in Mac with gfortran compiler and he got the same error as can be seen in the attached image. I might be doing something silly here, however, it would be great if someone else can take a quick look at this error as well.


Attachments:
File comment: ROMS compilation error in Mac OSX with gfortran
roms_compile_error_macosx.png
roms_compile_error_macosx.png [ 551.36 KiB | Viewed 1221 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 27, 2017 11:41 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3517
Location: IMS/UAF, USA
There was an update today, ticket 726, with changes like the following, only in ran_state:
Code:
-      integer(i4b), parameter :: hg = HUGE(1_i4b)
-      integer(i4b), parameter :: hgm = -hg
-      integer(i4b), parameter :: hgng = hgm - 1
+      integer(i8b), parameter :: hg = HUGE(1_i8b)
+      integer(i8b), parameter :: hgm = -hg
+      integer(i8b), parameter :: hgng = hgm - 1
Perhaps you can revert just that file.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 27, 2017 11:49 pm 
Offline

Joined: Tue Sep 11, 2007 6:57 pm
Posts: 25
Location: University of Washington
Hi Kate

Thanks for getting back to me. I reverted ran_state.F to svn version 842, and now the code compiles, and I can run upwelling example. However, I do get a warning saying:

Code:
ran1.f90(47): warning #6046: The INTEGER(KIND=2) value is out-of-range.   [2147483579]
      IF (rans.lt.0) rans=rans+2147483579_i4b
-------------------------------^
ran1.f90(61): warning #6046: The INTEGER(KIND=2) value is out-of-range.   [270369]
      IF (nran0.eq.1) nran0=270369_i4b
----------------------------^
ran1.f90(125): warning #6046: The INTEGER(KIND=2) value is out-of-range.   [2147483579]
     &  ranv(1:n)=ranv(1:n)+2147483579_i4b
----------------------------^
ran1.f90(140): warning #6046: The INTEGER(KIND=2) value is out-of-range.   [270369]
     &  nran(1:n)=270369_i4b
------------------^


-Nirni


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 27, 2017 11:56 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3517
Location: IMS/UAF, USA
Well, mod_kinds changed what i4b means:
Code:
-        integer, parameter :: i1b= selected_int_kind(2)        !  1-byte
-        integer, parameter :: i2b= selected_int_kind(4)        !  2-byte
-        integer, parameter :: i4b= selected_int_kind(9)        !  4-byte
-        integer, parameter :: c8 = selected_real_kind(6,30)    ! 32-bit
-        integer, parameter :: r4 = selected_real_kind(6,30)    ! 32-bit
-        integer, parameter :: r8 = selected_real_kind(12,300)  ! 64-bit
+        integer, parameter :: i1b= SELECTED_INT_KIND(1)        !  8-bit
+        integer, parameter :: i2b= SELECTED_INT_KIND(2)        !  8-bit
+        integer, parameter :: i4b= SELECTED_INT_KIND(4)        ! 16-bit
+        integer, parameter :: i8b= SELECTED_INT_KIND(8)        ! 32-bit
+        integer, parameter :: c8 = SELECTED_REAL_KIND(6,30)    ! 32-bit
+        integer, parameter :: r4 = SELECTED_REAL_KIND(6,30)    ! 32-bit
+        integer, parameter :: r8 = SELECTED_REAL_KIND(12,300)  ! 64-bit
You still want a 32-bit int. Maybe try the new ran_state with i8b as selected_int_kind(9).


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 28, 2017 4:52 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3517
Location: IMS/UAF, USA
I had the same trouble with ifort. I had to switch to the old mod_kinds and the old ran_state. Weird!


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 29, 2017 2:00 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1049
Location: IMCS, Rutgers University
Weird, I compiled with ifort, gfortran, and pgi and didn't get those errors. It turns out that I missed to transfer the updated files gasdev.F, nrutil.F, and ran1.F when I committed the ticket in another computer. We need these files to have i8b instead i4b. This is the reason why you are having problems compiling because of the mismatch between integer type arguments between these routines and ran_state.F.

Please update again. Thank you reporting this problem.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group