[gpaw-users] Installation question. Lapack and scalapack.

Aleksei alekcey92 at inbox.ru
Wed Nov 22 13:37:49 CET 2017


Hello Gaël,


On 20.11.2017 16:25, Gaël Donval via gpaw-users wrote:
> Hi Aleksei,
>> Hello Gaël,
>>
>>      Thank you for your reply.
>>
>>>> /home/aleksei/anaconda3/compiler_compat/ld:
>>>> /home/aleksei/Programs/scalapack/lib/../lib/liblapack.a(zlarf.o):
>>>> relocation R_X86_64_32 against `.rodata' can not be used when
>>>> making
>>>> a
>>>> shared object; recompile with -fPIC
>>>> /home/aleksei/anaconda3/compiler_compat/ld: final link failed:
>>>> Nonrepresentable section on output
>>>> collect2: error: ld returned 1 exit status
>>>> error: command 'gcc' failed with exit status 1
>>>>
>>>> Has anybody seen these errors and do you know solution around
>>>> this?
>>> Did you try to... recompile with -fPIC? :)
>> :)
>>
>> I am so bad at this that I did not realize that I had to add -fPIC to
>> extra_compile_args, right?
> I don't know if that's required in that file (the installer could add
> it itself).
>
> Anyway, you need to compile blas/lapack/scalapack with -fPIC, not only
> GPAW... well, if you indeed need it (see comments below).
>
>> As you suggested before, I installed intel mkl library. Then I found
>> in gpaw archive customize.py file and changed it a bit (see attached)
>> with intel compiler and gpaw was installed without any errors. Also I
>> use now intel distribution of python,  even just 'python
>> gpaw_script.py' uses 4 cores and calculations are much more faster.
>> But, for some reason it seems that scalapck is not used. At least
>> gpaw -info shows it. Also, when I type 'gpaw-python $(which gpaw)
>> info' I get this error:
> I have a limited experience with Intel libs but to my knowledge, they
> provide their own scalapack. If you go with Intel, it's far easier to
> use their full stack. You most likely want to use and link to that
> library instead of compiling your own.
>
> Two important comments:
>
>   * Scalapack is harmful (performance-wise) for small systems and is
>     definitely unnecessary if you don't use "many" CPU cores. So you may
>     want it but you might not actually need it.
>   * Compiling and setting things up is, most of the time, not a very
>     involved process and yet it requires quite a lot of knowledge and
>     experience! In other words, setting things up yourself is insanely
>     hard if you don't know precisely what you are doing. Don't worry,
>     you won't blow up your computer if you make a mistake! :) But you
>     will go through an endless stream of weird errors that won't make
>     any sense to you. In your case, all the new errors you describe stem
>     from a misconfiguration of your Python environment (so nothing to do
>     with GPAW or scalapack anymore). You can try to solve it yourself if
>     you want, but I won't help you with it.
>

Yes, the problem now is with a misconfiguration of my Python 
environment. Interesting that I do not have any problems when I run gpaw 
calculations (or any other calculations) using python interpreter, but I 
can not use only gpaw-python.  In requirements it says that I need to 
have python 2.7-3.5, but I use python 3.6.3. I was wondering if it can 
be the reason. Anyway, I will try to figure out how I can use 
gpaw-python since I need to run parallel calculations on my laptop.

> So what should you do?
>
>   * If you are on your own computer, just activate your anaconda3
>     environment and type `pip install -U gpaw` to install gpaw. Then use
>     as it is: in that case scalapack is definitely unnecessary.

Before I always did this way, but I could not get 'gpaw-python' (I had 
mpi and other dependences installed with intel distribution) and I could 
not run parallel calculations, so I decided to try to install it myself.

Thank you for clarifying the situation.

Best wishes,
Aleksei
>   * If you are on a HPC cluster, ask your local HPC services for
>     support: chances are high that almost everything required is already
>     there and they'll know what to do.
>   * Or learn yourself, step by step, what you are doing when
>     "installing" GPAW and related packages so that you make everything
>     work.
>
> Best regards,
> Gaël
>
>
>
>
>
>> Could not find platform independent libraries <prefix>
>> Could not find platform dependent libraries <exec_prefix>
>> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
>> Fatal Python error: Py_Initialize: Unable to get the locale encoding
>> ModuleNotFoundError: No module named 'encodings'
>>
>> Current thread 0x00007f91d4861700 (most recent call first):
>> Aborted (core dumped)
>>
>> Seems that I need to set PYHTONHOME like this
>>
>>       export PYTHONHOME="/home/aleksei/anaconda3/envs/idp:$PYTHONHOME"
>>
>> but while this error is fixed I obtain another:
>>
>> File "/home/aleksei/anaconda3/envs/idp/lib/python3.6/struct.py", line
>> 13, in <module>
>>       from _struct import *
>> ModuleNotFoundError: No module named '_struct'
>>
>>
>> So, I am trying to fix it but always obtain one or another error and
>> can not run gpaw-python.
>>
>> Have you seen similar issues?
>>
>>
>> Best wishes,
>> Aleksei
>>
>>
>>    
>>
>>> Best regards,
>>> Gaël
>>>
>>>
>>>> Thanks for help and your time!
>>>>
>>>> Best wishes,
>>>>
>>>> Aleksei
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> gpaw-users mailing list
>>>> gpaw-users at listserv.fysik.dtu.dk
>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>>> _______________________________________________
>>> gpaw-users mailing list
>>> gpaw-users at listserv.fysik.dtu.dk
>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>> _______________________________________________
>> gpaw-users mailing list
>> gpaw-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users



More information about the gpaw-users mailing list