-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbatch.job
More file actions
49 lines (37 loc) · 1.09 KB
/
batch.job
File metadata and controls
49 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#PBS -m e
##PBS -M dimperio@bnl.gov
#PBS -S /bin/bash
##PBS -l feature=nvidia
##PBS -l feature=intel
##PBS -l nodes=1:ppn=16
##PBS -l nodes=1
#PBS -l walltime=00:05:00
#PBS -j oe
#PBS -N openmp
#PBS -o $PBS_JOBID.out
## We requested nodes and procesors per node. ${PBS_NODEFILE} lists
## these node. Count the number of processors selected.
NODECOUNT=`sort -u ${PBS_NODEFILE} | wc -l`
PROCCOUNT=`sort ${PBS_NODEFILE} | wc -w`
## Set and change to WORK directory based on Job ID, prevents duplication
## of files. You may also use PBS_O_WORKDIR, which is set by PBS to the
## directory where you executed qsub.
WORK=${PBS_O_WORKDIR}
echo "Number of nodes is: ${NODECOUNT}"
echo "Number of processors is: ${PROCCOUNT}"
echo "The hostnames of the nodes: "
cat ${PBS_NODEFILE} | head -n 1
echo ""
#######
####### YOUR SCRIPTING BELOW HERE
#######
EXE=${WORK}/MonteCarlo/parallel/c/montecarlo
echo "The executable is: ${EXE}"
echo ""
## Run executable commands.
export OMP_NUM_THREADS=2
time -p ${EXE}
#######
####### YOUR SCRIPTING ABOVE HERE
#######
# End-of-job cleanup goes here, if necessary