Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: amane001 (amane001_at_[hidden])
Date: 2006-10-12 03:52:02


Hello all,

I recently switched to OpenMP from LAM-MPI for my code. I'm trying to run my
test code with a PBS scheduler on our local cluster. The PBS script is shown
below. When the job is executed however, only one CPU is used for running
the test.exe. Another more confusing aspect is the fact that the following
three lines highlighted in the code below. Even if I set the OMP_NUM_THREADS
= 2, the print statement in the next line says it's value is 1.

Any ideas where I could be going wrong?

Thank you all for your help in advance!
~Amane

#!/bin/sh

#PBS -e job.err
#PBS -o job.log
#PBS -m ae
#PBS -q debug
#PBS -l nodes=2

cd $PBS_O_WORKDIR
##################################################
setenv OMP_NUM_THREADS 2
echo I hope you find the correct number of processors
echo $OMP_NUM_THREADS
##################################################
######### above 3 lines produce the following output --
# I hope you find the correct number of processors
# 1
##################################################
/usr/local/openmp-1.1.1/bin/mpirun -np 2 ../source/test.exe < input.dat
>Output