Skip to content

Commit

Permalink
GAMESS semaphores
Browse files Browse the repository at this point in the history
  • Loading branch information
heatherkellyucl committed Jun 25, 2024
1 parent 4ec6f0c commit 1b5dc9b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions mkdocs-project-dir/docs/Software_Guides/Other_Software.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,56 @@ module load gamess/5Dec2014_R1/intel-2015-update2
# By default, the module sets it to ~/Scratch/gamess/randomLabel
export GAMESS_USERSCR=$TMPDIR
# removes any of the user’s semaphore arrays that were left from previous
# jobs on this node. Use if you are using a whole number of nodes.
ipcrm -a sem
rungms exam01.inp 00 $NSLOTS $(ppn)
# removes all of the user’s semaphore arrays.
# Use if you are using a whole number of nodes.
ipcrm -a sem
```

#### Semaphores

GAMESS uses semaphore arrays and leaves these on the nodes where it has been running. This can
cause problems for your next jobs or for jobs from other users.

You will get errors like this if there are not enough semaphores available:

```
DDI Process 12: semget return an error.
semget errno=ENOSPC -- check system limit for sysv semaphores.
```

These lines in the script above will clean up the semaphores belonging to your user on the
node that you are on:

```
# removes all of the user’s semaphore arrays.
# Use if you are using a whole number of nodes.
ipcrm -a sem
```

Putting this before and after your GAMESS run ought to make sure that no semaphores from you are
left over, providing your job completes and exits.

On clusters where you can run multiple jobs per node, running this will cause you problems
between your own jobs, because it would delete your second job's semaphore arrays too. In that
case, you have two options. You can limit your GAMESS jobs to only running one after the other:

```
# submit a job that will only start after job 12345 ends
qsub -hold_jid=12345
```

Or you can request exclusive use of the node you are using so nothing else runs there (if you do
this, do use all of the cores available in the node if possible so they are not wasted):

```
# request exclusive use of this node so that no other jobs run on it
#$ -ac exclusive
```

#### Troubleshooting GAMESS
Expand Down

0 comments on commit 1b5dc9b

Please sign in to comment.