<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">Thanks, I’ll leave this until tomorrow morning (UK time) to give a window for any final reviews, then commit it assuming no objections.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">-- Jim<br>
<br>
James Cownie <james.h.cownie@intel.com><br>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">Tel: +44 117 9071438</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Carlo Bertolli [mailto:cbertol@us.ibm.com]
<br>
<b>Sent:</b> Wednesday, August 06, 2014 4:28 PM<br>
<b>To:</b> Cownie, James H<br>
<b>Cc:</b> C. Bergström; Michael Wong; openmp-dev@dcs-maillist2.engr.illinois.edu; Hal Finkel<br>
<b>Subject:</b> RE: [Openmp-dev] PPC64 patch from Intel's fourth cmake patch<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Hi James,</span><br>
<br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Attached a second version of my patch addressing C. Bergström concerns (again, thanks for this).</span><br>
<br>
<i>(See attached file: ppc64-second-patch-from-fourth-intel-cmake)</i><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">There were issues that remained unsolved - here are my answers:</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">1. I removed the use of uname from everywhere. The user has to specify the value of the variable "arch" on the command line (e.g. ppc64), otherwise 32e is assumed.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">2. The old cmake has a very complex way of setting the OpenMP version (3 variables are used). I removed all my attempts to make them homogeneous, and left it as it was before I worked on it.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">3. I left the implementation of kmp_invoke_microtask as Hal Finkel did it because there is no time to implement a better version - incidentally, this will work for the foreseeable future.</span><br>
<br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Please, let me know of any comments and I'll quickly fix the thing and send a revised patch.</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">In the meantime, thanks for holding this while I was fixing my patch.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Cheers</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">-- Carlo</span><br>
<br>
<img width="16" height="16" id="_x0000_i1025" src="cid:image001.gif@01CFB194.8F4D55C0" alt="Inactive hide details for "Cownie, James H" ---08/06/2014 05:23:22 AM---Carlo, If you send a new patch soon, I'll commit it *be"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#424282">"Cownie,
 James H" ---08/06/2014 05:23:22 AM---Carlo, If you send a new patch soon, I'll commit it *before* I push to the 3.5 branch.</span><br>
<br>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F">From:
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">"Cownie, James H" <<a href="mailto:james.h.cownie@intel.com">james.h.cownie@intel.com</a>></span><br>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F">To: </span>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif"">Carlo Bertolli/Watson/IBM@IBMUS, C. Bergström <<a href="mailto:cbergstrom@pathscale.com">cbergstrom@pathscale.com</a>></span><br>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F">Cc: </span>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif"">"<a href="mailto:openmp-dev@dcs-maillist2.engr.illinois.edu">openmp-dev@dcs-maillist2.engr.illinois.edu</a>" <<a href="mailto:openmp-dev@dcs-maillist2.engr.illinois.edu">openmp-dev@dcs-maillist2.engr.illinois.edu</a>>,
 Michael Wong <<a href="mailto:michaelw@ca.ibm.com">michaelw@ca.ibm.com</a>></span><br>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F">Date:
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">08/06/2014 05:23 AM</span><br>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F">Subject:
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">RE: [Openmp-dev] PPC64 patch from Intel's fourth cmake patch</span><o:p></o:p></p>
<div class="MsoNormal">
<hr size="2" width="100%" noshade="" style="color:#8091A5" align="left">
</div>
<p class="MsoNormal"><br>
<br>
<br>
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">Carlo,</span><br>
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"> </span><br>
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">If you send a new patch soon, I’ll commit it *<b>before</b>* I push to the 3.5 branch.</span><br>
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"> </span><br>
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">-- Jim<br>
<br>
James Cownie <<a href="mailto:james.h.cownie@intel.com">james.h.cownie@intel.com</a>><br>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)</span><br>
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">Tel: +44 117 9071438</span><br>
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"> </span><br>
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:openmp-dev-bounces@cs.uiuc.edu">openmp-dev-bounces@cs.uiuc.edu</a> [<a href="mailto:openmp-dev-bounces@cs.uiuc.edu">mailto:openmp-dev-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Carlo Bertolli<b><br>
Sent:</b> Tuesday, August 05, 2014 11:52 PM<b><br>
To:</b> C. Bergström<b><br>
Cc:</b> <a href="mailto:openmp-dev@dcs-maillist2.engr.illinois.edu">openmp-dev@dcs-maillist2.engr.illinois.edu</a>; Michael Wong<b><br>
Subject:</b> Re: [Openmp-dev] PPC64 patch from Intel's fourth cmake patch</span><br>
  <o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Hi C. Bergstrom,</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif""><br>
