| 169 | Any 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, can be specified in the configuration file. Add string {{{IC:}}}, {{{OC:}}}, or {{{EC:}}} at the beginning of the respective command. |
| 170 | |
| 171 | Input commands are often used for specific environment settings that are required to run PALM, e.g. |
| 172 | {{{ |
| 173 | IC:export ATP_ENABLED=1 |
| 174 | IC:export MPICH_GNI_BTE_MULTI_CHANNEL=disabled |
| 175 | IC:export MPICH_ENV_DISPLAY=1 |
| 176 | IC:export MPICH_MEMORY_REPORT=1 |
| 177 | IC:ulimit -s unlimited |
| 178 | }}} |
| 179 | On many systems, the stack size is limited by default and needs to be extended to allow for runs with larger memory requests (i.e. larger number of grid points). Settings for MPI optimization or debugging should be done here, too. Commands are carried out immediately before the PALM executable is started via the command given by {{{execute_command}}}. |
| 180 | |
| 181 | Output commands are carried out immediately after the PALM executable has finished, and before the output files are copied. A typical example would be to send a message as a reminder that execution has finished: |
| 182 | {{{ |
| 183 | OC:echo "PALM simulation $jobname has finished" | mailx username@email-address |
| 184 | }}} |
| 185 | |
| 186 | Error commands may be used for debugging. They are carried out if {{{palmrun}}} terminates with messages starting with{{{+++}}}, like {{{+++ runtime error occured}}}. The internal {{{palmrun}}} variable {{{locat}}} is used to specify the location within the {{{palmrun}}} script where the error appeared. It can be used to restrict the execution of the error command, e.g. |
| 187 | {{{ |
| 188 | EC:[[ \$locat = execution ]] && cat RUN_CONTROL |
| 189 | }}} |
| 190 | In this example, the content of the run control (if there is any) is output on the terminal or to the job protocol file, in case that PALM finished with a runtime error (e.g. segmentation fault). |