Elmer > Elmer on Grids > Elmer on EGEE
Tehdyt toimenpiteet

Elmer on EGEE

Instructions and examples of running Elmer software on EGEE infrastructure

Elmer on EGEE

The Elmer software has been successfully installed and tested on CSC's lcg-CE  egee-ce.csc.fi and made available for members of the Earth Science Research (ESR) VO at $VO_ESR_SW_DIR/elmer. CSC encourages other VOs to start using Elmer. We also encourage Elmer installation at other EGEE sites.

The grid installation includes both serial and parallel versions. Software availability is advertised through the runtime environment:

GlueHostApplicationSoftwareRunTimeEnvironment: VO-esr-elmer-<VERSION>

in JDL file can be call as

Requirements = Member("VO-esr-elmer-5.5.0",other.GlueHostApplicationSoftwareRunTimeEnvironment);

Serial run on egee-ce.csc.fi

JDL file for submitting the serial job directly to egee-ce.csc.fi.

$ cat runElmer.jdl
Executable = "runElmer.sh";
StdOutput = "runElmer.out";
StdError = "runElmer.err";
InputSandbox = {"runElmer.sh", "inputfiles.tar.gz"};
OutputSandbox = {"runElmer.out","runElmer.err", "outputfiles.tar.gz"};
Requirements = other.GlueCEInfoHostName == "egee-ce.csc.fi";
RetryCount = 0;
ShallowRetryCount = 2;

The shell script to be executed on the working nodes


$ cat runElmer.sh
#!/bin/sh

# make sure that executable/input/output files names are
# consistent with the JDL file

# initialize the environment
source $VO_ESR_SW_DIR/elmer/setup.sh

# untar your input files
tar xfz inputfiles.tar.gz

# run Elmer
ElmerSolver;

# if everything is fine, archive the data to be picked up by
# the gLite middleware (should be the same as in the "OutputSandbox")
if [ $? ]; then
  tar cfz outputfiles.tar.gz Mesh/*;
else
  echo "ElmerSolver has finished with errors";
  exit 1;
fi

The $VO_ESR_SW_DIR/elmer/setup.sh takes care of the environment initialization. The variable $VO_ESR_SW_DIR is automatically set for all the grid pool accounts.

Note, that the inputfiles.tar.gz are to be prepared by the user and must be ready for running with Elmer right out of the box, i.e. after the untarring.

Also, make sure that the input/output/executable file names are the same in the JDL and shell script files.

Parallel run on egee-ce.csc.fi

Running Elmer in parallel requires a number of additional hooks. User must define the before and after functions in the shell script to be executed on the working node. The functions define the steps to be performed before and after the code execution.

$ cat runElmer_mpi.jdl
Type = "Job";
JobType = "MPICH";
CpuNumber = 4;
Executable = "runElmer_mpi.sh";
StdOutput = "runElmer_mpi.out";
StdError = "runElmer_mpi.err";
InputSandbox = {"runElmer_mpi.sh", "inputfiles.tar.gz"};
OutputSandbox = {"runElmer_mpi.out", "runElmer_mpi.err", "outputfiles.tar.gz"};
Requirements = other.GlueCEInfoHostName == "egee-ce.csc.fi";
RetryCount = 0;
ShallowRetryCount = 2;

The runElemer_mpi.sh is the one to be executed on the working node (the master node for the MPI jobs). The script can be adapted for the user needs.

$ cat runElmer_mpi.sh
#!/bin/sh

# make sure that executable/input/output files names are
# consistent with the JDL file

# the function to run before the job is executed
before() {
  echo "started on `date -R`"; echo;
  source $VO_ESR_SW_DIR/elmer/setup.sh || { echo "Can not source Elmer init file"; return 1; }

  # adapt here for your input files
  # note, the file name must be the same as in the "InputSandbox" in the JDL file
  tar xzf inputfiles.tar.gz || { echo "Can not untar the input files"; return 1; }
}

# the job itself defined as a variable
run='ElmerSolver_mpi';

# the function to run after the job has been executed
after() {
  tar czf outputfiles.tar.gz Mesh/*
  echo; echo "finished on `date -R`";
}

Note, that the initial mesh for the parallel and serial jobs differ.

Elmer on other EGEE sites

Currently, Elmer has been installed on CSC site only. Installation instructions for the site and VO managers and available on request.

References

The additional information about the EGEE infrastructure can be found from our local EGEE pages. See the links therein.

Degtyarenko Ivan Ivan.Degtyarenko at csc.fi