jrs65 / scalapy

A python wrapper around ScaLAPACK
32 stars 12 forks source link

installation problem of scalapy #29

Open neuronphysics opened 6 years ago

neuronphysics commented 6 years ago

I have installed scalapack already in my machine at this address # export SCALAPACK=/usr/local/scalapack/libscalapack.a # but when I tried to install scalapy I got the following error message:

gcc -pthread -shared -B /home/anaconda2/compiler_compat -L/home/anaconda2/lib -Wl,-rpath=/home/anaconda2/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-2.7/scalapy/blacs.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/home/anaconda2/lib -lscalapack -lgfortran -lpython2.7 -o build/lib.linux-x86_64-2.7/scalapy/blacs.so -pthread -Wl,-rpath -Wl,/home/.openmpi/lib -Wl,--enable-new-dtags -L/home/.openmpi/lib -lmpi
/home/anaconda2/compiler_compat/ld: cannot find -lscalapack
collect2: error: ld returned 1 exit status
/home/anaconda2/compiler_compat/ld: cannot find -lscalapack
collect2: error: ld returned 1 exit status
error: Command "gcc -pthread -shared -B /home/anaconda2/compiler_compat -L/home/anaconda2/lib -Wl,-rpath=/home/anaconda2/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-2.7/scalapy/blacs.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/home/anaconda2/lib -lscalapack -lgfortran -lpython2.7 -o build/lib.linux-x86_64-2.7/scalapy/blacs.so -pthread -Wl,-rpath -Wl,/home/.openmpi/lib -Wl,--enable-new-dtags -L/home/.openmpi/lib -lmpi" failed with exit status 1

How should I fix this issue in order to be able to install this package in my machine?

jrs65 commented 6 years ago

You need to point the compiler to the directory where scalapack is. It is probably sufficient to set the environment variable LIBRARY_PATH=/usr/local/scalapack/ before running setup.py if you are building against a static library (as it looks like you are). If you build against a dynamic library you may need to additionally set LD_LIBRARY_PATH before running as you have scalapack in a location that the linker won't search by default.

dgrin1 commented 2 years ago

When I install scalapy, I get the following, Python 3.9.12 (main, Apr 5 2022, 01:52:34) [Clang 12.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.

import scalapy Traceback (most recent call last): File "", line 1, in File "/Users/dgrin/scalapy/scalapy/init.py", line 12, in from .core import * File "/Users/dgrin/scalapy/scalapy/core.py", line 43, in from . import blacs ImportError: cannot import name 'blacs' from partially initialized module 'scalapy' (most likely due to a circular import) (/Users/dgrin/scalapy/scalapy/init.py)

openblas and salapack are all installed. any thoughts?