Mohsin

Members
  • Content count

    1
  • Joined

  • Last visited

  1. Hi PBSPro Community, I am submitting the following test.sh script using qsub test.sh command. I want to use HOOK so that it modifies the contents of test.sh script prior to its submission. Specifically, I want to add module list &> module_loaded.$PBS_JOBID command at the end of the test.sh file using HOOK. test.sh #!/bin/bash #PBS -l ncpus=2 #PBS -l walltime=00:02:00 #PBS -l mem=2GB cd $PBS_O_WORKDIR module load use.own module load somemodule mpicc -o mpi_test mpi_test.c mpirun -np 2 mpi_test More clearly, I will submit the above test.sh file, but eventually the following modified-test.sh will be submitted and executed. Note that creating a new file from test.sh to modified-test.sh is not necessary. I am mentioning this filename for the clarification of the requirement. modified-test.sh #!/bin/bash #PBS -l ncpus=2 #PBS -l walltime=00:02:00 #PBS -l mem=2GB cd $PBS_O_WORKDIR module load use.own module load somemodule mpicc -o mpi_test mpi_test.c mpirun -np 2 mpi_test module list &> module_loaded.$PBS_JOBID # Added command As I am a newbie of HOOK, any detailed comment (preferably complete code) will be highly appreciated. Thank you very much for your time! Cheers, Mohsin