The National Institute for Computational Sciences

Darter: How do I enable the creation of a coredump file when a program crashes in the compute node?

In order to enable the creation of a coredump file when a program crashes in the compute node of a CRAY system like Darter, the following command should be added to the job script before the aprun call:

Bourne shellulimit -c unlimited
C shelllimit coredumpsize unlimited

 

For example if using a Bourne like job scrip, the script will look like:

#PBS MY_PROJECT
#PBS -l size=16,walltime=00:05:00
#PBS -S /bin/bash

cd $PBS_O_WORKDIR

ulimit -c unlimited

aprun -n 4 ./helloWorld

 

In the previous example, if program 'helloworld' crashes (for example, due a segmentation fault), a coredump file named 'core' will be created in the same directory where the program is located.

 

Note: Using the compiler option '-g' at compile time, will add debugging information to the executable that will facilitate figuring out the location in the source code where the program crashed.