Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Failed to build openfold #677

Open
AlejandroSanchezCano opened this issue Apr 16, 2024 · 3 comments
Open

Failed to build openfold #677

AlejandroSanchezCano opened this issue Apr 16, 2024 · 3 comments

Comments

@AlejandroSanchezCano
Copy link

Bug description
Unable to install openfold

Reproduction steps
I have run pip install "fair-esm[esmfold]" and pip install 'dllogger @ git+https://github.com/NVIDIA/dllogger.git' as the README indicates. Then I make sure I have nvcc installed with conda install cuda-nvcc -c nvidia. However, when I run pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307' I get the following installation error:

Collecting openfold@ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307
  Cloning https://github.com/aqlaboratory/openfold.git (to revision 4b41059694619831a7db195b7e0988fc4ff3a307) to /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda
  Running command git clone --filter=blob:none --quiet https://github.com/aqlaboratory/openfold.git /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda
  Running command git rev-parse -q --verify 'sha^4b41059694619831a7db195b7e0988fc4ff3a307'
  Running command git fetch -q https://github.com/aqlaboratory/openfold.git 4b41059694619831a7db195b7e0988fc4ff3a307
  Running command git checkout -q 4b41059694619831a7db195b7e0988fc4ff3a307
  Resolved https://github.com/aqlaboratory/openfold.git to commit 4b41059694619831a7db195b7e0988fc4ff3a307
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: openfold
  Building wheel for openfold (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [238 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/home/asanchez/miniforge3/envs/manual'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/openfold
      copying openfold/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold
      copying openfold/config.py -> build/lib.linux-x86_64-cpython-38/openfold
      creating build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/suppress_output.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/tensor_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/seed.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/exponential_moving_average.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/rigid_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/superimposition.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/trace_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/lr_schedulers.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/chunk_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/import_weights.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/loss.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/checkpointing.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/argparse.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/callbacks.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/validation_metrics.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/logger.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      copying openfold/utils/feats.py -> build/lib.linux-x86_64-cpython-38/openfold/utils
      creating build/lib.linux-x86_64-cpython-38/openfold/resources
      copying openfold/resources/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/resources
      creating build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/torchscript.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/heads.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/primitives.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/structure_module.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/model.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/triangular_multiplicative_update.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/template.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/embedders.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/pair_transition.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/msa.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/outer_product_mean.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/evoformer.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/dropout.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      copying openfold/model/triangular_attention.py -> build/lib.linux-x86_64-cpython-38/openfold/model
      creating build/lib.linux-x86_64-cpython-38/openfold/np
      copying openfold/np/residue_constants.py -> build/lib.linux-x86_64-cpython-38/openfold/np
      copying openfold/np/protein.py -> build/lib.linux-x86_64-cpython-38/openfold/np
      copying openfold/np/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/np
      creating build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/templates.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/data_modules.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/data_pipeline.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/errors.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/mmcif_parsing.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/input_pipeline.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/parsers.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/data_transforms.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      copying openfold/data/feature_pipeline.py -> build/lib.linux-x86_64-cpython-38/openfold/data
      creating build/lib.linux-x86_64-cpython-38/openfold/utils/kernel
      copying openfold/utils/kernel/attention_core.py -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel
      copying openfold/utils/kernel/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel
      creating build/lib.linux-x86_64-cpython-38/openfold/np/relax
      copying openfold/np/relax/relax.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax
      copying openfold/np/relax/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax
      copying openfold/np/relax/utils.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax
      copying openfold/np/relax/amber_minimize.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax
      copying openfold/np/relax/cleanup.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax
      creating build/lib.linux-x86_64-cpython-38/openfold/data/tools
      copying openfold/data/tools/hhsearch.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools
      copying openfold/data/tools/jackhmmer.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools
      copying openfold/data/tools/hhblits.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools
      copying openfold/data/tools/__init__.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools
      copying openfold/data/tools/utils.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools
      copying openfold/data/tools/kalign.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools
      running egg_info
      creating openfold.egg-info
      writing openfold.egg-info/PKG-INFO
      writing dependency_links to openfold.egg-info/dependency_links.txt
      writing top-level names to openfold.egg-info/top_level.txt
      writing manifest file 'openfold.egg-info/SOURCES.txt'
      reading manifest file 'openfold.egg-info/SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file 'openfold.egg-info/SOURCES.txt'
      /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'openfold.utils.kernel.csrc' is absent from the `packages` configuration.
      !!

              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'openfold.utils.kernel.csrc' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.

              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'openfold.utils.kernel.csrc' is explicitly added
              to the `packages` configuration field.

              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).

              You can read more about "package discovery" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

              If you don't want 'openfold.utils.kernel.csrc' to be distributed and are
              already explicitly excluding 'openfold.utils.kernel.csrc' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.

              You can read more about "package data files" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************

      !!
        check.warn(importable)
      creating build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      copying openfold/utils/kernel/csrc/compat.h -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      copying openfold/utils/kernel/csrc/softmax_cuda_kernel.cu -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      copying openfold/utils/kernel/csrc/softmax_cuda.cpp -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      copying openfold/utils/kernel/csrc/compat.h -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      copying openfold/utils/kernel/csrc/softmax_cuda.cpp -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      copying openfold/utils/kernel/csrc/softmax_cuda_kernel.cu -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      running build_ext
      /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/utils/cpp_extension.py:415: UserWarning: The detected CUDA version (12.4) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/utils/cpp_extension.py:425: UserWarning: There are no g++ version bounds defined for CUDA version 12.4
        warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
      building 'attn_core_inplace_cuda' extension
      creating /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38
      creating /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold
      creating /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils
      creating /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel
      creating /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
      Emitting ninja build file /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      [1/2] /home/asanchez/miniforge3/envs/manual/bin/nvcc --generate-dependencies-with-compile --dependency-output /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda_kernel.o.d -I/gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/ -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/TH -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/THC -I/home/asanchez/miniforge3/envs/manual/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/include/python3.8 -c -c /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/softmax_cuda_kernel.cu -o /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 --use_fast_math -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -std=c++14 -maxrregcount=50 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda -gencode arch=compute_37,code=sm_37 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_52,code=sm_52 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=attn_core_inplace_cuda -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda_kernel.o
      /home/asanchez/miniforge3/envs/manual/bin/nvcc --generate-dependencies-with-compile --dependency-output /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda_kernel.o.d -I/gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/ -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/TH -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/THC -I/home/asanchez/miniforge3/envs/manual/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/include/python3.8 -c -c /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/softmax_cuda_kernel.cu -o /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 --use_fast_math -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -std=c++14 -maxrregcount=50 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda -gencode arch=compute_37,code=sm_37 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_52,code=sm_52 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=attn_core_inplace_cuda -D_GLIBCXX_USE_CXX11_ABI=0
      nvcc fatal   : Unsupported gpu architecture 'compute_37'
      [2/2] c++ -MMD -MF /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda.o.d -pthread -B /gpfs/home2/asanchez/miniforge3/envs/manual/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /gpfs/home2/asanchez/miniforge3/envs/manual/include -fPIC -O2 -isystem /gpfs/home2/asanchez/miniforge3/envs/manual/include -fPIC -I/gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/ -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/TH -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/THC -I/home/asanchez/miniforge3/envs/manual/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/include/python3.8 -c -c /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/softmax_cuda.cpp -o /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda.o -O3 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=attn_core_inplace_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
      FAILED: /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda.o
      c++ -MMD -MF /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda.o.d -pthread -B /gpfs/home2/asanchez/miniforge3/envs/manual/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /gpfs/home2/asanchez/miniforge3/envs/manual/include -fPIC -O2 -isystem /gpfs/home2/asanchez/miniforge3/envs/manual/include -fPIC -I/gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/ -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/TH -I/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/THC -I/home/asanchez/miniforge3/envs/manual/include -I/gpfs/home2/asanchez/miniforge3/envs/manual/include/python3.8 -c -c /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/softmax_cuda.cpp -o /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/build/temp.linux-x86_64-cpython-38/openfold/utils/kernel/csrc/softmax_cuda.o -O3 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=attn_core_inplace_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
      In file included from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/c10/util/TypeList.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/c10/util/Metaprogramming.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/c10/core/DispatchKeySet.h:4,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/c10/core/Backend.h:5,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/c10/core/Layout.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:12,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/ATen/core/Tensor.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/torch/extension.h:5,
                       from /gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/openfold/utils/kernel/csrc/softmax_cuda.cpp:17:
      /gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/include/c10/util/C++17.h:16:2: error: #error "You're trying to build PyTorch with a too old version of GCC. We need GCC 9 or later."
       #error \
        ^~~~~
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2096, in _run_ninja_build
          subprocess.run(
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/subprocess.py", line 516, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/gpfs/scratch1/nodespecific/int5/asanchez/pip-install-yzh9q00n/openfold_7af32a18fac0403f9b2d832d6ec90fda/setup.py", line 74, in <module>
          setup(
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/__init__.py", line 104, in setup
          return distutils.core.setup(**attrs)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 368, in run
          self.run_command("build")
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 91, in run
          _build_ext.run(self)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
          self.build_extensions()
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 871, in build_extensions
          build_ext.build_extensions(self)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
          self._build_extensions_serial()
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
          self.build_extension(ext)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 252, in build_extension
          _build_ext.build_extension(self, ext)
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 560, in build_extension
          objects = self.compiler.compile(
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 684, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/gpfs/home2/asanchez/miniforge3/envs/manual/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2112, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for openfold
  Running setup.py clean for openfold
Failed to build openfold
ERROR: Could not build wheels for openfold, which is required to install pyproject.toml-based projects
@luiswyss
Copy link

I am facing the same issue and am linking the relevant issue from the openfold repo: aqlaboratory/openfold#427

@luiswyss
Copy link

I was able to solve the issue by modifying the environment as follows:
replace
- conda-forge::cudatoolkit==11.3.*
with
- conda-forge::cudatoolkit-dev==11.3.*

and include:
- conda-forge::mkl=2024.0.0
since otherwise you will run into the problem described here : pytorch/pytorch#123097

While you're at it, do yourself the favour and also include:
- conda-forge::einops==0.6.1
so you don't have to visit this one: #626.

N-Hoffmann added a commit to IGDRion/ANNEXA that referenced this issue May 6, 2024
* Force downgrade of mkl to 2024.0.0

Bug related to mkl prevents annexa from working using singularity, need to downgrade to older version of mkl and einops facebookresearch/esm#677 (comment)

* Revert "Force downgrade of mkl to 2024.0.0"

This reverts commit c347cc5.

* Revert

* Force mkl downgrade to 2024.0.0
N-Hoffmann added a commit to IGDRion/ANNEXA that referenced this issue May 6, 2024
* Force downgrade of mkl to 2024.0.0

Bug related to mkl prevents annexa from working using singularity, need to downgrade to older version of mkl and einops facebookresearch/esm#677 (comment)

* Revert "Force downgrade of mkl to 2024.0.0"

This reverts commit c347cc5.

* Revert

* Force mkl downgrade to 2024.0.0

* Update environment.yml
N-Hoffmann added a commit to IGDRion/ANNEXA that referenced this issue May 6, 2024
* Force downgrade of mkl to 2024.0.0

Bug related to mkl prevents annexa from working using singularity, need to downgrade to older version of mkl and einops facebookresearch/esm#677 (comment)

* Revert "Force downgrade of mkl to 2024.0.0"

This reverts commit c347cc5.

* Revert

* Force mkl downgrade to 2024.0.0

* Update environment.yml

* Update environment.yml
@cftpontes
Copy link

cftpontes commented Jul 2, 2024

I was able to solve the issue by modifying the environment as follows: replace - conda-forge::cudatoolkit==11.3.* with - conda-forge::cudatoolkit-dev==11.3.*

and include: - conda-forge::mkl=2024.0.0 since otherwise you will run into the problem described here : pytorch/pytorch#123097

While you're at it, do yourself the favour and also include: - conda-forge::einops==0.6.1 so you don't have to visit this one: #626.

Even with these fixes I'm still getting the "failed building wheel for openfold" error :-(
Is someone else facing the same problem?

Could it be some problem related to cuda or nvcc?
I have cuda version 11.6 on pytorch and nvcc is installed:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:13_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants