problem of running coupled SWAN+ROMS, Error of Inlet_test

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
sflin
Posts: 3
Joined: Wed Oct 12, 2016 12:49 pm
Location: Dalhousie University

problem of running coupled SWAN+ROMS, Error of Inlet_test

#1 Post by sflin » Fri Dec 22, 2017 3:11 pm

Hi All,

While compiling other test cases (e.g. Upwelling)without coupling, I could run the model successfully. But when I tried to run Inlet_test case using the coupled SWAN+ROMS model with following configurations:

(1) Fortran Compiler: ifort/.2016.4.258
(2) MPI: Compiler/intel2016.4/openmpi/2.1.1/bin/mpif90
(3) Netcdf: netcdf/4.4.1.1
(4) MCT: I was able to configure/install the MCT using ifort & openmpi.

There was one error during the compiling. Is there anyone who knows how to solve it?


cd Build; /cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/intel2016.4/openmpi/2.1.1/bin/mpif90 -c -heap-arrays -fp-model precise -ip -O3 -I/home/sflin/MCT/include -nofree swanmain.f90
swanmain.f90(279): error #6404: This name does not have a type, and must have an explicit type. [CROSS]
IF (.NOT.ALLOCATED(CROSS)) ALLOCATE(CROSS(2,MCGRD)) 40.31
------------------------------^
swanmain.f90(279): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [CROSS]
IF (.NOT.ALLOCATED(CROSS)) ALLOCATE(CROSS(2,MCGRD)) 40.31
------------------------------^
swanmain.f90(281): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [CROSS]
IF (.NOT.ALLOCATED(CROSS)) ALLOCATE(CROSS(0,0)) 40.31
------------------------------^
swanmain.f90(283): error #6404: This name does not have a type, and must have an explicit type. [BSPECS]
IF (.NOT.ALLOCATED(BSPECS)) ALLOCATE(BSPECS(MDC,MSC,NBSPEC,2)) 40.31
---------------------------^
swanmain.f90(283): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [BSPECS]
IF (.NOT.ALLOCATED(BSPECS)) ALLOCATE(BSPECS(MDC,MSC,NBSPEC,2)) 40.31
---------------------------^
swanmain.f90(284): error #6404: This name does not have a type, and must have an explicit type. [BGRIDP]
IF (.NOT.ALLOCATED(BGRIDP)) ALLOCATE(BGRIDP(6*NBGRPT)) 40.31
---------------------------^
swanmain.f90(284): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [BGRIDP]
IF (.NOT.ALLOCATED(BGRIDP)) ALLOCATE(BGRIDP(6*NBGRPT)) 40.31
---------------------------^
swanmain.f90(296): error #6404: This name does not have a type, and must have an explicit type. [COMPDA]
IF(.NOT.ALLOCATED(COMPDA))
--------------------------^
swanmain.f90(296): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [COMPDA]
IF(.NOT.ALLOCATED(COMPDA))
--------------------------^
swanmain.f90(313): error #6404: This name does not have a type, and must have an explicit type. [AC1]
IF (.NOT.ALLOCATED(AC1)) THEN 40.41 40.31
------------------------------^
swanmain.f90(313): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [AC1]
IF (.NOT.ALLOCATED(AC1)) THEN 40.41 40.31
------------------------------^
swanmain.f90(315): error #6361: An array-valued argument is required in this context. [SIZE]
ELSE IF (SIZE(AC1).EQ.0) THEN 40.41
-------------------------^
swanmain.f90(330): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [AC1]
IF(.NOT.ALLOCATED(AC1)) ALLOCATE(AC1(0,0,0)) 40.31
-----------------------------^
swanmain.f90(372): error #6404: This name does not have a type, and must have an explicit type. [OURQT]
IF ( IT.EQ.IT0 .AND. .NOT.ALLOCATED(OURQT) ) THEN
----------------------------------------------^
swanmain.f90(372): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. [OURQT]
IF ( IT.EQ.IT0 .AND. .NOT.ALLOCATED(OURQT) ) THEN
----------------------------------------------^
compilation aborted for swanmain.f90 (code 1)
make: *** [Waves/SWAN/Src/Module.mk:15: Build/swanmain.o] Error 1


Following is the configuration in the makefile. The files of 'Linux-ifort.mk' and 'inlet_test.h' are also attached. Can anyone help me in this regard? Thank you in advance.



# svn $Id: makefile 757 2015-02-23 17:43:15Z arango $
#::::::::::::::::::::::::::::::::::::::::::::::::::::: Hernan G. Arango :::
# Copyright (c) 2002-2015 The ROMS/TOMS Group Kate Hedstrom :::
# Licensed under a MIT/X style license :::
# See License_ROMS.txt :::
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# :::
# ROMS/TOMS Framework Master Makefile :::
# :::
# This makefile is designed to work only with GNU Make version 3.80 or :::
# higher. It can be used in any architecture provided that there is a :::
# machine/compiler rules file in the "Compilers" subdirectory. You :::
# may need to modify the rules file to specify the correct path for :::
# the NetCDF and ARPACK libraries. The ARPACK library is only used in :::
# the Generalized Stability Theory analysis and Laczos algorithm. :::
# :::
# If appropriate, the USER needs to modify the macro definitions in :::
# in user-defined section below. To activate an option set the macro :::
# to "on". For example, if you want to compile with debugging options :::
# set: :::
# :::
# USE_DEBUG := on :::
# :::
# Otherwise, leave macro definition blank. :::
# :::
# The USER needs to provide a value for the macro FORT. Choose the :::
# appropriate value from the list below. :::
# :::
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

