<html><body>
<p><font size="2" face="sans-serif">Hi C. Bergstrom,</font><br>
<br>
<font size="2" face="sans-serif">Thanks *very much* for the review. Below, my detailed comments on this, interspersed with your comments:</font><br>
<br>
<br>
<br>
<br>
<tt><font size="2">"C. Bergström" <cbergstrom@pathscale.com> wrote on 08/05/2014 05:11:10 PM:<br>
<br>
> From: "C. Bergström" <cbergstrom@pathscale.com></font></tt><br>
<tt><font size="2">> To: Carlo Bertolli/Watson/IBM@IBMUS</font></tt><br>
<tt><font size="2">> Cc: openmp-dev@dcs-maillist2.engr.illinois.edu, Michael Wong <br>
> <michaelw@ca.ibm.com></font></tt><br>
<tt><font size="2">> Date: 08/05/2014 05:13 PM</font></tt><br>
<tt><font size="2">> Subject: Re: [Openmp-dev] PPC64 patch from Intel's fourth cmake patch</font></tt><br>
<tt><font size="2">> <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></tt><br>
<br>
<tt><font size="2">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.</font></tt><br>
<tt><font size="2">Actually, I found comments about how cmake does not support this natively (may be an old cmake version).</font></tt><br>
<tt><font size="2">Can you suggest how to do this? (a link to a web page with an example is fine too).</font></tt><br>
<br>
<tt><font size="2"><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")<br>
</font></tt><br>
<tt><font size="2">I agree this is just a stupid way of coding things - I will fix it.</font></tt><br>
<br>
<tt><font size="2">> <br>
> why change the minimum cmake version?<br>
> +cmake_minimum_required(VERSION 3.0)<br>
</font></tt><br>
<tt><font size="2">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></tt><br>
<br>
<tt><font size="2">> <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<br>
</font></tt><br>
<tt><font size="2">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></tt><br>
<br>
<br>
<tt><font size="2">> --------<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></tt><br>
<br>
<tt><font size="2">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"?</font></tt><br>
<tt><font size="2"><br>
> --------<br>
> I think this sneaked in<br>
> -#define KMP_VERSION_BUILD    00000000<br>
> +//#define KMP_VERSION_BUILD    00000000<br>
></font></tt><br>
<br>
<tt><font size="2">Yep, it did!</font></tt><br>
<tt><font size="2"> <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<br>
</font></tt><br>
<tt><font size="2">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></tt><br>
<br>
<br>
<tt><font size="2">> ----------<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>
> <br>
</font></tt><br>
<tt><font size="2">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></tt><br>
<br>
<tt><font size="2">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.</font></tt><br>
<tt><font size="2">For this patch, we feel comfortable as it is.</font></tt><br>
<br>
<br>
<tt><font size="2">> <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?<br>
</font></tt><br>
<tt><font size="2">Yes, it passes the testsuite with similar results as with gcc on x86_64. If you need them, I can provide detailed information.</font></tt><br>
<tt><font size="2">Once we have clarified the remaining details, I will provide a new patch.</font></tt><br>
<br>
<br>
<tt><font size="2">Thanks again for your detailed review and apologies about my inexperience in llvm-related projects.</font></tt><br>
<br>
<br>
<br>
<tt><font size="2">Cheers</font></tt><br>
<br>
<tt><font size="2">-- Carlo</font></tt><br>
<br>
<br>
</body></html>