[MITgcm-support] optim.x build problems on ARCHER, using MITgcm c65i and OpenAD

Dan Jones dcjones.work at gmail.com
Thu Sep 8 10:48:13 EDT 2016


Hi all,

I am having trouble building optim.x on ARCHER.  Chances are good that I'm
doing something silly.  All of my errors are variable declaration errors of
the form:

*****

     & ,xx_hfluxm_file

        ^

ftn-113 crayftn: ERROR OPTIM_NUMBMOD, File = optim_numbmod.f, Line = 881,
Column = 9

  IMPLICIT NONE is specified in the local scope, therefore an explicit type
must be specified for data object "XX_HFLUXM_FILE".

*****

Checking size.h, I see that many of the "xx_" control files require the
ECCO_CTRL_DEPRECIATED flag to be defined, which I have done in
CTRL_OPTIONS.h:

     #define ECCO_CTRL_DEPRECATED

Yet the compiler can't see the explicit type definitions. This same error
occurs using any of ARCHER's three compiling environments (cray, intel,
gnu).  Any suggestions on how to fix this?

On a possibly unrelated note, I'm relying on ARCHER modules to locate the
BLAS library, which in principle it should be able to do...

I've attached my entire Makefile below for reference.  I *was* able to
compile the lsopt library without incident (well, at least I can say that
the *.a file was created).

-Dan

--------------------------------------------------------------
Dr Dan Jones
Polar Oceans Team
British Antarctic Survey
--------------------------------------------------------------

*** Makefile for reference ***


#***********************************************************************
# Makefile for the ECCO off-line large scale optimization.
#
# started: Patrick Heimbach heimbach at mit.edu 19-Jun-2000
#
# changed:
#
#***********************************************************************

# The optimization routines.
SRC = optim_main.F \
optim_sub.F \
optim_numbmod.F \
optim_initmod.F \
optim_readdata.F \
optim_writedata.F \
optim_write_control.F \
xerbla.F                        \
simul.F

EXEDIR     = ./

# Location of cpp preprocessor
# default is (Linux)
CPP             = cat $< | /lib/cpp -P -traditional
# on SUNOS
# CPP = cat $< | /usr/ccs/lib/cpp

INCLUDEDIRS     = -I. \
                  -I../experiments/ecse_global_oce_optim/build_oad/

LIBDIRS         = -L. \
                  -L../lsopt/

LIBS            = -llsopt_ecco \
 -lblas1

# OPTMODE is either equal to OFFLINE or ONLINE
OPTMODE         = OFFLINE
EXECUTABLE      = $(EXEDIR)optim.x

# The cpp flags.
CPPFLAGS = -DREAL_BYTE=4 \
-DMAX_INDEPEND=1000000 \
-D_RL='double precision' \
-D_RS='double precision' \
-D_d='D' \
-D$(OPTMODE)

#                -DMAX_INDEPEND=293570968        \
# FORTRAN compiler and its flags.
# default is (Linux)
#FC              = f77
FC              = ftn

# ifort compilers
#FC              = ifort
#FFLAGS          = -mp -132 -r8 -i4 -w95 -W0 -WB -CB -fpe0 -traceback
-convert big_endian -assume byterecl

# SGI o3k IRIX64
#FC              = f77
#FFLAGS          = -extend_source -bytereclen -mips4 -r8 -static

# AER cluster
#FC = /opt/mpich/bin/mpif77
#FFLAGS = -byteswapio -r8 -Mnodclchk -Mextend

# File removal.
RM = rm -f

SMALLF      = $(SRC:.F=.f)
OBJECTS     = $(SRC:.F=.o)

.SUFFIXES: .o .f .F

all: small_f $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS)

small_f: $(SMALLF)

depend:
makedepend -o .f $(INCLUDEDIRS) $(SRC)

# The normal chain of rules is (  .F - .f - .o  )
.F.f:
$(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
xerbla.f: xerbla.F
$(CPP) $(INCLUDEDIRS) > $@
.f.o:
$(FC) $(FFLAGS) -c $<

# Cleaning options.
clean:
$(RM) $(EXEDIR)optim.x *.o *.f

scratch:
$(RM) OPWARMD OPWARMI $(EXEDIR)optim.x $(OBJ)

# DO NOT DELETE

optim_main.f: blas1.h
optim_sub.f: ../experiments/ecse_global_oce_optim/build_oad/EEPARAMS.h
optim_sub.f: ../experiments/ecse_global_oce_optim/build_oad/SIZE.h
optim_sub.f: ../experiments/ecse_global_oce_optim/build_oad/ctrl.h optim.h
optim_numbmod.f: ../experiments/ecse_global_oce_optim/build_oad/EEPARAMS.h
optim_numbmod.f: ../experiments/ecse_global_oce_optim/build_oad/SIZE.h
optim_numbmod.f: ../experiments/ecse_global_oce_optim/build_oad/ctrl.h
optim_numbmod.f: optim.h minimization.h
optim_initmod.f: ../experiments/ecse_global_oce_optim/build_oad/EEPARAMS.h
optim_initmod.f: ../experiments/ecse_global_oce_optim/build_oad/SIZE.h
optim_initmod.f: ../experiments/ecse_global_oce_optim/build_oad/ctrl.h
optim_initmod.f: optim.h
optim_readdata.f: ../experiments/ecse_global_oce_optim/build_oad/EEPARAMS.h
optim_readdata.f: ../experiments/ecse_global_oce_optim/build_oad/SIZE.h
optim_readdata.f:
../experiments/ecse_global_oce_optim/build_oad/ECCO_CPPOPTIONS.h
optim_readdata.f: ../experiments/ecse_global_oce_optim/build_oad/ctrl.h
optim_readdata.f: optim.h minimization.h
optim_writedata.f: ../experiments/ecse_global_oce_optim/build_oad/EEPARAMS.h
optim_writedata.f: ../experiments/ecse_global_oce_optim/build_oad/SIZE.h
optim_writedata.f:
../experiments/ecse_global_oce_optim/build_oad/ECCO_CPPOPTIONS.h
optim_writedata.f: ../experiments/ecse_global_oce_optim/build_oad/ctrl.h
optim_writedata.f: optim.h minimization.h
optim_write_control.f:
../experiments/ecse_global_oce_optim/build_oad/EEPARAMS.h
optim_write_control.f: ../experiments/ecse_global_oce_optim/build_oad/SIZE.h
optim_write_control.f: ../experiments/ecse_global_oce_optim/build_oad/ctrl.h
optim_write_control.f: optim.h
simul.f: ../experiments/ecse_global_oce_optim/build_oad/EEPARAMS.h
simul.f: ../experiments/ecse_global_oce_optim/build_oad/SIZE.h
simul.f: ../experiments/ecse_global_oce_optim/build_oad/ctrl.h

*** End Makefile ***
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20160908/4bc38291/attachment-0001.htm>


More information about the MITgcm-support mailing list