Version 6 (modified by raasch, 7 years ago) (diff)

--

This page is under construction!




The PALM configuration file

Running PALM with the palmrun script or compiling PALM with palmbuild requires a configuration file in the working directory from where the scripts are called. The configuration file contains information about

  • the compiler and compiler options to be used
  • paths to required libraries (e.g. MPI, netCDF, or fftw)
  • preprocessor directives to switch on/off special features of PALM
  • paths to be used for storing PALM's input and output files
  • paths where user-interface routines and job protocol files can be found
  • the execute command to be used for starting the PALM executable
  • settings of other UNIX environment variable
  • batch job directives
  • unix commands to be executed before / after the PALM code is started, or that should be carried out in case of errors that appeared during the run

If PALM has been successfully installed by the automatic installer, the installer creates a configuration file named .palm.config.default in the working directory of the user (which by default is assumed to be $HOME/palm/current_version). This file should contain all relevant information to run PALM on the respective computer.

The installer may fail for various reasons, e.g. because of mismatches in the user's system configuration. Problems may appear if the user has installed more than one FORTRAN compiler, and/or if the netCDF libraries have been generated with a different compiler than is used for compiling PALM. Furthermore, the automatic installer cannot be used on many larger computer systems where software (compilers, libraries) is managed via the module environment, or if you like to run batch jobs an a remote host. In all these cases, the user has to setup the configuration file manually.

How to generate a configuration file manually

As a first step, copy the default template of the configuration file (which is part of the PALM download) to your working directory:

  cd $HOME/palm/current_version
  cp trunk/SCRIPTS/.palm.config.default .

Configuration file format

The configuration file is an ASCII file which may be opened with any editor. The format of the file is simple:

  • lines starting with a # in the first column are comment lines
    # this is a comment line
    
  • lines starting with a % in the first column are defining unix environment variables used in palmrun and palmbuild.
    %var value of var
    
    means that a variable named var with value value of var is created. There must be at least one blank between the variable name and its value. The value may contain an arbitrary number of blanks. The value can contain already defined variables:
    %default_folder  /work/abcd
    %subfolder1  $default_folder/efgh
    
    which means that subfolder1 has the value /work/abcd/efgh. You can also use any variables that are already defined within the palmrun/palmbuild scripts. The most important one is jobname, which value is given with palmrun option -d, and which defines the so-called jobname. This variable is mentioned here because it is used in the default configuration files for naming I/O files and to better sort I/O files from different PALM runs in an organized folder structure. Beside the value replacement using the UNIX shell syntax (i.e. $abcd gives the value of variable abcd), another way to insert values of environment variables is to write them in double curly brackets, i.e. {{abcd}} will be replaced by the value of abce. This way of variable replacement is required for some special variables and in the job directives.
  • lines starting with IC: define any unix commands that are executed by palmrun just before the PALM code is started. A typical input command might be
    IC:ulimit -s unlimited
    
    to increase the system's stack size (if this is not unlimited by default), which is required for PALM runs with larger memory demands.
  • lines starting with OC: define unix commands that are executed by palmrun just after the PALM code has stopped. For example, you may inform yourself about termination of the program by sending an email:
    OC:echo "PALM simulation $jobname has finished" | mailx  username@email-address
    
  • lines starting with EC: define unix commands that shall be executed in case that the PALM code or the palmrun script terminated because of any kind of error. You can restrict execution of error commands to specific kinds of error:
    EC:[[     ]]  &&  error-command
    
  • lines starting with BD: define directives that are required for batch jobs, i.e. if PALM shall be run in batch mode. Explanations for batch directives are given further below.
  • lines starting with BDT: define directives for an additional batch job that is required in case of running PALM in batch mode on a remote host. This additional job transfers the job protocol file of the main PALM job back to the local host.

environment variables and their meaning

The default template contains settings for the minimum set of variables that always need to be defined, plus suggestions for other variables that you may need to uncomment, in case that you like/need to use them. The following table lists all relevant variables and their meaning.

| Name | meaning |

batch job directives