Dear Jakob and all,

I've just experienced this problem too. It seems to be a compiler bug with 
recent icc (it's still there in 2018.1.163). Python 3.6.x now includes sha3 
which used to be a pypi module - and there's one tiny bit of code in there that 
creates a huge line in C using a macro. Icc segfaults on that line, presumably 
because it can't fit it in a buffer somewhere.

Anyway, I've made a patch (attached) which I'll be contributing back along with 
a Python-3.6.3-iomkl-2018a.eb in the next couple of weeks. If anyone fancies 
sanity checking the patch then I'd be very grateful! It does make some 
assumptions about which version of the macro to use (which it just unpacks 
explicitly into several lines) so someone might have a better idea. Even then, 
it still needs '-O0' to build it...

Thanks,

Ed

--

Andrew Edmondson
Advanced Application Specialist and Research Software Group Leader
Research Computing, IT Services, University of Birmingham

Web:
- BEAR Software: http://www.birmingham.ac.uk/bear-software
- BEAR: http://www.birmingham.ac.uk/bear
- Support: http://itservicedesk.bham.ac.uk/
Twitter: https://twitter.com/uob_rescomp
Email: [email protected]
Tel: 58383 or 0121 4158383



-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of [email protected]
Sent: 13 October 2017 07:51
To: [email protected]
Subject: [easybuild] Building Python with iomkl (intel) tool chain

Hi,

I am trying to build Python with the Intel compiler, using the iomkl/2017b 
toolchain since we do not have a licence for Intel MPI, and therefore cannot 
use the intel toolchain.

As the .eb files are identical for foss/2017b and intel/2017b (a part from the 
toolchain, of couse), I just made a .eb file using the iomkl chain.  
Unfortunately, Python does not build correctly, it fails during sanity checks, 
as some of the extensions have not built correctly (the first it finds is 
paramiko). The day before I built Python using the foss/2017b toolchain without 
any problems whatsoever.  But it would not be the first time something fails 
with the Intel compiler, because it may be more picky.

Has anybody had any success building Python-3.6.2-intel-2017b.eb from the 
develop branch?  Using iomkl should give exactly the same compiler.

I looked at the log files, there are a number of exceptions when building the 
paramiko module that are not seen in the log of the foss/2017b build.  They 
relate to missing symbols in openssl

ERROR:root:code for hash sha3_224 was not found.
Traceback (most recent call last):
  File 
"/home/niflheim/schiotz/easybuild/nehalem/software/Python/3.6.2-iomkl-2017b/lib/python3.6/hashlib.py",
 line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_sha3_224'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/home/niflheim/schiotz/easybuild/nehalem/software/Python/3.6.2-iomkl-2017b/lib/python3.6/hashlib.py",
 line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File 
"/home/niflheim/schiotz/easybuild/nehalem/software/Python/3.6.2-iomkl-2017b/lib/python3.6/hashlib.py",
 line 128, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File 
"/home/niflheim/schiotz/easybuild/nehalem/software/Python/3.6.2-iomkl-2017b/lib/python3.6/hashlib.py",
 line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha3_224 ERROR:root:code for hash sha3_256 
was not found.
Traceback (most recent call last):
  File 
"/home/niflheim/schiotz/easybuild/nehalem/software/Python/3.6.2-iomkl-2017b/lib/python3.6/hashlib.py",
 line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_sha3_256'

During handling of the above exception, another exception occurred:
[ And then the same is repeated for another SHA3 variant, and another, and …

The weird thing is that if I load Python built with foss/2017b, then 
hashlib._hashlib is missing these SHA3 variants, too, but the modules have 
built properly.

Does anybody know how to handle this?  Or has anybody already managed to build 
Python-3.6.2-intel-2017b.eb?


Best regards

Jakob


--
Jakob Schiøtz, professor, Ph.D.
Department of Physics
Technical University of Denmark
DK-2800 Kongens Lyngby, Denmark
http://www.fysik.dtu.dk/~schiotz/



Attachment: Python-3.6.3-icc_segfault_workaround.patch
Description: Python-3.6.3-icc_segfault_workaround.patch

Reply via email to