Hi,
how to do pbspro job cleanup by using epilogue or hook, we are using ansys application
regards
deepak
Hi,
how to do pbspro job cleanup by using epilogue or hook, we are using ansys application
regards
deepak
Please create a file called “epilogue” in $PBS_HOME/mom_priv/ on all the compute nodes.
Please give the executable permission chmod +x $PBS_HOME/mom_priv/epilogue
Place the below contents in the file :
#!/bin/bash
echo "From the epilogue script" > /tmp/$1_epilogue.txt
echo $@ >> /tmp/$1_epilogue.txt
Run a sample job and you would see the /tmp/XXX_epilogue.txt being populated.
You can implement the logic to cleanup the processes or directories .
If you implement the same in execjob_epilogue hook event, that takes the precedence over epilogue script and only hook will be executed.
Thanks Adarsh
i tried it but file /tmp/**epilogue.txt is not creating after submission of job , is there any setting i need to do for epilogue should work
thanks
now it is working
Thanks Adarsh
regards
deepak
That worked for me. I was able to add my own user code in there as follows:
#!/bin/bash
echo "From the epilogue script" > /tmp/$1_epilogue.txt
echo $@ >> /tmp/$1_epilogue.txt
sudo -u feacluster bash -c 'source ~/.bashrc;gcloud --no-user-output-enabled compute instances stop instance-3 --zone us-central1-b;'