[MITgcm-devel] weird problem with pgf77 on xd1, ptracers, mdsio, and adjoint
Martin Losch
mlosch at awi-bremerhaven.de
Mon May 15 05:00:24 EDT 2006
Hi there,
I am having a strange problem: I have declared three additional
global fields in the ptracers package (one is 2D, 2 are 3D + bibj)
that are supposed to hold constant values read from a file in
ptracers_initialize (fixed values from TAF's point of view). For that
I have declared three additional CHARACTER arrays
PTRACERS_weightsFile, PTRACERS_botFluxFile, and PTRACERS_decayFile
(analogously to PTRACERS_initialFile, etc.). The are set to ' ' in
ptracers_readparms and then read from the namelist file
data.ptracers. PTRACERS_num=1.
I use the adjoint, with a lot of memory (32*1.7GB), so that I have to
use the "-mcmodel=medium" option of the pgf77 compiler.
Now the funny thing: When I specify only PTRACERS_initialFile and
PTRACERS_weightsFile in data.ptracers, everything works the way it
should. When I in addition specify PTRACERS_botFluxFile, things get
hairy. All namelist parameters have the correct values after reading
the namelist, and things such as the botFluxFile are read correctly,
but now the initialization of the (in TAF's sense active) variables
do not work. Different problems appear:
1. mdsreadfield tells me that it opens the correct file
MDSREADFIELD: open global file: Fe.init
but then terminates with an error message such as
File not found: ????.0000000000.001.001.data.
2. or when I change the order in the common blocks in PTRACERS.h,
this happens:
> PGFIO-F-219/formatted write/internal file/attempt to read/write
> past end of record.
> In source file ctrl_map_ini.f, at line number 5040
line number 5040 in ctrl_map_ini.f is benign:
> write(fnamegeneric(1:80),'(2a,i10.10)')
> & xx_theta_file(1:il),'.',optimcycle
but xx_theta_file(1:il) is empty (although set to 'xx_theta' in
data.ctrl). Again, all these problems go away, when I do not specify
the new namelist variable PTRACERS_botFluxFile(1) in data.ptracers.
Clearly something with the pgi-compiler's way of handling the memory
is screwed up. But what can I do to get rid of this problem? Split
the common blocks in PTRACERS.h to have one field per common block?
Is there a pgf77 compiler option that uses "safe" memory allocation?
Martin
PS. I have attached my PTRACERS.h and ptracers_readparms.F, the opt
file is linux_amd64_pgf77+mpi_xd1 plus the addtional FFLAG -
mcmodel=medium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptr.tgz
Type: application/octet-stream
Size: 174 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20060515/2d60d9a5/attachment.obj>
-------------- next part --------------
More information about the MITgcm-devel
mailing list