openmm / NNPOps

High-performance operations for neural network potentials
Other
79 stars 17 forks source link

Compilation #116

Open BJWiley233 opened 4 months ago

BJWiley233 commented 4 months ago

It is required to have to build nnpops with version 11.* of cudatoolkit and a 10.3 gxx compile. These are going to be outdated. When I try to compile with own gnu gcc/g++ version 11.4 and Cuda 12.3 I get this error:

CMake Error at /home/coyote/miniconda3/envs/nnpops/share/cmake/Caffe2/Caffe2Targets.cmake:144 (message):
  The imported target "c10_cuda" references the file

     "/home/coyote/miniconda3/envs/nnpops/lib/libc10_cuda.so"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/home/coyote/miniconda3/envs/nnpops/share/cmake/Caffe2/Caffe2Targets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /home/coyote/miniconda3/envs/nnpops/share/cmake/Caffe2/Caffe2Config.cmake:113 (include)
  /home/coyote/miniconda3/envs/nnpops/lib/python3.11/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:13 (find_package)
peastman commented 4 months ago

You may have some sort of conflict in your environment. Possibly you have an incompatible version of PyTorch installed? There are conda packages for CUDA 12, so it definitely can compile.

We should update the environment.yml file in this repository. Replace cudatoolkit with cuda-version, and probably specify a newer PyTorch.

BJWiley233 commented 4 months ago

THanks,

I got it to install with gxx_linux-64 11.3.0, pytorch-gpu from channel pytorch and general cudatoolkit. There are some issues (gaps) I am seeing now between @jharrymoore/openmmtools (MACE) and openmm Simulations which require a Platform with platformProperties that I will eventually submit a PR for.

I'll try later with cuda12, however I was hoping to just use my base CUDA since I am installing on PCs.

RaulPPelaez commented 4 months ago

The cudatoolkit package does not include nvcc. The conda-forge "nvcc" is just a meta package that links to your system nvcc. This can easily get out of sync. I agree we should update the env file with the new conda-forge CUDA packages. This would make it only for CUDA>=12, but I think that is ok. The nvidia channel can be used for previous versions if need be.