Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sun Jun 16, 2019 2:53 pm




Post new topic Reply to topic  [ 5 posts ] 

All times are UTC

Author Message
 Post subject: Error compiling COAWST
PostPosted: Fri May 24, 2019 7:51 am 
Offline

Joined: Sat Apr 07, 2018 12:59 am
Posts: 17
Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Dear All
I'm getting the following error in building COAWST using FC=ifort ? Can you please help?




diag.f90(132): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association. [NREDUCE]
integer :: Nreduce
-----------------^
compilation aborted for diag.f90 (code 1)
make: *** [Build/diag.o] Error 1
make: *** Waiting for unfinished jobs....


Top
 Profile  
Reply with quote  
PostPosted: Fri May 24, 2019 4:13 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3598
Location: IMS/UAF, USA
Could you look at your diag.F to see how Nreduce is set and used? My code has:
Code:
#ifdef DISTRIBUTE
# ifdef SOLVE3D
#  ifdef BIOLOGY
      integer :: Nreduce
#  else
      integer, parameter :: Nreduce = 6
#  endif
      integer, parameter :: Ncourant = 7
# else
      integer, parameter :: Nreduce = 4
      integer, parameter :: Ncourant = 5
# endif
      real(r8), allocatable           :: buffer(:)
      character (len=3), allocatable  :: op_handle(:)
      character (len=6), allocatable  :: C_handle(:)
      real(r8), dimension(Ncourant) :: Courant
#else
      integer :: my_threadnum
#endif
Then later:
Code:
#ifdef DISTRIBUTE
# ifdef BIOLOGY
      Nreduce = 6 + NBT
# endif
      IF (.not. allocated(buffer))    allocate (buffer(Nreduce))
      IF (.not. allocated(op_handle)) allocate (op_handle(Nreduce))
      IF (.not. allocated(C_handle))  allocate (C_handle(Nreduce))
#endif


Top
 Profile  
Reply with quote  
PostPosted: Mon May 27, 2019 4:03 am 
Offline

Joined: Sat Apr 07, 2018 12:59 am
Posts: 17
Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
! Local variable declarations.
!
#ifdef BIOLOGY
integer :: ibt, itrc
#endif
integer :: NSUB, i, ispace, j, k, trd
integer :: my_max_Ci, my_max_Cj, my_max_Ck
#ifdef DISTRIBUTE
# ifdef SOLVE3D
# ifdef BIOLOGY
integer :: Nreduce
# else
integer, parameter :: Nreduce = 5
# endif
integer, parameter :: Ncourant = 7
# else
integer, parameter :: Nreduce = 4
integer, parameter :: Ncourant = 5
# endif
real(r8), dimension(Nreduce) :: buffer
real(r8), dimension(Ncourant) :: Courant
character (len=3), dimension(Nreduce) :: op_handle
character (len=6), dimension(Nreduce) :: C_handle
#else
integer :: my_threadnum
#endif

THEN LATER

#ifdef DISTRIBUTE
# ifdef BIOLOGY
Nreduce = 5 + NBT
# endif
! IF (.not. allocated(buffer)) allocate (buffer(Nreduce))
! IF (.not. allocated(op_handle)) allocate (op_handle(Nreduce))
! IF (.not. allocated(C_handle)) allocate (C_handle(Nreduce))
#endif


Top
 Profile  
Reply with quote  
PostPosted: Mon May 27, 2019 4:13 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3598
Location: IMS/UAF, USA
You need to change yours to look like mine for it to compile.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 27, 2019 4:16 am 
Offline

Joined: Sat Apr 07, 2018 12:59 am
Posts: 17
Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Thank you, I'm doing it


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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