Error compiling COAWST

Facts, news, and guidance about ROMS software

Moderators: arango, robertson

Post Reply
Message
Author
sun_92
Posts: 27
Joined: Sat Apr 07, 2018 12:59 am
Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Error compiling COAWST

#1 Unread post by sun_92 »

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....

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

Re: Error compiling COAWST

#2 Unread post by kate »

Could you look at your diag.F to see how Nreduce is set and used? My code has:

Code: Select all

#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: Select all

#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

sun_92
Posts: 27
Joined: Sat Apr 07, 2018 12:59 am
Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Re: Error compiling COAWST

#3 Unread post by sun_92 »

! 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

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

Re: Error compiling COAWST

#4 Unread post by kate »

You need to change yours to look like mine for it to compile.

sun_92
Posts: 27
Joined: Sat Apr 07, 2018 12:59 am
Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Re: Error compiling COAWST

#5 Unread post by sun_92 »

Thank you, I'm doing it

Post Reply