[MITgcm-support] lsopt / optim routines

Andrew McRae andrew.mcrae at physics.ox.ac.uk
Tue Mar 20 14:46:49 EDT 2018


Are these run as part of the daily builds?  I can't get it to build.

Following part 3.18.4.2 of the .pdf manual (I don't think this section has
been ported online yet)...

In lsopt/, the supplied blas libraries are 10+ years old and my compiler
says the Pentium 4 blas1 library is incompatible.

In optim/, "make depend" doesn't work (makedepend undefined).

"make" obviously causes the compiler to complain about -lblas1 not existing.

After changing the makefile to use -lblas instead of -lblas1, "make" gives
the output

f77 -o optim.x  optim_main.o optim_sub.o optim_numbmod.o optim_initmod.o
optim_readdata.o optim_writedata.o optim_write_control.o xerbla.o simul.o
-L. -L../lsopt/ -llsopt_ecco -lblas
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o: In
function `_start':
(.text+0x20): undefined reference to `main'
optim_numbmod.o: In function `optim_numbmod_':
optim_numbmod.f:(.text+0x1ff1): undefined reference to `ilnblnk_'
optim_numbmod.f:(.text+0x2478): undefined reference to `ilnblnk_'
collect2: error: ld returned 1 exit status
Makefile:78: recipe for target 'optim.x' failed
make: *** [optim.x] Error 1

And this just looks like broken code rather than anything BLAS-related.  An
undefined reference to main, and two undefined references to ilnblnk.

ilnblnk is defined with
c     == external ==
      integer  ilnblnk

Then used twice as
il = max(ilnblnk(record),1)

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20180320/e1923c24/attachment.html>


More information about the MITgcm-support mailing list