Mon, 5 Jan 2009
FRE on multiple platforms
I am trying to find a quick path to running FRE on multiple platforms
("portable FRE"). The immediate need is to get us up and running —
production, development, regression testing — on multiple platforms
such as the HPCS and the DOE machines.
We foresaw the need for a platform tag but so far have not used it for
much. I've revived this tag within the setup node: for instance, see
/home/vb/fre/xml/CM2.4C_static_v2.xml,
<platform name="pathscale">
<directory type="root">$HOME/fre/perth/CM2.4</directory>
<directory type="site">$HOME/fre/site</directory>
<mkmfTemplate file="$HOME/fre/site/mkmf.template.x86_64" />
<csh>
source $MODULESHOME/init/csh
module switch PrgEnv-pgi PrgEnv-pathscale
module load netcdf-pathscale
module list
</csh>
</platform>
<platform name="pgi">
<directory type="root">$HOME/fre/perth/CM2.4</directory>
<directory type="site">$HOME/fre/site</directory>
<mkmfTemplate file="$HOME/fre/site/mkmf.template.pgi" />
<csh>
source $MODULESHOME/init/csh
module load netcdf
module list
</csh>
</platform>
<platform name="hpcs">
<directory type="root">$HOME/fre/perth/CM2.4</directory>
<directory type="archive">/archive/$USER/fre/perth/CM2.4</directory>
<directory type="site">$HOME/fre/site</directory>
<directory type="work">$TMPDIR</directory>
<directory type="analysis">/net2/$USER/fre/perth/CM2.4</directory>
<!-- <project>gscip</project> -->
<mkmfTemplate file="$HOME/fre/site/mkmf.template.ia64_flt" />
<csh>
source /opt/modules/default/init/tcsh
module purge
module load modules
module load ifort.9.1.051
module load icc.9.1.045
module load scsl-1.5.1.0
module load idb.9.0.12
module load totalview_730-0
module load mpt-1.14
module load netcdf-3.6.2
</csh>
<getFmsData>/home/bw/fms/scripts/get_fms_data_hadisst</getFmsData>
<fmsRelease>perth</fmsRelease>
</platform>
- Notice that
platform now allows you to set script defaults on a
per-platform basis, including picking the mkmfTemplate. The code in
FRE.pm is now written so that if it doesn't find a platform node
under setup, it uses setup itself. This code construct could be
used to add new tags fairly easily:
# read the setup node
my $setup = $root{$fre}->findnodes('setup')->get_node(1);
# read the platform node into $base
my $base = $setup->findnodes("platform[\@name=\"$platform\"]")->get_node(1)
|| $setup; # this will provide backward-compatibility
- The
platform is understood to mean the complete hardware/software
environment. (pathscale and pgi pick two different compiler options
available on the Cray machines at DOE: we don't know yet which is
better).
- I've modified
fremake and frerun to use a new command-line option
to pick which platform to run on (no default). With this, the same
FRE input file will work on any platform. One question about the
CuratorDB: it needs to record which platform you actually used: how
do we record this? Does the "canonical XML" FRE file only record
the one platform tag that was used?
- Site-specific command syntax (e.g
qsub for interacting with the
scheduler; mpirun vs. aprun for launching a parallel job, is
encoded in the site config file (currently site/fre.cshrc).
- To make
frerun fully functional on the DOE machines, we need the
access to input files to be platform-dependent. We have also talked
about "versioning" of input files. I'm wondering if it's possible
to do a quick implementation of the dataFile node from FRE4?
<dataFile target="INPUT/foo" source="/full/path/foo" checkSum timeStamp>
- Should this line be enclosed in a
platform tag? or should it have a
platform attribute?
- do we need the
label attribute, or is target sufficient?
- I'm hoping it will be possible to implement this new feature
without losing backward compatibility, as done for the
setup/platform tags.