Thanks *very much* for the review. Below, my detailed comments on this, interspersed with your comments:</span><br>
<br>
<br>
<br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
"C. Bergström" <</span><a href="mailto:cbergstrom@pathscale.com"><span style="font-size:10.0pt;font-family:"Courier New"">cbergstrom@pathscale.com</span></a><span style="font-size:10.0pt;font-family:"Courier New"">> wrote on 08/05/2014 05:11:10 PM:<br>
<br>
> From: "C. Bergström" <</span><a href="mailto:cbergstrom@pathscale.com"><span style="font-size:10.0pt;font-family:"Courier New"">cbergstrom@pathscale.com</span></a><span style="font-size:10.0pt;font-family:"Courier New"">><br>
> To: Carlo Bertolli/Watson/IBM@IBMUS<br>
> Cc: </span><a href="mailto:openmp-dev@dcs-maillist2.engr.illinois.edu"><span style="font-size:10.0pt;font-family:"Courier New"">openmp-dev@dcs-maillist2.engr.illinois.edu</span></a><span style="font-size:10.0pt;font-family:"Courier New"">, Michael Wong
<br>
> <</span><a href="mailto:michaelw@ca.ibm.com"><span style="font-size:10.0pt;font-family:"Courier New"">michaelw@ca.ibm.com</span></a><span style="font-size:10.0pt;font-family:"Courier New"">><br>
> Date: 08/05/2014 05:13 PM<br>
> Subject: Re: [Openmp-dev] PPC64 patch from Intel's fourth cmake patch<br>
> <br>
> On 08/ 6/14 01:26 AM, Carlo Bertolli wrote:<br>
> ><br>
> > Hi all,<br>
> ><br>
> > I managed to create a git patch on top of latest Intel's cmake patch <br>
> > from Jonathan Peyton.<br>
> ><br>
> > /(See attached file: ppc64-patch-from-fourth-intel-cmake)/<br>
> ><br>
> > This patch adds the ppc64 architecture and enables the current <br>
> > Makefile system, the old cmake system, and the new cmake system on <br>
> > that architecture.<br>
> > It completely replaces the previous patch I sent on the openmp-commits <br>
> > list.<br>
> ><br>
> ><br>
> > Please let me know of any comments.<br>
> ><br>
> Hi Carlo!<br>
> <br>
> Thanks a lot for sending this<br>
> <br>
> Here's my off the cuff review<br>
> ---------<br>
> using uname to detect the host/target was rejected before. Please use <br>
> the "cmake" way of detecting things.<br>
> +EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE <br>
> DETECT_ARCH )<br>
> +EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCH )<br>
> </span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
OK. I did some investigation on this and have done it again just now but was not able to find a way of doing this natively in cmake.<br>
Actually, I found comments about how cmake does not support this natively (may be an old cmake version).<br>
Can you suggest how to do this? (a link to a web page with an example is fine too).</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
> <br>
> Please don't use !not when it can be avoided - It can be slightly <br>
> confusing at a glance<br>
> # Is this a work-around to something? Why not just test for ppc64 and <br>
> handle that condition?<br>
> if(NOT "${DETECT_ARCH}" STREQUAL "ppc64")</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
I agree this is just a stupid way of coding things - I will fix it.</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
> <br>
> why change the minimum cmake version?<br>
> +cmake_minimum_required(VERSION 3.0)</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
I got an annoying warning from cmake when running on one of the machines here - I added it to get rid to the warning, but I will delete this.</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
> <br>
> --------<br>
> We should find a correct solution instead of "ugly work-around" - I hope <br>
> Intel can chime in here<br>
> +#ugly workaround because these variables are not really set<br>
> // For PathScale on BGQ - we are only able to support OMP2.5 for now. <br>
> Advertising support all the way to 4.x would possibly lead to weird <br>
> things. This should be done with care</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
This is a quick fixup that I made to the old cmake to have it work again on the machine I was using. I can get rid of those and ask who runs cmake to set them up. Would that be fine by you?</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
> --------<br>
> I don't know if this is limited to linux only, but it isn't a correct <br>
> assumption for Solaris and possibly FreeBSD<br>
> -  set(CMAKE_SHARED_LINKER_FLAGS <br>
> "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports_so.txt")<br>
> +  set(CMAKE_SHARED_LINKER_FLAGS <br>
> "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports_so.txt -ldl")<br>
> </span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
I think this only triggered an error on ppc64 linux. x86_64 linux did not raise any issue. What is your suggestion? Should I guard it as "if linux && ppc64"?<br>
<br>
> --------<br>
> I think this sneaked in<br>
> -#define KMP_VERSION_BUILD    00000000<br>
> +//#define KMP_VERSION_BUILD    00000000<br>
></span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
Yep, it did!<br>
<br>
> --------<br>
> I don't have the time to review makefile.mk/perl module - someone else <br>
> should do that..<br>
> # Personally, I think it should be removed</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
runtime/src/makefile.mk is used by the current Makefile (not sure about cmakes). In general, I am happier if Makefile stays in its place.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
> ----------<br>
> <br>
> // This looks really weird and I'd need more details before accepting it<br>
> // I also think we may want to limit this damage to very specifically <br>
> "clang" instead of just PPC64<br>
> // Please provide more details<br>
> +__kmp_invoke_microtask<br>
> </span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
About this: I am not aware of any compiler that will target PPC64 using IOMP, except CLANG (I am happy to be told I am wrong). CLANG does currently gather all arguments to the microtask into a struct of pointers. That is the reason for my comment. There is
 ongoing discussion at Intel, I think, about why this is/is not bad.</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
