[Mitgcm-support] Re: internal_wave
mitgcm-support at dev.mitgcm.org
mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:55:13 EDT 2003
Hi Theo,
I think the README is out of date. The steps you should follow are
outlined
here
http://mitgcm.org/sealion/online_documents/node90.html (reproduced
below)
For this procedure to work on a NEC platform, the genmake script needs
an entry
for that platform (if you're happy to send it to us we will add it to
the
list already in there). The manual section
http://mitgcm.org/sealion/online_documents/node92.html
describes how to add a new platform setting to genmake. The example
in the genmake file for case SP3: shows many of the different options.
These are normally enough.
I did a quick check of the relase1_p9/verification/internal_wave
compile and run on a local Linux machine. It came out with the
expected KE values etc... so I think its just the README
problem.
Chris
>
>
>
> 3.5 Building the code
>
> To compile the code, we use the make program. This uses a file (Makefile) that allows us to
> pre-process source files, specify compiler and optimization options and also figures out any file
> dependencies. We supply a script (genmake), described in section 3.5.2, that automatically
> creates the Makefile for you. You then need to build the dependencies and compile the code.
>
> As an example, let's assume that you want to build and run experiment verification/exp2. The are
> multiple ways and places to actually do this but here let's build the code in
> verification/exp2/input:
>
> % cd verification/exp2/input
>
> First, build the Makefile:
>
> % ../../../tools/genmake -mods=../code
>
> The command line option tells genmake to override model source code with any files in the
> directory ./code/.
>
> If there is no .genmakerc in the input directory, you have to use the following options when
> invoking genmake:
>
> % ../../../tools/genmake -mods=../code
>
> Next, create the dependencies:
>
> % make depend
>
> This modifies Makefile by attaching a [long] list of files on which other files depend. The purpose
> of this is to reduce re-compilation if and when you start to modify the code. make depend also
> created links from the model source to this directory.
>
> Now compile the code:
>
> % make
>
> The make command creates an executable called mitgcmuv.
>
> Now you are ready to run the model. General instructions for doing so are given in section 3.6.
> Here, we can run the model with:
>
> ./mitgcmuv > output.txt
>
> where we are re-directing the stream of text output to the file output.txt.
Theo Gerkema wrote:
>
> Dear Chris,
>
> Many thanks for your reply and for asking Sonya to help us;
> her help will be much appreciated!
>
> I'm sorry to bother you with technical questions concerning
> the code, but I'm rather stuck at the moment and would be most
> grateful if you or one of your collegues could give me a suggestion on
> how to proceed.
>
> I've been trying to run the internal_wave example by following the
> instructions in verification/internal_wave/README, but
> encountered some problems. One of which was that I could not find
> the file /verification/internal_wave/code/set_obcs.F which was to
> be copied to /model/src/, so I've taken the file named most
> similarly instead (/code/obcs_calc.F), without of course quite
> knowing what the consequences are.
> Furthermore, when trying to make an executable (in bin), it appeared
> that the file verification/internal_wave/code/CPP_EEOPTIONS.h
> was needed, which I've then copied to eesupp/inc/.
> The executable could then be made, and a run was done (20 time steps).
> However, when I compared the outcome with the test results
> (/verification/internal_wave/results/output.txt), there appeared to be
> gigantic differences, for example, after 20 steps
> ke_volint = 1.4100262662647E+02 in the test example
> whereas my run gives
> ke_volint = 2.4735222463419E-17
>
> The differences may be due to the above two modifications with
> respect to the README file, but I don't see how I could verify this.
> Another potential source of problems may be that we have had to
> change a number of things in the Makefile by hand, in order to run it at
>
> the supercomputer (NEC SX-5, Idris centre). This involves a change
> in the path of the CPP = statement, an addition for the C-compiler
> (CC=sxcc),
> changes in "f77" (becoming: sxmpif90) -- all of which I think are
> harmless -- and a removal of all flags after FFLAGS=
> and FOPTIM=
> (Whether these last two things can be done with impunity I'm less sure
> of,
> but we were advised to do so; in fact, we were unable make an executable
> when
> they were included).
>
> Could you (or one of your collegues) give me some advice on how to
> make the code run for this example? Many thanks.
>
> Best regards, Theo.
More information about the MITgcm-support
mailing list