diff --git a/docs.it4i/general/capacity-computing.md b/docs.it4i/general/capacity-computing.md index a58b3722a7f673492bbf4e99aaf3b017f0b70ae9..d279b286fe3fdacf8ee70aa0d9d455c4442b808e 100644 --- a/docs.it4i/general/capacity-computing.md +++ b/docs.it4i/general/capacity-computing.md @@ -48,19 +48,21 @@ Then we create a jobscript: ```bash #!/bin/bash -#PBS -A PROJECT_ID +#PBS -A OPEN-00-00 #PBS -q qprod -#PBS -l select=1:ncpus=24,walltime=02:00:00 +#PBS -l select=1,walltime=02:00:00 # change to scratch directory -SCR=/scratch/work/user/$USER/$PBS_JOBID -mkdir -p $SCR ; cd $SCR || exit +SCRDIR=/scratch/project/${PBS_ACCOUNT,,}/${USER}/${PBS_JOBID} +mkdir -p $SCRDIR +cd $SCRDIR || exit # get individual tasks from tasklist with index from PBS JOB ARRAY TASK=$(sed -n "${PBS_ARRAY_INDEX}p" $PBS_O_WORKDIR/tasklist) # copy input file and executable to scratch -cp $PBS_O_WORKDIR/$TASK input ; cp $PBS_O_WORKDIR/myprog.x . +cp $PBS_O_WORKDIR/$TASK input +cp $PBS_O_WORKDIR/myprog.x . # execute the calculation ./myprog.x < input > output diff --git a/docs.it4i/general/capacity.zip b/docs.it4i/general/capacity.zip index 9ea4db6e7e6ec6c0b86bef89fbe69933957d9016..28d838bade2719b2b5a73f6ecee2f35f17eb10cb 100644 Binary files a/docs.it4i/general/capacity.zip and b/docs.it4i/general/capacity.zip differ diff --git a/docs.it4i/general/job-submission-and-execution.md b/docs.it4i/general/job-submission-and-execution.md index de9ada0a891b0a26f5cf97714d6fd31799fba2dd..071b794f902d0e09ede02e2030649ae8abb2f0ce 100644 --- a/docs.it4i/general/job-submission-and-execution.md +++ b/docs.it4i/general/job-submission-and-execution.md @@ -346,9 +346,12 @@ The recommended way to run production jobs is to change to the `/scratch` direct ```bash #!/bin/bash -# change to scratch directory, exit on failure -SCRDIR=/scratch/$USER/myjob +cd $PBS_O_WORKDIR + +SCRDIR=/scratch/project/open-00-00/${USER}/myjob mkdir -p $SCRDIR + +# change to scratch directory, exit on failure cd $SCRDIR || exit # copy input file to scratch @@ -389,10 +392,12 @@ Example jobscript for an MPI job with preloaded inputs and executables, options #PBS -q qprod #PBS -N MYJOB #PBS -l select=100:mpiprocs=1:ompthreads=16 -#PBS -A OPEN-0-0 +#PBS -A OPEN-00-00 + +# job is run using project resources; here ${PBS_ACCOUNT,,} translates to "open-00-00" +SCRDIR=/scratch/project/${PBS_ACCOUNT,,}/${USER}/myjob # change to scratch directory, exit on failure -SCRDIR=/scratch/$USER/myjob cd $SCRDIR || exit # load the MPI module @@ -407,7 +412,9 @@ mpirun ./mympiprog.x exit ``` -In this example, input and executable files are assumed to be preloaded manually in the `/scratch/$USER/myjob` directory. Note the `mpiprocs` and `ompthreads` qsub options controlling the behavior of the MPI execution. `mympiprog.x` is executed as one process per node, on all 100 allocated nodes. If `mympiprog.x` implements OpenMP threads, it will run 16 threads per node. +In this example, input and executable files are assumed to be preloaded manually in the `/scratch/project/open-00-00/$USER/myjob` directory. Because we used the `qprod` queue, we had to specify which project's resources we want to use, and our `PBS_ACCOUNT` variable will be set accordingly (OPEN-00-00). `${PBS_ACCOUNT,,}` uses one of the bash's built-in functions to translate it into lower case. + +Note the `mpiprocs` and `ompthreads` qsub options controlling the behavior of the MPI execution. `mympiprog.x` is executed as one process per node, on all 100 allocated nodes. If `mympiprog.x` implements OpenMP threads, it will run 16 threads per node. ### Example Jobscript for Single Node Calculation