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....
Error compiling COAWST
Re: Error compiling COAWST
Could you look at your diag.F to see how Nreduce is set and used? My code has:
Then later:
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
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
-
- Posts: 27
- Joined: Sat Apr 07, 2018 12:59 am
- Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Re: Error compiling COAWST
! 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
!
#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
Re: Error compiling COAWST
You need to change yours to look like mine for it to compile.
-
- Posts: 27
- Joined: Sat Apr 07, 2018 12:59 am
- Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Re: Error compiling COAWST
Thank you, I'm doing it