Comsol files in the home directory

From ScientificComputing
Jump to: navigation, search

Temp directory

COMSOL stores temporary data in /tmp which should not be used on the cluster. There is an option to specify a different path and this should be set to $TMPDIR, which is created by the batch system for each job. If $TMPDIR is used, some scratch space needs to be reserved for the job (-R "rusage[scratch=XXXX]"). Please find here an example for the usage of $TMPDIR

bsub -n 4 -W 36:00 -R "rusage[mem=2048, scratch=5000]" "comsol batch -tmpdir \$TMPDIR -clustersimple -inputfile infile.mph -outputfile outfile.mph"

Note: There are quotes around the entire COMSOL command and the $ needs to be masked with a \.

Configuration directory

COMSOL stores configuration information in the directory configuration that is located in $HOME/.comsol. It creates a huge number of directories for each COMSOL job, which can at some point create a problem with the file/directory quota of 100'000 for home directories. It is possible to change the location where the configuration files are saved with the command line option -configuration. Please find below an example where these files are written to $TMPDIR.

bsub -n 4 -W 36:00 -R "rusage[mem=2048, scratch=5000]" "comsol batch -configuration \$TMPDIR/configuration/comsol_@process.id -clustersimple -inputfile infile.mph -outputfile outfile.mph"

Workspace directory

When a COMSOL job is running, it saves temporary files to the workspace directory located in $HOME/.comsol. This can be avoided by redirecting these file to $TMPDIR for instance. Please find below an example

bsub -n 4 -W 36:00 -R "rusage[mem=2048, scratch=5000]" "comsol batch -data \$TMPDIR/data/comsol_@process.id -clustersimple -inputfile infile.mph -outputfile

Recovery directory

COMSOL saves recovery files in a hidden directory $HOME/.comsol/recovery. Because your home directory is subject to a quota, we recommend to either change the location where the recovery files are saved, or to entirely disable this feature. The options for the recovery files can either be changed in the COMSOL preferences window (permanent) or on the command line, when submitting a job (only for this particular job).

Comsol files preferences.png

In order to permanently disable the recovery feature, uncheck the check box Save recovery file in the COMSOL preferences window. If you would like disable the recovery option just for a particular job, then please add the -autosave off option to your COMSOL command:

bsub -n 4 -W 36:00 -R "rusage[mem=2048, scratch=5000]" "comsol batch -autosave off -clustersimple -inputfile infile.mph -outputfile outfile.mph"

If the recovery files should be stored temporarily, then saving them in your personal scratch directory would be an option:

bsub -n 4 -W 36:00 -R "rusage[mem=2048, scratch=5000]" "comsol batch -recoverydir /cluster/scratch/\$USER -clustersimple -inputfile infile.mph -outputfile outfile.mph"

Redirecting almost all files from $HOME/.comsol to $TMPDIR

We strongly recommend to redirect all files and directories from $HOME/.comsol to a different location (e.g.,$TMPDIR). The COMSOL part of the command should in this case look like (replacing -recoverydir with -prefsdir):

"comsol batch -clustersimple -tmpdir \$TMPDIR -configuration \$TMPDIR/configuration/comsol_@process.id -data \$TMPDIR/data/comsol_@process.id -prefsdir \$TMPDIR/preferences/comsol_@process.id -inputfile infile.mph -outputfile outfile.mph"