CompPhysVienna / n2p2

n2p2 - A Neural Network Potential Package
https://compphysvienna.github.io/n2p2/
GNU General Public License v3.0
217 stars 82 forks source link

Problem with building nnp-scaling #144

Open rajorshichat opened 2 years ago

rajorshichat commented 2 years ago

Hello, I am trying to make the nnp-scaling library. However, I get the following error -

make[1]: Entering directory '/home/rajorshi/n2p2/src/application' mpic++ -O3 -march=native -std=c++11 -g -pedantic-errors -Wall -Wextra -I./ -I../../include/ -I/usr/include/gsl-2.7.1 -DEIGEN_DONT_PARALLELIZE -o nnp-scaling.o -c nnp-scaling.cpp mpic++ -O3 -march=native -std=c++11 -g -pedantic-errors -Wall -Wextra -DEIGEN_DONT_PARALLELIZE -o nnp-scaling nnp-scaling.o ../../lib/libnnptrain.a ../../lib/libnnp.a -lgsl -lblas -lgsl -lgslcblas /usr/bin/ld: cannot find -lgsl /usr/bin/ld: cannot find -lgsl /usr/bin/ld: cannot find -lgslcblas collect2: error: ld returned 1 exit status

I have built Eigen and GSL libraries separately and put them as path variables. I am working on a Ubuntu 18.04 system. Can you help me solve this problem ?

philippmisof commented 2 years ago

Since you're using Ubuntu it should not be necessary to build Eigen and GSL yourself since the binaries are already provided as packages (except if you want to compile it with different flags). I have listed all dependencies and the package names for Ubuntu here: b0ce41e669e54286590eb852fb575c33b2bf9014 Installing the packages from the official Ubuntu repository may already solve your issue. If not or if you would like to use your own compiled libraries you can follow the instructions I have explained for Eigen in https://github.com/CompPhysVienna/n2p2/issues/133#issuecomment-989871874 The principle is the same for GSL except that for Option 2 you have to set PROJECT_GSL accordingly.

cedenoruel commented 2 years ago

Hello, I am trying to make the nnp-scaling library. However, I get the following error -

make[1]: Entering directory '/home/rajorshi/n2p2/src/application' mpic++ -O3 -march=native -std=c++11 -g -pedantic-errors -Wall -Wextra -I./ -I../../include/ -I/usr/include/gsl-2.7.1 -DEIGEN_DONT_PARALLELIZE -o nnp-scaling.o -c nnp-scaling.cpp mpic++ -O3 -march=native -std=c++11 -g -pedantic-errors -Wall -Wextra -DEIGEN_DONT_PARALLELIZE -o nnp-scaling nnp-scaling.o ../../lib/libnnptrain.a ../../lib/libnnp.a -lgsl -lblas -lgsl -lgslcblas /usr/bin/ld: cannot find -lgsl /usr/bin/ld: cannot find -lgsl /usr/bin/ld: cannot find -lgslcblas collect2: error: ld returned 1 exit status

I have built Eigen and GSL libraries separately and put them as path variables. I am working on a Ubuntu 18.04 system. Can you help me solve this problem ?

Hi @rajorshichat, did you manage to fix this issue? I have the same error message in HPC cluster. Thanks in advance for your feedback.