Hi all, Jack, 

I've run into this problem with an Intel-2018b based ROOT easyconfig as well. 
Never really fixed it (wasn't worth the effort at the time) and simply 
installed with foss, but for what its worth, let me share what I wrote down in 
our internal ticket. 

=== 


My guess is, the arguments are not recognized because this is compiled by the 
cling c++ interpreter: 

>From the makepch.py source: 
command = "%s %s -1 -f allDict.cxx -noDictSelection -c %s %s %s %s" 
%(rootclingExe, rootbuildFlag, allCppFlags, allheadersFilename, extraHeaders, 
alllinkdefsFilename) 


and from the error: 
<<< cling interactive line includer >>>:1:10: fatal error: 'source' file not 
found #include "source" 


... 




Apparently, export VERBOSE=1 will print the command that is composed: 
./bin/rootcling -rootbuild -1 -f allDict.cxx -noDictSelection -c -D__CLING__ 
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DROOT_PCH -fsigned-char 
-I./include -I./etc -I./etc/dictpch -I./etc/cling 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/CFITSIO/3.45-GCCcore-7.3.0/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/GSL/2.5-iccifort-2018.3.222-GCC-7.3.0-2.30/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/Mesa/18.1.1-intel-2018b/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/Python/2.7.15-intel-2018b/include/python2.7
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/Python/2.7.15-intel-2018b/lib/python2.7/site-packages/numpy-1.14.5-py2.7-linux-x86_64.egg/numpy/core/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/X11/20180604-GCCcore-7.3.0/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/freetype/2.9.1-GCCcore-7.3.0/include/freetype2
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/icc/2018.3.222-GCC-7.3.0-2.30/compilers_and_libraries_2018.3.222/linux/tbb/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/libxml2/2.9.8-GCCcore-7.3.0/include/libxml2
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/zlib/1.2.11-GCCcore-7.3.0/include
 
-I/nfs/home4/casparl/.local/EB_regression/RedHatEnterpriseServer7/software/GL2PS/1.4.0-intel-2018b/include
 -I/usr/include -pthread -m64 -fp-model source -lcurl -no-ipo -std=c++11 -fPIC 
-ip -ftz -fp-speculation=safe -DSYSTEM_TYPE_unix 
-I/tmp/casparl/ROOT/6.14.06/intel-2018b-Python-2.7.15/easybuild_obj/include 
etc/dictpch/allHeaders.h etc/dictpch/allLinkDefs.h 


It is this command that eventually throws all the errors. 




The allCppflags.txt file contains: 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/CFITSIO/3.45-GCCcore-7.3.0/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/GSL/2.5-iccifort-2018.3.222-GCC-7.3.0-2.30/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/Mesa/18.1.1-intel-2018b/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/Python/2.7.15-intel-2018b/include/python2.7
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/Python/2.7.15-intel-2018b/lib/python2.7/site-packages/numpy-1.14.5-py2.7-linux-x86_64.egg/numpy/core/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/X11/20180604-GCCcore-7.3.0/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/freetype/2.9.1-GCCcore-7.3.0/include/freetype2
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/icc/2018.3.222-GCC-7.3.0-2.30/compilers_and_libraries_2018.3.222/linux/tbb/include
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/libxml2/2.9.8-GCCcore-7.3.0/include/libxml2
 
-I/nfs/admin/hpc/arch/AVX2/RedHatEnterpriseServer7/EB_regression/2019/software/zlib/1.2.11-GCCcore-7.3.0/include
 
-I/nfs/home4/casparl/.local/EB_regression/RedHatEnterpriseServer7/software/GL2PS/1.4.0-intel-2018b/include
 -I/usr/include -pthread -m64 -fp-model source -lcurl -no-ipo -std=c++11 -fPIC 
-ip -ftz -fp-speculation=safe -DSYSTEM_TYPE_unix 


This is how the unkown flags end up in the command for building the precompiled 
headers. 




Proposed workaround: 

Change the root-6.14.06/etc/dictpch/makepch.py file to first parse 
allCppflags.txt and remove either specific flags (this requires manual labour 
and doesn't generalize), or try to execute rootcling with each cppflag, and 
remove the failing flags. This latter is more work, but more general as well. 

=== 





Never tried to implement such a workaround, but I just figured I'd share it in 
case it can help put you on the right track... 





Cheers, 





Caspar 





From: "Mikael Öhman" <[email protected]> 
Cc: "easybuild" <[email protected]> 
Sent: Tuesday, 4 February, 2020 16:43:48 
Subject: Re: [easybuild] disabling defaultprec in iccifort toolchain 

I know, but it's not like distutils is alone in making errors. 

Though, I will admit, I wasn't really aware of what that cling thing was until 
now. It seems to me that this is cling running scripts (perhaps a test-phase of 
the build?) so it doesn't really seem like a good idea to drop all (icpc) flags 
that aren't compatible with their LLVM based Cling plugin, as it would affect 
the rest of the build as well. I couldn't spot any obvious way where cling 
would select a linker command, so it's probably builtin somehow, so cleaning up 
LDFLAGS for this step seems like the only obvious way forward. 


On Tue, Feb 4, 2020 at 1:07 PM Åke Sandgren < [ 
mailto:[email protected] | [email protected] ] > wrote: 


But ROOT is not a pythonpackage it is cmakemake, so that "should" not be 
the problem. 

On 2/4/20 10:11 AM, Mikael Öhman wrote: 
> I recognize this type of error; it's exactly what you get in 
> pythonpackages under intel with Python @ GCCcore where it picks up GCC 
> as the linker command, but tries to use the LDFLAGS for intel. 
> If this also is the case here, the proper fix would be to fix the linker 
> command (maybe the suggested patches fixes that though) 
> 
> / Micke 
> 
> 
> On Tue, Feb 4, 2020, 06:24 Jack Perdue < [ mailto:[email protected] | 
> [email protected] ] 
> <mailto: [ mailto:[email protected] | [email protected] ] >> wrote: 
> 
> Howdy all, 
> 
> I'm trying to build a ROOT/6.14.06/intel-2018b-Python-2.7.15 
> based on EB's included ROOT-6.14.06-foss-2018b-Python-2.7.15.eb 
> (with a simple s/foss/intel/). 
> 
> It all goes well until the final link where I get: 
> 
> error: unknown argument: '-fp-model' 
> error: unknown argument: '-ftz' 
> error: unknown argument: '-fp-speculation=safe' 
> <<< cling interactive line includer >>>:1:10: fatal error: 'source' 
> file 
> not found 
> #include "source" 
> ^~~~~~~~ 
> Error: Parsing Linkdef file etc/dictpch/allLinkDefs.h 
> 
> It isn't clear why it is waiting until the end to 
> choke on these valid Intel flags. 
> 
> In any case, I tracked those settings down to 
> the CFLAGS/FFLAGS/etcFLAGS that EB sets for cmake. 
> After digging around, I found line 64 in 
> toolchains/compiler/inteliccifort.py which has 
> 
> 'defaultprec': ['ftz', 'fp-speculation=safe', 'fp-model source'], 
> 
> for a toolchain option. 
> 
> So I tried various options to turn that option off 
> (some were just guesses). 
> 
> toolchainopts = {'pic': True, 'defaultprec': False} 
> and 
> toolchainopts = {'pic': True, 'defaultprec': ''} 
> and 
> defaultprec = [''] 
> 
> None of those worked. 
> 
> If I manually hack inteliccifort.py to disable 
> those settings, then my build for ROOT-intel 
> works. 
> 
> Feel to try it yourself (I'm using EB 4.1.1). 
> 
> Obviously it would be nice to just fix the link, 
> but I'm curious about other possible uses. 
> 
> How does one disable defaultprec when using 
> the Intel toolchain? 
> 
> -- 
> Jack Perdue 
> Lead Systems Administrator 
> High Performance Research Computing 
> TAMU Division of Research 
> [ mailto:[email protected] | [email protected] ] <mailto: [ 
> mailto:[email protected] | [email protected] ] > [ http://hprc.tamu.edu/ | 
> http://hprc.tamu.edu ] 
> HPRC Helpdesk: [ mailto:[email protected] | [email protected] ] <mailto: [ 
> mailto:[email protected] | [email protected] ] > 
> 

-- 
Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden 
Internet: [ mailto:[email protected] | [email protected] ] Phone: +46 90 
7866134 Fax: +46 90-580 14 
Mobile: +46 70 7716134 WWW: [ http://www.hpc2n.umu.se/ | 
http://www.hpc2n.umu.se ] 




Reply via email to