Setting the output file name
-
I am using the script file below to submit crystal23 jobs in a cluster, and I would like to know a way to set the output filename in this script. Also, I would like to see the temporary content of the output file in my $PBS_O_WORKDIR directory. Is there a simple way to do that?
In the way it is now, the output is going to the runerr file in the $PBS_O_WORKDIR directory, and only at the end of the calculation.
The working directory is set to $CRY23_SCRDIR/$PBS_JOBID where the $SCRDIR = /work/ppiquini#!/bin/bash ### Name of the execution queue ### #PBS -q testes #PBS -N test33 #PBS -o runout #PBS -e runerr #PBS -l nodes=1:ppn=4 # module load openmpi/4.1.1-gcc-9.4.0 # cd $PBS_O_WORKDIR echo "-----------------------------------------" echo "beginning of the job:" `date` echo $PBS_O_WORKDIR # source $HOME/CRYSTAL23/utils23/cry23.bashrc mkdir -p $CRY23_SCRDIR cp $PBS_JOBNAME".d12" $CRY23_SCRDIR/INPUT cd $CRY23_SCRDIR # mpirun -np 4 $CRY23_EXEDIR/$VERSION/Pcrystal # cd /work/ppiquini rm -r ./$PBS_JOBID echo "Final do job:" `date` echo "-----------------------------------------"
-
Hi piquini,
You could try to add this to your mpirun line:mpirun -np 4 $CRY23_EXEDIR/$VERSION/Pcrystal |& tee $PBS_O_WORKDIR/${PBS_JOBNAME}.out
Let me know if it works!
-
Dear Giacomo, it worked fine. Thank you very much!