<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div>
<div>I think that the build system is okay, I was just experimenting, trying to understand what the various preprocessor macros do.</div>
<div><br>
</div>
<div>Thanks again,</div>
<div>Hal</div>
<div><br>
</div>
<div><font style="color:#333333"><i>Sent from my Verizon Wireless 4G LTE DROID</i></font></div>
</div>
<br>
<br>
"Cownie, James H" <james.h.cownie@intel.com> wrote:<br>
<br>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">KMP_GOMP_COMPAT has always been required. That is the intent.
<br>
If KMP_GOMP_COMPAT is not being set automatically by the build system then that has got broken somewhere. (Maybe one of Alp's recent changes broke this unintentionally?)<br>
<br>
-- Jim<br>
<br>
James Cownie <james.h.cownie@intel.com><br>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)<br>
Tel: +44 117 9071438<br>
<br>
<br>
-----Original Message-----<br>
From: openmp-dev-bounces@cs.uiuc.edu [<a href="mailto:openmp-dev-bounces@cs.uiuc.edu">mailto:openmp-dev-bounces@cs.uiuc.edu</a>] On Behalf Of Hal Finkel<br>
Sent: Monday, March 17, 2014 1:15 PM<br>
To: openmp-dev <br>
Subject: [Openmp-dev] KMP_GOMP_COMPAT now required?<br>
<br>
Hello,<br>
<br>
I've noticed that KMP_GOMP_COMPAT is now required? Is this the intended behavior?<br>
<br>
Specifically, because of this in kmp_ftn_entry.h:<br>
<br>
/*<br>
 * For compatibility with the Gnu/MS Open MP codegen, omp_set_num_threads(),<br>
 * omp_set_nested(), and omp_set_dynamic() [in lowercase on MS, and w/o<br>
 * a trailing underscore on Linux* OS] take call by value integer arguments.<br>
 * + omp_set_max_active_levels()<br>
 * + omp_set_schedule()<br>
 *<br>
 * For backward compatibility with 9.1 and previous Intel compiler, these<br>
 * entry points take call by reference integer arguments.<br>
 */<br>
#ifdef KMP_GOMP_COMPAT<br>
# if (KMP_FTN_ENTRIES == KMP_FTN_PLAIN) || (KMP_FTN_ENTRIES == KMP_FTN_UPPER) #  define PASS_ARGS_BY_VALUE 1 # endif #endif #if KMP_OS_WINDOWS # if (KMP_FTN_ENTRIES == KMP_FTN_PLAIN) || (KMP_FTN_ENTRIES == KMP_FTN_APPEND) #  define PASS_ARGS_BY_VALUE 1 # endif
 #endif<br>
<br>
As a result, if KMP_GOMP_COMPAT is not defined, and we're not on Windows, the omp_set_num_threads expects its argument by reference. This is incompatible with its signature (and the standard):<br>
<br>
  omp_set_num_threads (int);<br>
<br>
and obviously attempting to dereference the argument will segfault.<br>
<br>
Would it make more sense to define a special build flag for Intel 9.1 compatibility, and otherwise do the expected thing and expect these arguments by value?<br>
<br>
Thanks again,<br>
Hal<br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
_______________________________________________<br>
Openmp-dev mailing list<br>
Openmp-dev@dcs-maillist2.engr.illinois.edu<br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev">http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev</a><br>
---------------------------------------------------------------------<br>
Intel Corporation (UK) Limited<br>
Registered No. 1134945 (England)<br>
Registered Office: Pipers Way, Swindon SN3 1RJ<br>
VAT No: 860 2173 47<br>
<br>
This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.<br>
<br>
</div>
</span></font>
</body>
</html>