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

Martin Losch martin.losch at awi.de
Thu Sep 8 19:22:44 EDT 2016


Dan,

I don’t have an answer to this, because I haven’t used the optim-package in a long time, a quick look tells me that the long name list in optim_nummod is not really necessary for the sake of the program but rather for some legacy reasons.
But I suggest that you try this version
http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/mlosch/optim_m1qn3
(cvs YOUROPTIONS co MITgcm_contrib/mlosch/optim_m1qn3)
which I hope is not tied as much into the details of your MITgcm configuration (you still need the correct SIZE.h, ctrl.h etc). I haven’t kept it up to date with recent developments (and in fact haven’t used it for that time, and never with openad output, but that shouldn’t matter), but I think it should still work. Good luck.

Martin

> On 08 Sep 2016, at 08:48, Dan Jones <dcjones.work at gmail.com> wrote:
> 
> 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 ***
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list