NEED_VERSION := 3.80 3.81 3.82 3.82.90 4.0 4.1 4.2.1
$(if $(filter $(MAKE_VERSION),$(NEED_VERSION)),, \
$(error This makefile requires one of GNU make version $(NEED_VERSION).))

#--------------------------------------------------------------------------
# Initialize some things.
#--------------------------------------------------------------------------

sources :=

#==========================================================================
# Start of user-defined options. In some macro definitions below: "on" or
# any other string means TRUE while blank (or spaces) is FALSE.
#==========================================================================
#
# The CPP option defining a particular application is specified below.
# See header file "ROMS/Include/cppdefs.h" for all available idealized
# and realistic applications CPP flags. For example, to activate the
# upwelling test case (UPWELLING) set:
#
# ROMS_APPLICATION ?= UPWELLING
#
# Notice that this makefile will include the associated application header
# file, which is located either in the "ROMS/Include" or MY_HEADER_DIR
# directory. This makefile is designed to search in both directories.
# The only constrain is that the application CPP option must be unique
# and header file name is the lowercase value of ROMS_APPLICATION with
# the .h extension. For example, the upwelling application includes the
# "upwelling.h" header file.

ROMS_APPLICATION ?= INLET_TEST

# If application header files is not located in "ROMS/Include",
# provide an alternate directory FULL PATH.

MY_HEADER_DIR ?=

# If your application requires analytical expressions and they are
# not located in "ROMS/Functionals", provide an alternate directory.
# Notice that a set analytical expressions templates can be found in
# "User/Functionals".
#
# If applicable, also used this directory to place your customized
# biology model header file (like fennel.h, nemuro.h, ecosim.h, etc).

MY_ANALYTICAL_DIR ?=

# Sometimes it is desirable to activate one or more CPP options to
# run different variants of the same application without modifying
# its header file. If this is the case, specify such options here
# using the -D syntax. For example, to write time-averaged fields
# set:
#
# MY_CPP_FLAGS ?= -DAVERAGES
#

MY_CPP_FLAGS ?=

# Activate debugging compiler options:

USE_DEBUG ?=

# If parallel applications, use at most one of these definitions
# (leave both definitions blank in serial applications):

USE_MPI ?= on
USE_OpenMP ?=

# If distributed-memory, turn on compilation via the script "mpif90".
# This is needed in some Linux operating systems. In some systems with
# native MPI libraries the compilation does not require MPICH type
# scripts. This macro is also convient when there are several fortran
# compiliers (ifort, pgf90, pathf90) in the system that use mpif90.
# In this, case the user need to select the desired compiler below and
# turn on both USE_MPI and USE_MPIF90 macros.

USE_MPIF90 ?= on

# If applicable, activate 64-bit compilation:

USE_LARGE ?= on

# If applicable, link with NetCDF-4 library. Notice that the NetCDF-4
# library needs both the HDF5 and MPI libraries.

USE_NETCDF4 ?= on

#--------------------------------------------------------------------------
# We are going to include a file with all the settings that depend on
# the system and the compiler. We are going to build up the name of the
# include file using information on both. Set your compiler here from
# the following list:
#
# Operating System Compiler(s)
#
# AIX: xlf
# ALPHA: f90
# CYGWIN: g95, df, ifort
# Darwin: f90, xlf
# IRIX: f90
# Linux: ftn, ifc, ifort, pgi, path, g95, gfortran
# SunOS: f95
# UNICOS-mp: ftn
# SunOS/Linux: ftn (Cray cross-compiler)
#
# Feel free to send us additional rule files to include! Also, be sure
# to check the appropriate file to make sure it has the right paths to
# NetCDF and so on.
#--------------------------------------------------------------------------

FORT ?= ifort

#--------------------------------------------------------------------------
# Set directory for executable.
#--------------------------------------------------------------------------

BINDIR ?= .

#==========================================================================
# End of user-defined options. See also the machine-dependent include
# file being used above.
#==========================================================================

#--------------------------------------------------------------------------
# Set directory for temporary objects.
#--------------------------------------------------------------------------

SCRATCH_DIR ?= Build
clean_list := core *.ipo $(SCRATCH_DIR)

ifeq "$(strip $(SCRATCH_DIR))" "."
clean_list := core *.o *.oo *.mod *.f90 lib*.a *.bak
clean_list += $(CURDIR)/*.ipo
endif
ifeq "$(strip $(SCRATCH_DIR))" "./"
clean_list := core *.o *.oo *.ipo *.mod *.f90 lib*.a *.bak
clean_list += $(CURDIR)/*.ipo
endif

#--------------------------------------------------------------------------
# Notice that the token "libraries" is initialize with the ROMS/Utility
# library to account for calls to objects in other ROMS libraries or
# cycling dependencies. These type of dependencies are problematic in
# some compilers during linking. This library appears twice at linking
# step (beggining and almost the end of ROMS library list).
#--------------------------------------------------------------------------

libraries := $(SCRATCH_DIR)/libUTIL.a
Attachments
inlet_test.h
(1.74 KiB) Downloaded 78 times
Linux-ifort.mk
(5.25 KiB) Downloaded 82 times

jcwarner
Posts: 876
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: problem of running coupled SWAN+ROMS, Error of Inlet_tes

#2 Post by jcwarner » Thu Jan 11, 2018 2:51 am

typically we dont modify the makefile. make changes to the build.bash or coawst.bash file, and run that bash file.
-john

Post Reply