[Openmp-dev] OS definitions

Hal Finkel hfinkel at anl.gov
Fri Aug 8 07:07:01 PDT 2014


----- Original Message -----
> From: "Carlo Bertolli" <cbertol at us.ibm.com>
> To: "James H Cownie" <james.h.cownie at intel.com>
> Cc: openmp-dev at dcs-maillist2.engr.illinois.edu
> Sent: Friday, August 8, 2014 8:47:36 AM
> Subject: Re: [Openmp-dev] OS definitions
> 
> 
> 
> 
> Hi Jim,
> 
> Yes you are right - it should be included. I forgot to add it.

Did you test that? As I recall, CNK pretends to be Linux, so KMP_OS_LINUX is already defined on CNK.

 -Hal

> 
> 
> Thanks
> 
> -- Carlo
> 
> 
> Inactive hide details for "Cownie, James H" ---08/08/2014 08:03:19
> AM---Carlo, I'm integrating the BGQ stuff into the code we'r"Cownie,
> James H" ---08/08/2014 08:03:19 AM---Carlo, I'm integrating the BGQ
> stuff into the code we're getting ready to push, and I have a
> questio
> 
> From: "Cownie, James H" <james.h.cownie at intel.com>
> To: "openmp-dev at dcs-maillist2.engr.illinois.edu"
> <openmp-dev at dcs-maillist2.engr.illinois.edu>
> Cc: Carlo Bertolli/Watson/IBM at IBMUS
> Date: 08/08/2014 08:03 AM
> Subject: OS definitions
> 
> 
> 
> 
> Carlo,
> 
> I’m integrating the BGQ stuff into the code we’re getting ready to
> push, and I have a question…
> In kmp_os.h there’s this code
> 
> 
> /* ---------------------- Operating system recognition
> ------------------- */
> 
> #define KMP_OS_LINUX 0
> #define KMP_OS_FREEBSD 0
> #define KMP_OS_DARWIN 0
> #define KMP_OS_FREEBSD 0
> #define KMP_OS_WINDOWS 0
> #define KMP_OS_CNK 0
> #define KMP_OS_UNIX 0 /* disjunction of KMP_OS_LINUX, KMP_OS_DARWIN
> etc. */
> 
> #define KMP_ARCH_X86 0
> #define KMP_ARCH_X86_64 0
> #define KMP_ARCH_PPC64 0
> 
> #ifdef _WIN32
> # undef KMP_OS_WINDOWS
> # define KMP_OS_WINDOWS 1
> #endif
> 
> #if ( defined __APPLE__ && defined __MACH__ )
> # undef KMP_OS_DARWIN
> # define KMP_OS_DARWIN 1
> #endif
> 
> // in some ppc64 linux installations, only the second condition is
> met
> #if ( defined __linux )
> # undef KMP_OS_LINUX
> # define KMP_OS_LINUX 1
> #elif ( defined __linux__)
> # undef KMP_OS_LINUX
> # define KMP_OS_LINUX 1
> #else
> #endif
> 
> #if ( defined __FreeBSD__ )
> # undef KMP_OS_FREEBSD
> # define KMP_OS_FREEBSD 1
> #endif
> 
> #if ( defined __bgq__ )
> # undef KMP_OS_CNK
> # define KMP_OS_CNK 1
> #endif
> 
> #if (1 != KMP_OS_LINUX + KMP_OS_FREEBSD + KMP_OS_DARWIN +
> KMP_OS_WINDOWS)
> # error Unknown OS
> #endif
> 
> Shouldn’t that last test also include KMP_OS_CNK? Or does CNK pretend
> to be one of the other OSes as well?
> 
> -- Jim
> 
> James Cownie <james.h.cownie at intel.com>
> SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
> Tel: +44 117 9071438
> 
> 
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> 
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the Openmp-dev mailing list