Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[S]cannot enforce USE flag 'cuda' for sci-libs/cholmod-2.1.2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
archenroot
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2011
Posts: 118

PostPosted: Mon Jun 19, 2017 10:51 am    Post subject: [S]cannot enforce USE flag 'cuda' for sci-libs/cholmod-2.1.2 Reply with quote

I am facing interesting (to me :-) ) situation with cholmod package which I cannot compile with CUDA support.

I created entry in package.use:
Code:
ares portage # cat /etc/portage/package.use/sci-libs |grep cuda
sci-libs/cholmod cuda lapack metis


as per ebuild file where are these defined:
Code:
IUSE="cuda doc lapack metis minimal static-libs"



Strange is when I do use flag query, there is NO CUDA listed at all:
Code:
ares portage # equery u cholmod
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sci-libs/cholmod-2.1.2:
 U I
 - - doc         : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead
                   of globally
 + + lapack      : Add support for the virtual/lapack numerical library
 + + metis       : Enable the Partition module to cholmod using sci-libs/metis
 - - minimal     : Install a very minimal build (disables, for example, plugins, fonts, most drivers,
                   non-critical features)
 - - static-libs : Build static versions of dynamic libraries as well


But when I do dependency graph print I see dependency defined on CUDA drivers and toolkit:
Code:
ares portage # equery g cholmod
 * Searching for cholmod ...

 * dependency graph for sci-libs/cholmod-2.1.2
 `--  sci-libs/cholmod-2.1.2  amd64
   `--  sci-libs/amd-2.3.1  (>=sci-libs/amd-2.3) amd64
   `--  sci-libs/colamd-2.8.0  (>=sci-libs/colamd-2.8) amd64
   `--  x11-drivers/nvidia-drivers-381.22  (x11-drivers/nvidia-drivers) amd64
   `--  dev-util/nvidia-cuda-toolkit-8.0.61  (dev-util/nvidia-cuda-toolkit) ~amd64
   `--  virtual/lapack-3.6-r100  (virtual/lapack) ~amd64
   `--  sci-libs/camd-2.3.1  (>=sci-libs/camd-2.3) amd64
   `--  sci-libs/ccolamd-2.8.0  (>=sci-libs/ccolamd-2.8) amd64
   `--  sci-libs/metis-4.0.3  (sci-libs/metis) amd64
   `--  sci-libs/parmetis-3.2.0  (sci-libs/parmetis) amd64
   `--  virtual/pkgconfig-0-r1  (virtual/pkgconfig) amd64
   `--  virtual/latex-base-1.0  (virtual/latex-base) amd64
   `--  app-portage/elt-patches-20170317  (>=app-portage/elt-patches-20170317) amd64
[ sci-libs/cholmod-2.1.2 stats: packages (13), max depth (1) ]


So one showing cuda not available, other view shows there is cuda dependency :-)

But when I try to emerge I cannot get cuda activated, it is in () brackets marked as disabled:
Code:
Calculating dependencies... done!
[ebuild   R    ] sci-libs/cholmod-2.1.2::gentoo  USE="lapack metis (-cuda) -doc -minimal -static-libs" 0 KiB


The situation appered when pulling in suitesparse with cuda support which fails on:
Code:
emerge: there are no ebuilds to satisfy ">=sci-libs/cholmod-2.1.2[cuda?,doc?,metis?,lapack?]".


As per dependency list:
Code:
ares portage # equery d cholmod
 * These packages depend on cholmod:
sci-libs/ceres-solver-1.12.0 (sparse ? sci-libs/cholmod:0)
sci-libs/spqr-1.3.1 (>=sci-libs/cholmod-2[metis?])
sci-libs/suitesparse-4.2.1 (>=sci-libs/cholmod-2.1.2[cuda?,doc?,metis?,lapack?])
sci-libs/umfpack-5.6.2 (cholmod ? >=sci-libs/cholmod-2[-minimal])


I don't mask anywhere CUDA neither is not somehow "blocked" in ebuild, I have in general cuda use flag enable system wide now and don't override it on any place under /etc/portage.

Thanks for suggestions...

Ladislav
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force


Last edited by archenroot on Mon Jun 19, 2017 11:31 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 37961
Location: 56N 3W

PostPosted: Mon Jun 19, 2017 11:09 am    Post subject: Reply with quote

archenroot,

The USE=(-cuda) shows that cuda is forced off in your profile.
You can have cuda but you need to amend your profile first.

Read about package.use.mask in
Code:
man portage

USE flags are usually masked for good reason. Find out why cuda is masked so you understand what you are letting yourself in for.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
archenroot
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2011
Posts: 118

PostPosted: Mon Jun 19, 2017 11:15 am    Post subject: Reply with quote

I got to this point, but this is the only package that is having problems with cuda enabled, others works just fine... still this point to profile mask?

I did list of cuda within whole /etc and there is not such file which enforce masking:
Code:
ares etc # grep -R cuda
profile:export CUDA_TOOLKIT_ROOT_DIR=/opt/cuda
profile:export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/cuda/lib64:/opt/cuda/extras/CUPTI/lib64"
csh.env:setenv PATH '/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/usr/games/bin:/opt/cuda/bin:/opt/cuda/libnvvp'
csh.env:setenv ROOTPATH '/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/opt/cuda/bin'
Binary file ld.so.cache matches
env.d/99cuda:PATH=/opt/cuda/bin:/opt/cuda/libnvvp
env.d/99cuda:ROOTPATH=/opt/cuda/bin
env.d/99cuda:LDPATH=/opt/cuda/lib64:/opt/cuda/lib:/opt/cuda/nvvm/lib64
profile.env:export PATH='/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/usr/games/bin:/opt/cuda/bin:/opt/cuda/libnvvp'
profile.env:export ROOTPATH='/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/opt/cuda/bin'
Binary file udev/hwdb.bin matches
portage/package.use/sci-libs:sci-libs/cholmod cuda lapack metis
portage/package.use/sci-libs:sci-libs/pcl cuda opengl openni openni2 png qt5 usb vtk
portage/package.use/dev-util:dev-util/nvidia-cuda-toolkit debugger doc eclipse profiler
portage/package.use/dev-util:# required by dev-util/nvidia-cuda-toolkit-6.5.14::gentoo[debugger]
portage/package.use/dev-util:# required by dev-util/nvidia-cuda-toolkit (argument)
portage/package.use/dev-util:# required by dev-util/nvidia-cuda-toolkit-6.5.14::gentoo
portage/package.use/dev-util:# required by dev-util/nvidia-cuda-toolkit (argument)
portage/package.use/dev-util:# required by dev-util/nvidia-cuda-toolkit-6.5.14::gentoo[debugger]
portage/package.use/dev-util:# required by dev-util/nvidia-cuda-toolkit (argument)
portage/package.use/media-libs:media-libs/opencv cuda examples ffmpeg java opengl png qt5 threads tiff v4l webp contrib contrib_cvv contrib_hdf contrib_xfeatures2d vtk vaapi
portage/package.use/dev-cpp:dev-cpp/eigen c++11 cuda
portage/make.conf:     dbus cuda -gnome -qt4 qt5 jpeg lock session startup-notification \
portage/package.keywords/dev-libs:=dev-libs/nvidia-cuda-cudnn-8.0 ~amd64
portage/package.keywords/sci-libs:# required by sci-libs/torch7-9999::TAJJADA[cuda]
portage/package.keywords/sci-libs:# required by sci-libs/torch7-9999::TAJJADA[cuda]
portage/package.keywords/sci-libs:=dev-libs/nvidia-cuda-cudnn-7.0 ~amd64
portage/package.keywords/dev-util:# required by =dev-util/nvidia-cuda-toolkit-7.5.18-r2 (argument)
portage/package.keywords/dev-util:=dev-util/nvidia-cuda-toolkit-7.5.18-r2 ~amd64
portage/package.keywords/dev-util:>=dev-util/nvidia-cuda-toolkit-8.0.44 ~amd64
portage/package.keywords/dev-util:>=dev-util/nvidia-cuda-sdk-8.0.44 ~amd64
portage/package.license/dev-util:# required by dev-util/nvidia-cuda-toolkit (argument)
portage/package.license/dev-util:=dev-util/nvidia-cuda-toolkit-6.5.14 NVIDIA-CUDA
portage/package.license/dev-util:# required by =dev-util/nvidia-cuda-toolkit-7.5.18-r2 (argument)
portage/package.license/dev-util:=dev-util/nvidia-cuda-toolkit-7.5.18-r2 NVIDIA-CUDA
portage/package.license/dev-util:# required by =dev-util/nvidia-cuda-toolkit-8.0.44 (argument)
portage/package.license/dev-util:>=dev-util/nvidia-cuda-toolkit-8.0.44 NVIDIA-CUDA
portage/package.license/cuda:# required by =dev-libs/nvidia-cuda-cudnn-8.0 (argument)
portage/package.license/cuda:>=dev-libs/nvidia-cuda-cudnn-8.0 cuDNN-EULA
grep: runlevels/default/net.wlp2s0: No such file or directory
grep: runlevels/boot/swapfiles: No such file or directory
grep: runlevels/boot/tmpfiles.setup: No such file or directory
grep: runlevels/sysinit/tmpfiles.dev: No such file or directory
ld.so.conf:/opt/cuda/lib64
ld.so.conf:/opt/cuda/lib
ld.so.conf:/opt/cuda/nvvm/lib64
Binary file java-config-2/current-system-vm/jre/lib/amd64/libjfxwebkit.so matches
grep: cifs-utils/idmap-plugin: No such file or directory


I would expect some make.profile or package.mask entry will exist for blocking cuda, but there is none....
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 15404
Location: here

PostPosted: Mon Jun 19, 2017 11:20 am    Post subject: Reply with quote

@archenroot in stable system cuda is disabled
Code:
$ grep -r cuda /usr/portage/profiles/
/usr/portage/profiles/arch/amd64/use.stable.mask:cuda


Code:
$ emerge -pv cholmod

These are the packages that would be merged, in order:

[ebuild  N     ] sci-libs/cholmod-2.1.2::gentoo  USE="(-cuda) -doc -lapack -metis -minimal -static-libs" 0 KiB

fat@tardis ~ $ ACCEPT_KEYWORDS="~amd64" emerge -pv cholmod

These are the packages that would be merged, in order:

[ebuild  N     ] sci-libs/cholmod-2.1.2::gentoo  USE="-cuda -doc -lapack -metis -minimal -static-libs" 0 KiB


Others package probably are masked and cuda is enabled
Code:
/usr/portage/profiles/arch/amd64/use.mask:-cuda

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
archenroot
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2011
Posts: 118

PostPosted: Mon Jun 19, 2017 11:29 am    Post subject: Reply with quote

Aaaaah, here we go, thanks for explanation both, it is clear now. By profile means I can mask use flags for stable & unstable, not just per package.

Another new stuff I learned about portage which I didn't use much before.

I will look into profile documentation in more detail.

Thanks again!
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum