[Omp] OMP function call error

Haab, Grant grant.haab at intel.com
Tue May 31 12:56:14 PDT 2005


The correct ways to get ALL the correct definitions for the OMP Fortran
API are as follows:

	include 'omp_lib.h'

OR

	use omp_lib

- Grant


-----Original Message-----
From: Omp-bounces at openmp.org [mailto:Omp-bounces at openmp.org] On Behalf
Of Tian, Xinmin
Sent: Tuesday, May 31, 2005 1:41 PM
To: Neil Summers; omp at openmp.org
Subject: RE: [Omp] OMP function call error

Did you declare below in your Fortran code before calling them? My guess
would be you did not define them. 

integer OMP_GET_MAX_THREADS
integer OMP_NUM_PROCS 

Xinmin Tian (Intel Compiler Labs) 

-----Original Message-----
From: Omp-bounces at openmp.org [mailto:Omp-bounces at openmp.org] On Behalf
Of Neil Summers
Sent: Tuesday, May 31, 2005 11:33 AM
To: omp at openmp.org
Subject: [Omp] OMP function call error

I am trying to use the functions

OMP_GET_MAX_THREADS()
OMP_GET_NUM_PROCS()

using the intel fortran compiler 8.1.023
on a SGI Altix 3700 with 64 processors
running linux
jobs are submitted with NCPUS=x and this
sets the enviroment variable
OMP_NUM_THREADS=x

when these functions are called from a serial
region of the code they give erroneous
results, e.g.
OMP_GET_MAX_THREADS() always returns 1 even when NCPUS>1
OMP_GET_NUM_PROCS() returns 1 or sometimes 4

how are these functions determined ?


_______________________________________________
Omp mailing list
Omp at openmp.org
http://openmp.org/mailman/listinfo/omp_openmp.org

_______________________________________________
Omp mailing list
Omp at openmp.org
http://openmp.org/mailman/listinfo/omp_openmp.org




More information about the Omp mailing list