openmm / openmm-torch

OpenMM plugin to define forces with neural networks
185 stars 24 forks source link

Can't install openmm-torch 1.1 with `mamba` #118

Closed yanze039 closed 1 year ago

yanze039 commented 1 year ago

Hi,

When I use mamba install openmm-torch v1.1, I get:

~$ mamba create -n test -c conda-forge openmm-torch=1.1
...
...
Could not solve for environment specs
Encountered problems while solving:
  - nothing provides requested openmm-torch 1.1**

The environment can't be solved, aborting the operation

But conda can actually work,

conda create -n test -c conda-forge openmm-torch=1.1
## Package Plan ##

  environment location: /home/gridsan/ywang3/.conda/envs/test

  added / updated specs:
    - openmm-torch=1.1

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    gmpy2-2.1.2                |  py311h6a5fa03_1         215 KB  conda-forge
    numpy-1.25.2               |  py311h64a7726_0         7.8 MB  conda-forge
    openmm-8.0.0               |  py311h59c6c42_1        10.8 MB  conda-forge
    openmm-torch-1.1           |cuda112py311h20aef98_0         247 KB  conda-forge
    python-3.11.5              |hab00c5b_0_cpython        29.4 MB  conda-forge
    python_abi-3.11            |          3_cp311           6 KB  conda-forge
    pytorch-2.0.0              |cpu_generic_py311h15f7ebb_1        63.4 MB  conda-forge
    ------------------------------------------------------------
                                           Total:       111.7 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge 
  _openmp_mutex      conda-forge/linux-64::_openmp_mutex-4.5-2_gnu 
  bzip2              conda-forge/linux-64::bzip2-1.0.8-h7f98852_4 
  ca-certificates    conda-forge/linux-64::ca-certificates-2023.7.22-hbcca054_0 
  cudatoolkit        conda-forge/linux-64::cudatoolkit-11.8.0-h4ba93d1_12 
  filelock           conda-forge/noarch::filelock-3.12.3-pyhd8ed1ab_0 
  gmp                conda-forge/linux-64::gmp-6.2.1-h58526e2_0 
  gmpy2              conda-forge/linux-64::gmpy2-2.1.2-py311h6a5fa03_1 
  jinja2             conda-forge/noarch::jinja2-3.1.2-pyhd8ed1ab_1 
  ld_impl_linux-64   conda-forge/linux-64::ld_impl_linux-64-2.40-h41732ed_0 
  libabseil          conda-forge/linux-64::libabseil-20230125.3-cxx17_h59595ed_0 
  libblas            conda-forge/linux-64::libblas-3.9.0-18_linux64_openblas 
  libcblas           conda-forge/linux-64::libcblas-3.9.0-18_linux64_openblas 
  libexpat           conda-forge/linux-64::libexpat-2.5.0-hcb278e6_1 
  libffi             conda-forge/linux-64::libffi-3.4.2-h7f98852_5 
  libgcc-ng          conda-forge/linux-64::libgcc-ng-13.1.0-he5830b7_0 
  libgfortran-ng     conda-forge/linux-64::libgfortran-ng-13.1.0-h69a702a_0 
  libgfortran5       conda-forge/linux-64::libgfortran5-13.1.0-h15d22d2_0 
  libgomp            conda-forge/linux-64::libgomp-13.1.0-he5830b7_0 
  liblapack          conda-forge/linux-64::liblapack-3.9.0-18_linux64_openblas 
  libnsl             conda-forge/linux-64::libnsl-2.0.0-h7f98852_0 
  libopenblas        conda-forge/linux-64::libopenblas-0.3.24-pthreads_h413a1c8_0 
  libprotobuf        conda-forge/linux-64::libprotobuf-4.23.3-hd1fb520_1 
  libsqlite          conda-forge/linux-64::libsqlite-3.43.0-h2797004_0 
  libstdcxx-ng       conda-forge/linux-64::libstdcxx-ng-13.1.0-hfd8a6a1_0 
  libuuid            conda-forge/linux-64::libuuid-2.38.1-h0b41bf4_0 
  libuv              conda-forge/linux-64::libuv-1.46.0-hd590300_0 
  libzlib            conda-forge/linux-64::libzlib-1.2.13-hd590300_5 
  markupsafe         conda-forge/linux-64::markupsafe-2.1.3-py311h459d7ec_0 
  mpc                conda-forge/linux-64::mpc-1.3.1-hfe3b2da_0 
  mpfr               conda-forge/linux-64::mpfr-4.2.0-hb012696_0 
  mpmath             conda-forge/noarch::mpmath-1.3.0-pyhd8ed1ab_0 
  ncurses            conda-forge/linux-64::ncurses-6.4-hcb278e6_0 
  networkx           conda-forge/noarch::networkx-3.1-pyhd8ed1ab_0 
  nomkl              conda-forge/noarch::nomkl-1.0-h5ca1d4c_0 
  numpy              conda-forge/linux-64::numpy-1.25.2-py311h64a7726_0 
  ocl-icd            conda-forge/linux-64::ocl-icd-2.3.1-h7f98852_0 
  ocl-icd-system     conda-forge/linux-64::ocl-icd-system-1.0.0-1 
  openmm             conda-forge/linux-64::openmm-8.0.0-py311h59c6c42_1 
  openmm-torch       conda-forge/linux-64::openmm-torch-1.1-cuda112py311h20aef98_0 
  openssl            conda-forge/linux-64::openssl-3.1.2-hd590300_0 
  pip                conda-forge/noarch::pip-23.2.1-pyhd8ed1ab_0 
  python             conda-forge/linux-64::python-3.11.5-hab00c5b_0_cpython 
  python_abi         conda-forge/linux-64::python_abi-3.11-3_cp311 
  pytorch            conda-forge/linux-64::pytorch-2.0.0-cpu_generic_py311h15f7ebb_1 
  readline           conda-forge/linux-64::readline-8.2-h8228510_1 
  setuptools         conda-forge/noarch::setuptools-68.1.2-pyhd8ed1ab_0 
  sleef              conda-forge/linux-64::sleef-3.5.1-h9b69904_2 
  sympy              conda-forge/noarch::sympy-1.12-pypyh9d50eac_103 
  tk                 conda-forge/linux-64::tk-8.6.12-h27826a3_0 
  typing_extensions  conda-forge/noarch::typing_extensions-4.7.1-pyha770c72_0 
  tzdata             conda-forge/noarch::tzdata-2023c-h71feb2d_0 
  wheel              conda-forge/noarch::wheel-0.41.2-pyhd8ed1ab_0 
  xz                 conda-forge/linux-64::xz-5.2.6-h166bdaf_0 
