[Openmp-dev] OS definitions

Carlo Bertolli cbertol at us.ibm.com
Fri Aug 8 06:47:36 PDT 2014


Hi Jim,

Yes you are right - it should be included. I forgot to add it.


Thanks

-- Carlo




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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140808/ad53c0d8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140808/ad53c0d8/attachment.gif>


More information about the Openmp-dev mailing list