Open MPI logo

Open MPI User's Mailing List Archives

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

From: Reuti (reuti_at_[hidden])
Date: 2006-10-12 06:06:51


Hi,

Am 12.10.2006 um 09:52 schrieb amane001:

> 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.

is it your intention to mix OpenMPI and OpenMP? Which compilation
flags did you use for OpenMPI?

> 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

setenv is csh, you are using (ba)sh.

export OMP_NUM_THREADS=2

but most likely you won't need it at all.

-- Reuti

> 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
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users