Fail to compile GULP (/usr/bin/ld cannot find -lscalapack)


I tried to compile GULP by ./mkgulp -m. (I am using “Intel Parallel Studio XE”. Other programs like VASP and Quantum Espresso are working well using “mpirun -np n XXX” after the compilation, so I think the parallel compiler was correctly installed.)
I failed to compile GULP and a message was obtained:
“/usr/bin/lb can not find -lscalapack”

It seemed that the problem is related to the missing libraries, it can be fixed if I install libscalapack.
I tried “sudo apt-get install libscalapack-mpi-dev”. After the installation was finished, I recompile GULP again, but the same error (/usr/bin/lb can not find -lscalapack) came.

Please help.

Best Regards,

Dawei Wen

Hi Dawei Wen,
The problem you’re having will be because of one or both of the following things:

  1. The library files need to be visible in your library path. If they are in a standard location like /usr/local/lib then they will be visible but if you’ve installed them somewhere else then you’ll need to add the directory to the path for the linker. One way to do this is to add something like “-L/home/my_directory_name/” to the command in front of -lscalapack (obviously change the text to be your real directory name!).
  2. The assumed default name for the library is libscalapack.a. If you’ve installed the library with a different name (e.g. libscalapack-mpi.a perhaps) then you’ll need to change the name that’s given.
    Also look out in case you need to specify the Blacs/Pblas & other libraries explicitly. Intel can be complex & so you may need to use the link line advisor tool to find all the things you need to add for your specific environment.

Thank you. I will try to continue the compilation.