<html><body>
<p><font size="2" face="sans-serif">Hi James,</font><br>
<br>
<br>
<font size="2" face="sans-serif">Attached a second version of my patch addressing C. Bergström concerns (again, thanks for this).</font><br>
<br>
<i>(See attached file: ppc64-second-patch-from-fourth-intel-cmake)</i><br>
<br>
<font size="2" face="sans-serif">There were issues that remained unsolved - here are my answers:</font><br>
<br>
<font size="2" face="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.</font><br>
<br>
<font size="2" face="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.</font><br>
<br>
<font size="2" face="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.</font><br>
<br>
<br>
<font size="2" face="sans-serif">Please, let me know of any comments and I'll quickly fix the thing and send a revised patch.</font><br>
<font size="2" face="sans-serif">In the meantime, thanks for holding this while I was fixing my patch.</font><br>
<br>
<font size="2" face="sans-serif">Cheers</font><br>
<br>
<font size="2" face="sans-serif">-- Carlo</font><br>
<br>
<img width="16" height="16" src="cid:2__=0ABBF7BFDFC7FB4C8f9e8a93df938@us.ibm.com" border="0" 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"><font size="2" color="#424282" face="sans-serif">"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.</font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:      </font><font size="1" face="sans-serif">"Cownie, James H" <james.h.cownie@intel.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">Carlo Bertolli/Watson/IBM@IBMUS, C. Bergström <cbergstrom@pathscale.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Cc:        </font><font size="1" face="sans-serif">"openmp-dev@dcs-maillist2.engr.illinois.edu" <openmp-dev@dcs-maillist2.engr.illinois.edu>, Michael Wong <michaelw@ca.ibm.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:      </font><font size="1" face="sans-serif">08/06/2014 05:23 AM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:   </font><font size="1" face="sans-serif">RE: [Openmp-dev] PPC64 patch from Intel's fourth cmake patch</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<font size="2" color="#1F497D" face="Verdana">Carlo,</font><br>
<font size="2" color="#1F497D" face="Verdana"> </font><br>
<font size="2" color="#1F497D" face="Verdana">If you send a new patch soon, I’ll commit it *</font><font size="2" color="#1F497D" face="Verdana"><b>before</b></font><font size="2" color="#1F497D" face="Verdana">* I push to the 3.5 branch.</font><br>
<font size="2" color="#1F497D" face="Verdana"> </font><br>
<font size="2" color="#1F497D" face="Verdana">-- Jim<br>
<br>
James Cownie <james.h.cownie@intel.com><br>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)</font><br>
<font size="2" color="#1F497D" face="Verdana">Tel: +44 117 9071438</font><br>
<font size="2" color="#1F497D" face="Verdana"> </font><br>
<font size="2" face="Tahoma"><b>From:</b></font><font size="2" face="Tahoma"> openmp-dev-bounces@cs.uiuc.edu [</font><font size="2" face="Tahoma"><a href="mailto:openmp-dev-bounces@cs.uiuc.edu">mailto:openmp-dev-bounces@cs.uiuc.edu</a></font><font size="2" face="Tahoma">] </font><font size="2" face="Tahoma"><b>On Behalf Of </b></font><font size="2" face="Tahoma">Carlo Bertolli</font><font size="2" face="Tahoma"><b><br>
Sent:</b></font><font size="2" face="Tahoma"> Tuesday, August 05, 2014 11:52 PM</font><font size="2" face="Tahoma"><b><br>
To:</b></font><font size="2" face="Tahoma"> C. Bergström</font><font size="2" face="Tahoma"><b><br>
Cc:</b></font><font size="2" face="Tahoma"> openmp-dev@dcs-maillist2.engr.illinois.edu; Michael Wong</font><font size="2" face="Tahoma"><b><br>
Subject:</b></font><font size="2" face="Tahoma"> Re: [Openmp-dev] PPC64 patch from Intel's fourth cmake patch</font><br>
<font size="3" face="Times New Roman"> </font>
<p><font size="2" face="Arial">Hi C. Bergstrom,</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="Arial"><br>
Thanks *very much* for the review. Below, my detailed comments on this, interspersed with your comments:</font><font size="3" face="Times New Roman"><br>
<br>
<br>
<br>
</font><font size="2" face="Courier New"><br>
"C. Bergström" <</font><a href="mailto:cbergstrom@pathscale.com"><font size="2" color="#0000FF" face="Courier New"><u>cbergstrom@pathscale.com</u></font></a><font size="2" face="Courier New">> wrote on 08/05/2014 05:11:10 PM:<br>
<br>
> From: "C. Bergström" <</font><a href="mailto:cbergstrom@pathscale.com"><font size="2" color="#0000FF" face="Courier New"><u>cbergstrom@pathscale.com</u></font></a><font size="2" face="Courier New">><br>
> To: Carlo Bertolli/Watson/IBM@IBMUS<br>
> Cc: </font><a href="mailto:openmp-dev@dcs-maillist2.engr.illinois.edu"><font size="2" color="#0000FF" face="Courier New"><u>openmp-dev@dcs-maillist2.engr.illinois.edu</u></font></a><font size="2" face="Courier New">, Michael Wong <br>
> <</font><a href="mailto:michaelw@ca.ibm.com"><font size="2" color="#0000FF" face="Courier New"><u>michaelw@ca.ibm.com</u></font></a><font size="2" face="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>
> </font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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).</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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")</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="Courier New"><br>
I agree this is just a stupid way of coding things - I will fix it.</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="Courier New"><br>
> <br>
> why change the minimum cmake version?<br>
> +cmake_minimum_required(VERSION 3.0)</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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.</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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?</font><font size="3" face="Times New Roman"><br>
<br>
</font><font size="2" face="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>
> </font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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>
></font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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.</font><font size="3" face="Times New Roman"><br>
<br>
</font><font size="2" face="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>
> </font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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.</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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.</font><font size="3" face="Times New Roman"><br>
<br>
</font><font size="2" face="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?</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="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.</font><font size="3" face="Times New Roman"><br>
<br>
</font><font size="2" face="Courier New"><br>
Thanks again for your detailed review and apologies about my inexperience in llvm-related projects.</font><font size="3" face="Times New Roman"><br>
<br>
<br>
</font><font size="2" face="Courier New"><br>
Cheers</font><font size="3" face="Times New Roman"><br>
</font><font size="2" face="Courier New"><br>
-- Carlo</font><font size="3" face="Times New Roman"><br>
</font>
<p><font size="3" face="Times New Roman">---------------------------------------------------------------------<br>
Intel Corporation (UK) Limited<br>
Registered No. 1134945 (England)<br>
Registered Office: Pipers Way, Swindon SN3 1RJ<br>
VAT No: 860 2173 47</font>
<p><font size="3" face="Times New Roman">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.</font>
<p></body></html>