Open jakirkham opened 5 years ago
The compilers
are needed only for end-user environments but not for nvcc
dependent recipes that would use compiler("cxx")
, etc. Is this statement true in general?
That's the current state of things, yes.
Is there a way to differentiate the two cases from the nvcc recipe? That is, how to ensure that compilers
dependence is not effective when nvcc
is specified as a dependency of a third recipe?
If this is not possible, this issue seems unresolvable, IIUC.
It's really up to users to know how to handle both cases right now. The situation is a bit suboptimal, but as you say there may not be many options here.
One thing we might consider is solving this on the compilers
side, by providing a cuda-compiler
in that package.
The recipe side can at least be improved by documentation.
So perhaps the short answer is we don't solve this issue with the suggested solution in the OP, but we use these two other fixes to get at the problem.
I think resolving this issue is necessary, otherwise the readme of this feedstock is misleading:
$ conda create -n trash -c conda-forge python=3.7 nvcc_linux-64
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.7.12
latest version: 4.8.2
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /home/leofang/miniconda3/envs/trash
added / updated specs:
- nvcc_linux-64
- python=3.7
The following packages will be downloaded:
package | build
---------------------------|-----------------
_openmp_mutex-4.5 | 0_gnu 435 KB conda-forge
certifi-2019.11.28 | py37hc8dfbb8_0 149 KB conda-forge
nvcc_linux-64-10.2 | hc6a2c23_6 7 KB conda-forge
python-3.7.6 |h357f687_4_cpython 52.9 MB conda-forge
python_abi-3.7 | 1_cp37m 4 KB conda-forge
setuptools-46.0.0 | py37hc8dfbb8_1 639 KB conda-forge
------------------------------------------------------------
Total: 54.1 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-0_gnu
ca-certificates conda-forge/linux-64::ca-certificates-2019.11.28-hecc5488_0
certifi conda-forge/linux-64::certifi-2019.11.28-py37hc8dfbb8_0
ld_impl_linux-64 conda-forge/linux-64::ld_impl_linux-64-2.33.1-h53a641e_8
libffi conda-forge/linux-64::libffi-3.2.1-he1b5a44_1006
libgcc-ng conda-forge/linux-64::libgcc-ng-9.2.0-h24d8f2e_2
libgomp conda-forge/linux-64::libgomp-9.2.0-h24d8f2e_2
libstdcxx-ng conda-forge/linux-64::libstdcxx-ng-9.2.0-hdf63c60_2
ncurses conda-forge/linux-64::ncurses-6.1-hf484d3e_1002
nvcc_linux-64 conda-forge/linux-64::nvcc_linux-64-10.2-hc6a2c23_6
openssl conda-forge/linux-64::openssl-1.1.1d-h516909a_0
pip conda-forge/noarch::pip-20.0.2-py_2
python conda-forge/linux-64::python-3.7.6-h357f687_4_cpython
python_abi conda-forge/linux-64::python_abi-3.7-1_cp37m
readline conda-forge/linux-64::readline-8.0-hf8c457e_0
setuptools conda-forge/linux-64::setuptools-46.0.0-py37hc8dfbb8_1
sqlite conda-forge/linux-64::sqlite-3.30.1-hcee41ef_0
tk conda-forge/linux-64::tk-8.6.10-hed695b0_0
wheel conda-forge/noarch::wheel-0.34.2-py_1
xz conda-forge/linux-64::xz-5.2.4-h14c3975_1001
zlib conda-forge/linux-64::zlib-1.2.11-h516909a_1006
Proceed ([y]/n)?
Downloading and Extracting Packages
certifi-2019.11.28 | 149 KB | ############################################################################################################################ | 100%
python_abi-3.7 | 4 KB | ############################################################################################################################ | 100%
nvcc_linux-64-10.2 | 7 KB | ############################################################################################################################ | 100%
_openmp_mutex-4.5 | 435 KB | ############################################################################################################################ | 100%
python-3.7.6 | 52.9 MB | ############################################################################################################################ | 100%
setuptools-46.0.0 | 639 KB | ############################################################################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate trash
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda activate trash
File /usr/lib64/stubs/libcuda.so doesn't exist
$ which nvcc
/home/leofang/miniconda3/envs/trash/bin/nvcc
$ nvcc --help
/home/leofang/miniconda3/envs/trash/bin/nvcc: line 2: /bin/nvcc: No such file or directory
Basically the installed nvcc
is unusable for general users...
Originally when working on this recipe, we added C/C++ compilers as runtime dependencies. However we wound up dropping them after discussion in this thread. Namely it meant managing the C/C++ compilers'
run_exports
, which we didn't want to do. However given some of challenges encountered in usage like in issue ( https://github.com/conda-forge/nvcc-feedstock/issues/22 ), it might be worth revisiting this. Opening this issue for discussion on this topic.