From PPC64 perspective, we are happy the way it is. This implementation is coming from Hal Finkel (I am cc-ing him) that actually implemented that function. I had some discussion with my colleagues here and, if eventually this implementation gets in the way
 of getting better performance, we shall be able to provide an assembly version of this.<br>
For this patch, we feel comfortable as it is.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
> <br>
> How do you plan to test this?<br>
> Does it pass the testsuite which has been made available?<br>
> I believe ANL did some work on this (Jeff Hammond) - is any of his work <br>
> used in this?</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
Yes, it passes the testsuite with similar results as with gcc on x86_64. If you need them, I can provide detailed information.<br>
Once we have clarified the remaining details, I will provide a new patch.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
Thanks again for your detailed review and apologies about my inexperience in llvm-related projects.</span><br>
<br>
<br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
Cheers</span><br>
<span style="font-size:10.0pt;font-family:"Courier New""><br>
-- Carlo</span><o:p></o:p></p>
<p>---------------------------------------------------------------------<br>
Intel Corporation (UK) Limited<br>
Registered No. 1134945 (England)<br>
Registered Office: Pipers Way, Swindon SN3 1RJ<br>
VAT No: 860 2173 47 <o:p></o:p></p>
<p>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. <o:p></o:p></p>
</div>
<p>---------------------------------------------------------------------<br>
Intel Corporation (UK) Limited<br>
Registered No. 1134945 (England)<br>
Registered Office: Pipers Way, Swindon SN3 1RJ<br>
VAT No: 860 2173 47</p>

<p>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.</p></body>
</html>