Version 14 (modified by raasch, 6 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 need to start either with #, %, IC:, OC:, EC:, BD:, or BDT:. Empty line are allowed too.

  • 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. Default values are either those which are set in the scripts palmrun and palmbuild or which are suggested in the template file.

Variable name meaning default value
base_directory Working directory from where palmrun or palmbuild is called. This folder must contain the configuration file .palm.config..... $HOME/palm/current_version
base_data Directory where the PALM I/O-files are stored. This variable is used in the file configuration file (see .palm.iofiles, and the description of this file). Since this variable is also used to determine file locations on remote hosts, it must use the ~ instead of $HOME. ~/palm/current_version/JOBS
source_path Path to PALM's FORTRAN source files. This is the place where the automatic installer has put the download, or which has been defined in the user's svn checkout command. $HOME/palm/current_version/trunk/SOURCE
user_source_path Path to the user interface routines. The variable jobname that is used in the default path is replaced by the argument given with palmrun-option -d. $base_directory/JOBS/$jobname/USER_CODE
fast_io_catalog Path to a file system with fast discs (if available). This folder is used so store the temporary catalog generated by palmrun during each run. It should also be used to store large I/O files (e.g. restart data or 3D-output) in order to reduce I/O time. This variable is used in the default .palm.iofiles for the restart data files. The folder must be accessible from all compute nodes, i.e. it must reside in a global file system. WARNING: /tmp will only work on single node systems! In case of batch jobs on remote hosts, the variable refers to a folder on the remote host. The variable has no default value and must be set by the user. no default value
local_jobcatalog Folder on the local host to store the batch job protocols. In case of batch jobs running on remote hosts, the job protocol will be created on the remote_jobcatalog and then be transferred via scp to the local_jobcatalog. $HOME/job_queue
remote_jobcatalog In case of batch jobs running on remote hosts, the job protocol will be put in this folder, and then automatically transferred via scp to the local_jobcatalog. The transfer is done by a separate small batch job, which directives are defined by the BDT: lines. The variable has no default value and must be set by the user. Absolute paths need to be given. Using $HOME is not allowed / does not work. no default value
local_ip IP-address of your local computer / the computer on which you call the palmrun/palmbuild command. You may use 127.0.0.0 if you are running PALM in interactive mode or in batch mode on your local computer. The address is only used to identify where to send the output data in case of batch jobs on a remote host. no default value
local_username Your username on the local computer / the computer on which you call the palmrun/palmbuild command. The local username is required for running batch jobs on a remote host in order to allow the batch job to access your local system (e.g. for sending back output data or for automatically starting restart runs). no default value
remote_ip IP-address of the remote system where the batch job shall be started. On large cluster systems this will usually be the address of a login node. Setting this variable in the configuration file will cause palmrun to run in remote batch job mode, i.e. a batch job will be created and send to the remote system automatically without giving palmrun-option -b. no default value
remote_username Your username on the remote computer that is given by remote_ip. no default value
ssh_key Filename from which the identity (private key) for public key authentication is read. This file is assumed to be in folder $HOME/.ssh. no default value
remote_loginnode Name of the login node of the remote computer. Nodes on big compute clusters are separated into compute nodes and login nodes (and sometimes I/O nodes). Some computer centers only allow the login nodes to establish ssh/scp connections to addresses outside the computing center. In such cases, since palmrun is executed on the compute nodes, it first has to send the output data to the login node, from where it is then forwarded to your local computer. If the compute nodes on your remote host do not allow direct ssh/scp connections to your local computer, you need to provide the name of the login node of the remote host. Typically, this is a mnemonic name like loginnode1 and not an IP-address (like 111.111.11.11). Several login nodes often exist. You just have to give one of them. If you do not provide a name, you probably will not receive data on your local host from the PALM run. no default value
defaultqueue Batch job queue to be used if no queue is explicitly given with palmrun option -q. no default value
submit_command Full path to the command that has to be used to submit batch jobs on your system (either on the local, or on the remote host), including required option. See documentation of your batch system / computing center to find out which command has to be used. An example for a moab batch system could be /opt/moab/default/bin/msub -E. If you only know the command name (e.g. msub), entering which msub on the local/remote host will give you the full path. no default value
compiler_name Name of the FORTRAN compiler to be used to create the PALM executable. Typically, this is the name of a wrapper script like mpif90 or e.g. ftn on Cray machines, which automatically invokes the required MPI library and MPI include file. If you don't have a wrapper script, you may need to explicitly give compiler options (see compiler_options) to provide paths to the library / include file. If you like to run PALM without MPI (serial mode, or OpenMP parallelization), you should not use a wrapper script and give the original compiler name instead. no default value
compiler_name_ser FORTRAN compiler name to create non-MPI executables. This name is required, because palmbuild generates several helper programs for pre-/post-processing, which run in serial mode on just one code. Here you give the original compiler name, like ifort, pgfortran, gfortran, or xlf95. no default value
cpp_options Preprocessor directives to be used for compiling the PALM code. They allow for conditional compilation using the -D compiler option. Compiling PALM with MPI support requires options -D__parallel -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION. Many compilers require to set an additional option to run the FORTRAN preprocessor on source files before compilation (e.g. -fpp for the Intel compiler). This option has to be given here too. Alternatively, you can provide it as part of the compiler_options. See cpp_options for a complete list of preprocessor define strings that are used in the PALM code. no default value
make_options Options for the UNIX make-command, which is used by palmbuild to compile the PALM code. In order to speed up compilation, you may use the -j option, which specifies the number of jobs to run simultaneously. If you have e.g. 4 cores on your local computer system, then -j 4 starts 4 instances of the FORTRAN compiler, i.e. 4 FORTRAN-files are compiled simultaneously (if the dependencies allow for that). Do not try to start more instances than the number of available cores, because this will decrease the compiler performance significantly. no default value
compiler_options Options to be used by the compiler that has been specified by compiler_name / compiler_name_ser in order to compile the PALM and utilities source code. Please see doc/app/recommended_compiler_options for recommended compiler options for specific compilers. Library paths do not have to be given here (although you can do that), but paths to INCLUDE files may need to be specified. no default value
linker_options Compiler options to be used to link the PALM executable. Typically, these are paths to libraries used by PALM, e.g. NetCDF, FFTW, MPI, etc. You may repeat the options that you have given with compiler_options here. See your local system documentation / software manuals for required path settings. Requirements differ from system to system and also depend on the respective libraries that you are using. See doc/app/recommended_compiler_options for specific path settings that we, the PALM group, are using on our computers. Be aware, that these settings probably will not work on your computer system. no default value
hostfile Name of the hostfile that is used by MPI to determine the nodes on which the MPI processes are started.

palmrun automatically generates the hostfile if you set auto. All MPI processes will then be started on the node on which palmrun is executed. The real name of the hostfile will then be set to hostfile (instead of auto) and, depending on your local MPI implementation, you may have to give this name in the execute_command. MPI implementations on large computer centers often do not require to explicitly specify a hostfile (in such a case you can remove this line from the configuration file), or the batch systems provides a hostfile which name you may access via environment variables (e.g. $PBS_NODEFILE) and which needs to be given in the execute_command. Please see your local system / batch system documentation about the hostfile policy on your system.
no default value
execute_command MPI command to start the PALM executable.
Please see your local MPI documentation about which command needs to be used on your system. The name of the PALM executable, usually the last argument of the execute command, must be palm. Typically, the command requires to give several further options like the number of MPI processes to be started, or the number of compute nodes to be used. Values of these options may change from run to run. Don't give specific values here and use variables instead which will be automatically replaced by palmrun with values that you have specified with respective palmrun options. As an example aprun -n {{mpi_tasks}} -N {{tasks_per_node}} palm will be interpreted as aprun -n 240 -N 24 palm if you call palmrun ... -X240 -T24 ....
no default value

# memory request per core #%memory 2300

# module commands to load required libraries #%module_commands module load fftw cray-hdf5-parallel cray-netcdf-hdf5parallel

# special commands to be carried out at login and start of batch jobs on the remote host #%login_init_cmd module switch craype-ivybridge craype-haswell

batch job directives

UNIX commands