[Openmp-dev] KMP_GOMP_COMPAT now required?

Cownie, James H james.h.cownie at intel.com
Mon Mar 17 07:13:01 PDT 2014


> wouldn't it make more sense to default to sensible behavior and require macro definitions for the exceptional cases?

Probably now. It didn’t when the libgomp compatibility was new and in the process of being introduced and was,
therefore, the exceptional case.
As time goes on it has become the normal case, but since everything works just fine, no-one ever has a reason
to go back and change something that works. 

-- Jim

James Cownie <james.h.cownie at intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438


-----Original Message-----
From: Steven Noonan [mailto:steven at uplinklabs.net] 
Sent: Monday, March 17, 2014 2:06 PM
To: Cownie, James H
Cc: Hal Finkel; openmp-dev
Subject: Re: [Openmp-dev] KMP_GOMP_COMPAT now required?

Curious, wouldn't it make more sense to default to sensible behavior and require macro definitions for the exceptional cases? In what circumstances would you not want KMP_GOMP_COMPAT set?

On Mon, Mar 17, 2014 at 6:59 AM, Cownie, James H <james.h.cownie at intel.com> wrote:
> KMP_GOMP_COMPAT has always been required. That is the intent.
> 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?)
>
> -- Jim
>
> James Cownie <james.h.cownie at intel.com> SSG/DPD/TCAR (Technical 
> Computing, Analyzers and Runtimes)
> Tel: +44 117 9071438
>
>
> -----Original Message-----
> From: openmp-dev-bounces at cs.uiuc.edu 
> [mailto:openmp-dev-bounces at cs.uiuc.edu] On Behalf Of Hal Finkel
> Sent: Monday, March 17, 2014 1:15 PM
> To: openmp-dev
> Subject: [Openmp-dev] KMP_GOMP_COMPAT now required?
>
> Hello,
>
> I've noticed that KMP_GOMP_COMPAT is now required? Is this the intended behavior?
>
> Specifically, because of this in kmp_ftn_entry.h:
>
> /*
>  * For compatibility with the Gnu/MS Open MP codegen, 
> omp_set_num_threads(),
>  * omp_set_nested(), and omp_set_dynamic() [in lowercase on MS, and 
> w/o
>  * a trailing underscore on Linux* OS] take call by value integer arguments.
>  * + omp_set_max_active_levels()
>  * + omp_set_schedule()
>  *
>  * For backward compatibility with 9.1 and previous Intel compiler, 
> these
>  * entry points take call by reference integer arguments.
>  */
> #ifdef KMP_GOMP_COMPAT
> # 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
>
> 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):
>
>   omp_set_num_threads (int);
>
> and obviously attempting to dereference the argument will segfault.
>
> 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?
>
> Thanks again,
> Hal
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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.




More information about the Openmp-dev mailing list