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}.outLet me know if it works!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login