Next: 3.16.2 Using genmake2
Up: 3.16 Customizing MITgcm
Previous: 3.16 Customizing MITgcm
Contents
Subsections
In the example above (section 3.5) we built the
executable in the input directory of the experiment for
convenience. You can also configure and compile the code in other
locations, for example on a scratch disk with out having to copy the
entire source tree. The only requirement to do so is you have genmake2 in your path or you know the absolute path to genmake2.
The following sections outline some possible methods of organizing
your source and data.
This is just as simple as building in the input/ directory:
% cd verification/exp2/code
% ../../../tools/genmake2
% make depend
% make
However, to run the model the executable (mitgcmuv) and input
files must be in the same place. If you only have one calculation to make:
% cd ../input
% cp ../code/mitgcmuv ./
% ./mitgcmuv > output.txt
or if you will be making multiple runs with the same executable:
% cd ../
% cp -r input run1
% cp code/mitgcmuv run1
% cd run1
% ./mitgcmuv > output.txt
Since the input directory contains input files it is often more
useful to keep input pristine and build in a new directory
within verification/exp2/:
% cd verification/exp2
% mkdir build
% cd build
% ../../../tools/genmake2 -mods=../code
% make depend
% make
This builds the code exactly as before but this time you need to copy
either the executable or the input files or both in order to run the
model. For example,
% cp ../input/* ./
% ./mitgcmuv > output.txt
or if you tend to make multiple runs with the same executable then
running in a new directory each time might be more appropriate:
% cd ../
% mkdir run1
% cp build/mitgcmuv run1/
% cp input/* run1/
% cd run1
% ./mitgcmuv > output.txt
Model object files and output data can use up large amounts of disk
space so it is often the case that you will be operating on a large
scratch disk. Assuming the model source is in /MITgcm then the
following commands will build the model in /scratch/exp2-run1:
% cd /scratch/exp2-run1
% ~/MITgcm/tools/genmake2 -rootdir=~/MITgcm \
-mods=~/MITgcm/verification/exp2/code
% make depend
% make
To run the model here, you'll need the input files:
% cp ~/MITgcm/verification/exp2/input/* ./
% ./mitgcmuv > output.txt
As before, you could build in one directory and make multiple runs of
the one experiment:
% cd /scratch/exp2
% mkdir build
% cd build
% ~/MITgcm/tools/genmake2 -rootdir=~/MITgcm \
-mods=~/MITgcm/verification/exp2/code
% make depend
% make
% cd ../
% cp -r ~/MITgcm/verification/exp2/input run2
% cd run2
% ./mitgcmuv > output.txt
Next: 3.16.2 Using genmake2
Up: 3.16 Customizing MITgcm
Previous: 3.16 Customizing MITgcm
Contents
mitgcm-support@dev.mitgcm.org
Copyright © 2002
Massachusetts Institute of Technology |
|
|