lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
223 stars 291 forks source link

Problem installing class in a cluster #337

Open mmarianav opened 4 years ago

mmarianav commented 4 years ago

I re-installed class in a cluster andI get weird behavior, I ran the make clean, and make as usual with no issue except for (that is related with the fact I do not have right permits there ):

running install_lib copying build/lib.linux-x86_64-2.7/classy.so -> /global/common/cori_cle6/software/python/2.7-anaconda-5.2/lib/python2.7/site-packages error: [Errno 13] Permission denied: '/global/common/cori_cle6/software/python/2.7-anaconda-5.2/lib/python2.7/site-packages/classy.so'

Then I ran without any issue:

python setup.py build python setup.py install --user

But when calling the module class in python I got the following error import classy Traceback (most recent call last): File "", line 1, in ImportError: /global/homes/m/mmagana/.local/cori/2.7-anaconda-5.2/lib/python2.7/site-packages/classy.so: undefined symbol: __svml_sinh4_l9

Thanks in advance !

dgrin1 commented 3 years ago

Did you ever get a response on this issue? I am having the same problem when using icc

ThomasTram commented 3 years ago

Hi both

The first issue is that the OP is not allowed to write classy to the Anaconda site-packages directory since it is a system-wide Anaconda distribution. In this case the correct procedure is to either install Anaconda locally or to install it using python setup.py install --user. (The Makefile will automatically fall back to the --user option if the global install fails.)

The second problem is unrelated, and it is due to the Intel compiler dynamically linking to intel-specific libraries (in this case the Short Vector Math Library (SVML)) as part of the auto vectorisation. See this issue #387 for a couple of solutions. In this specific case, and of SVML is the only problem, one could turn of auto-vectorisation for icc, or perhaps link statically to the intel library by adding -static-intel to CFLAGS in the Makefile.

Cheers, Thomas