[slurm-users] Epilog script does not execute

510 views
Skip to first unread message

Purvesh Parmar

unread,
Jul 16, 2022, 3:08:02 AM7/16/22
to Slurm User Community List
Hi,

I have written a shell script with name epilog-test. I have mentioned in the slurm.conf file :
Epilog=/var/slurm/etc/epilog-test
The same slurm.conf file has been copied on all the nodes. 

My epilog-test is

#! /bin/bash
echo "epilog test" > /tmp/testfile

Chmod +x epilog-test

I have restarted slurmctld on master and slurmd on the nodes. Then I have tested jobs, but nothing executes after job is over.

Please help

Regards,
Purvesh

Purvesh Parmar

unread,
Jul 18, 2022, 6:30:42 AM7/18/22
to Slurm User Community List
Hi,

I have written a shell script with the name epilog-test. I have mentioned in the slurm.conf file :

Epilog=/var/slurm/etc/epilog-test
The same slurm.conf file has been copied on all the nodes.

My epilog-test is

#! /bin/bash
echo "epilog test" > /tmp/testfile

Chmod +x epilog-test

I have restarted slurmctld on master and slurmd on the nodes. Then I have tested jobs, but nothing executes after the job is over.

Please help

Regards,
Purvesh

Sarlo, Jeffrey S

unread,
Jul 18, 2022, 6:47:56 AM7/18/22
to Slurm User Community List
It could be because the epilog script doesn't have a PATH set by default for security, so maybe it isn't finding the commands echo or chmod


Do you have /var/slurm/etc/epilog-test on your nodes?

Jeff

From: slurm-users <slurm-use...@lists.schedmd.com> on behalf of Purvesh Parmar <purves...@gmail.com>
Sent: Monday, July 18, 2022 5:29 AM
To: Slurm User Community List <slurm...@lists.schedmd.com>
Subject: Re: [slurm-users] Epilog script does not execute
 

mercan

unread,
Jul 18, 2022, 7:42:40 AM7/18/22
to Slurm User Community List, Purvesh Parmar
Hi;

The Epilog script will be invoked by slurm user at job's node. Who is
your slurm user? Did the slurm user have right to read & execute your
epilog script. Did you check slurmctld logs?

Also, instead of the using the /tmp directory, if you can use a shared
directory, you can look for the file at single directory.

Regards,

Ahmet M.

Hermann Schwärzler

unread,
Jul 18, 2022, 7:52:18 AM7/18/22
to slurm...@lists.schedmd.com
Hi Purvesh,

which version of Slurm are you using?
In which OS-environment?

The epilog script is run *on every node when a user's job completes*.

So:
* Do you have copied your epilog script to all of your nodes?
* Did you look at /tmp/ on nodes a job ran recently to see if there is
any output of your script (you might have to do a "find /tmp -name
testfile" as root)?

Do you want to run your script upon job completion *on the "master"
node*? If yes, use

EpilogSlurmctld=/var/slurm/etc/epilog-test

in your slurm.conf.

Regards,
Hermann
Reply all
Reply to author
Forward
0 new messages