RaulPPelaez commented 1 year ago

Your mamba line works fine for me as of right now. Might it have been a temporary problem? Please do try again. Otherwise we would need more information, since I cannot reproduce the problem.

yanze039 commented 1 year ago

Thanks! but I have another issue when installing pytorch v2.0 (cuda) and openmm-torch v1.1

openmm-torch v1.1 specifies pytorch version as

openmm-torch=1.1 -> pytorch[version='>=2.0.0,<2.1.0a0']

But when I try to install pytorch v2.0 from condo-forge, I get:

$ conda create -n test pytorch=2=*cuda* -c conda-forge
...
...
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.35=0
  - feature:/linux-64::__unix==0=0
  - feature:|@/linux-64::__glibc==2.35=0
  - feature:|@/linux-64::__unix==0=0
  - pytorch==2[build=*cuda*] -> __cuda
  - pytorch==2[build=*cuda*] -> nccl[version='>=2.14.3.1,<3.0a0'] -> __cuda[version='10.2|10.2.*|11.0|11.0.*|>=11.2,<12|11.1|11.1.*']

Your installed version is: 0

Note that strict channel priority may have removed packages required for satisfiability.

Otherwise, openmm-torch 1.1 will install a pytorch-cpu version by default, but I would like to have a GPU one.

I am installing this on a Linux SLURM cluster login node.

ywang3@login-3:~$ hostnamectl
 Static hostname: login-3
       Icon name: computer-server
         Chassis: server
      Machine ID: 174adb62242b42c0b0f92513faff5d1a
         Boot ID: 4f4e21f09f8a48ba95cc344e82c73a1f
Operating System: GridOS 22.04.2                  
          Kernel: Linux 5.10.188-llgrid
    Architecture: x86-64
 Hardware Vendor: HPE
  Hardware Model: ProLiant DL380 Gen10

Do you have any idea why in this situation?

RaulPPelaez commented 1 year ago

This happens because conda is not finding some things in your environment. Have not seen this particular error before, but it seems to have problems with glibc and CUDA. CUDA you can get around with the env variable CONDA_OVERRIDE_CUDA. The glibc and unix things though I have no idea. Just as a guess by the info you provided, you seem to be trying to install this from a login node in some cluster. I would try to go into a compute node and try there.

yanze039 commented 1 year ago

Thanks, that's helpful.

CONDA_OVERRIDE_CUDA=11.8 CONDA_OVERRIDE_GLIBC=2.35 conda create -n test pytorch=2=*cuda* -c conda-forge

I used this command then and it works fine now.

Also, mamba error seems temporary, it works now.

RaulPPelaez commented 1 year ago

Hope it runs too :P