|
How Do I Determine Which Core
A Process Thread is Running On?
02-Jul-2007
Introduction
Ada consists of two dual-core processors per node. If you run a multithreaded process on one node, each thread will be assigned to a different core (assuming you request enough cores for your job). There might be circumstances where you need to verify which core a thread ran on. The following document will describe how to determine which core was assigned to your process threads.
Determining Core Assignment
The following example PBS batch script will request all four processors (cores) on a node. It will invoke xd1launcher with the -v (verbose) flag which will show you the thread-to-core assignments in the output.
#PBS -N Testjob
#PBS -q compute
#PBS -l nodes=1:ppn=4
#PBS -M username@rice.edu
#PBS -m abe
#
echo "I ran on:"
cat $PBS_NODEFILE
#
mpiexec $XD1LAUNCHER -v -j ./myjob.exe
|
When your job terminates, there will be an output file named <jobID>.ER in your working directory where <jobID> is your job's ID number. This file will contain any error messages from your job and will contain the verbose output of xd1launcher which will include the thread-to-core assignments similar to the following:
xd1launcher@ada506-4: LSS enabled for process 17922 bound to cpu 0 xd1launcher@ada506-4: process 17923 finished with exit code: 0 xd1launcher@ada506-4: LSS enabled for process 17924 bound to cpu 1 xd1launcher@ada506-4: process 17925 finished with exit code: 0 xd1launcher@ada506-4: LSS enabled for process 17926 bound to cpu 2 xd1launcher@ada506-4: process 17927 finished with exit code: 0 xd1launcher@ada506-4: LSS enabled for process 17928 bound to cpu 3 xd1launcher@ada506-4: process 17929 finished with exit code: 0
|
This will run the job using the xd1launcher program which takes advantage of the Cray XD1 execution environment. Use man
xd1launcher for more information.
|