Amber-MD / cpptraj

Biomolecular simulation trajectory/data analysis.
Other
138 stars 64 forks source link

configure error #1021

Closed mayank-kohli closed 11 months ago

mayank-kohli commented 1 year ago

Hi, I am getting the following error: image image

drroe commented 1 year ago

Can you provide your complete configure line?

mayank-kohli commented 1 year ago

./configure -cuda CUDA_HOME=/usr/local/cuda-11.7/ -shared

drroe commented 1 year ago

I think what may be happening here is that you initially ran configure without the -shared option, so all your libraries that configure built (like HDF5) were built without shared support. Try running without the -shared option, or remove everything from the $CPPTRAJHOME/lib directory and rebuild everything with -shared on, e.g.

CUDA_HOME=/usr/local/cuda-11.7 ./configure --buildlibs -shared -cuda

Hopefully that will do the trick.

mayank-kohli commented 1 year ago

image still getting the same error

drroe commented 1 year ago

Strange - I've never encountered this error before. My guess is that for some reason on your system, when cpptraj builds the HDF5 library it's dynamically linking to an existing libcurl, whereas on all the systems I've tested this on this doesn't happen for some reason. What if you add -lcurl to the LDFLAGS variable? E.g.:

LDFLAGS=-lcurl CUDA_HOME=/usr/local/cuda-11.7 ./configure --buildlibs -shared -cuda 
mayank-kohli commented 1 year ago

Hi the issue got resolved I was able to configure it. But after make install, when I ran make check, I got this error.

image

mayank-kohli commented 1 year ago

I have one more thing to add, the link for netcdf mentioned in config file is not working.

drroe commented 1 year ago

I need some more info/context to figure out what might be going on. Did you source the cpptraj.sh shell script created in the CPPTRAJ install directory? What OS are you compiling under, and what is the output of uname -a? What is the configure line that finally worked for you? What is the output of cpptraj --defines?

the link for netcdf mentioned in config file is not working.

Do you mean configure tries to download netcdf and fails? Or something else? Please be as specific as possible. The more information I have the better chance I have to figure out what is going on.

mayank-kohli commented 1 year ago
  1. I did source the CPPTRAJ.
  2. I am using ubuntu 20.04 3.uname -a: Linux BIO-WK-025 5.14.0-1057-oem #64-Ubuntu SMP Mon Jan 23 17:02:19 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  3. Line worked: LDFLAGS=-lcurl CUDA_HOME=/usr/local/cuda-11.7 ./configure --buildlibs -shared -cuda
  4. cpptraj --defines : did not gave anyoutput
  5. The configurefile tries to download it but it fails after sometime, so I went to that particular link I was not able to to access it, the same versions(v4.6.1) are shifted to the github page.
drroe commented 1 year ago

cpptraj --defines : did not gave anyoutput

This seems like a problem. I'm guessing which cpptraj returns nothing as well? If that's the case, your PATH environment variable was not properly set. Are you using C-shell? If that's the case then sourcing cpptraj.sh won't work, since that's set up for shells like bash, zsh, dash, etc.

If you have c-shell, try the following:

$> setenv CPPTRAJHOME "<directory containing cpptraj"
$> setenv PATH "$CPPTRAJHOME/bin:$PATH"
$> setenv LD_LIBRARY_PATH "$AMBERHOME/lib:$LD_LIBRARY_PATH"

And then try going to $CPPTRAJHOME/test/Test_General and executing ./RunTest.sh. If that works, try running all the tests.

mayank-kohli commented 1 year ago

After performing above commands I am still getting anything after running cpptraj --defines

But when I ran #cpptraj.cuda I got this: image

drroe commented 1 year ago

But when I ran #cpptraj.cuda I got this:

Yikes - I totally forgot you configured with -cuda, so of course cpptraj.cuda was produced instead of cpptraj. Try running make test.cuda instead of make test.

drroe commented 11 months ago

Since this hasn't been updated for a few months I'm hoping it was resolved. If not, please reopen it. Thanks!