KlausT / ccminer

Software for mining various cryptocoins
GNU General Public License v3.0
403 stars 312 forks source link

GPU temperature not reported on Linux #190

Closed eLvErDe closed 6 years ago

eLvErDe commented 6 years ago

Hello,

I cannot get the GPU temperature using the API on Linux. Also it's not diplayed anywhere in the log so I'm not sure if it's not working at all in ccminer or only in the API module.

I can test any patch / debug if interrested in taking care of this.

Regards, Adam.

KlausT commented 6 years ago

When you start ccminer, does it say "NVML GPU monitoring enabled." ? It should work then with the API.

eLvErDe commented 6 years ago
I0131 11:13:13.200968 25538 executor.cpp:646] Forked command at 25541
[2018-01-31 10:13:13] 3 miner threads started, using 'neoscrypt' algorithm.
[2018-01-31 10:13:13] Starting Stratum on stratum+tcp://pool.bsod.pw:4233
[2018-01-31 10:13:16] GPU #1: waiting for data
[2018-01-31 10:13:16] GPU #0: waiting for data
[2018-01-31 10:13:16] GPU #2: waiting for data
[2018-01-31 10:13:18] Stratum difficulty set to 1024
[2018-01-31 10:13:19] GPU #1: waiting for data
[2018-01-31 10:13:19] GPU #0: waiting for data
[2018-01-31 10:13:19] GPU #2: waiting for data
[2018-01-31 10:13:22] GPU #0: waiting for data
[2018-01-31 10:13:22] GPU #2: waiting for data
[2018-01-31 10:13:22] GPU #1: waiting for data
[2018-01-31 10:13:25] GPU #0: waiting for data
[2018-01-31 10:13:25] GPU #1: waiting for data
[2018-01-31 10:13:25] GPU #2: waiting for data
[2018-01-31 10:13:25] pool.bsod.pw:4233 neoscrypt block 43196

Seems not. Do I miss a lib or something ? Can you provide more information regarding how NVML access works ?

Thanks.

sukoshi1507 commented 6 years ago

Depends on your Linux configuration and whether you installed all Nvidia packages or not.

Le 31 janv. 2018 17:12, "Adam Cécile" notifications@github.com a écrit :

I0131 11:13:13.200968 25538 executor.cpp:646] Forked command at 25541 [2018-01-31 10:13:13] 3 miner threads started, using 'neoscrypt' algorithm.�[0m [2018-01-31 10:13:13]�[36m Starting Stratum on stratum+tcp://pool.bsod.pw:4233�[0m [2018-01-31 10:13:16]�[33m GPU #1: waiting for data�[0m [2018-01-31 10:13:16]�[33m GPU #0: waiting for data�[0m [2018-01-31 10:13:16]�[33m GPU #2: waiting for data�[0m [2018-01-31 10:13:18]�[33m Stratum difficulty set to 1024�[0m [2018-01-31 10:13:19]�[33m GPU #1: waiting for data�[0m [2018-01-31 10:13:19]�[33m GPU #0: waiting for data�[0m [2018-01-31 10:13:19]�[33m GPU #2: waiting for data�[0m [2018-01-31 10:13:22]�[33m GPU #0: waiting for data�[0m [2018-01-31 10:13:22]�[33m GPU #2: waiting for data�[0m [2018-01-31 10:13:22]�[33m GPU #1: waiting for data�[0m [2018-01-31 10:13:25]�[33m GPU #0: waiting for data�[0m [2018-01-31 10:13:25]�[33m GPU #1: waiting for data�[0m [2018-01-31 10:13:25]�[33m GPU #2: waiting for data�[0m [2018-01-31 10:13:25]�[36m pool.bsod.pw:4233 neoscrypt block 43196�[0m

Seems not. Do I miss a lib or something ? Can you provide more information regarding how NVML access works ?

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KlausT/ccminer/issues/190#issuecomment-361982227, or mute the thread https://github.com/notifications/unsubscribe-auth/AQeB2t-BUMc9g2GUS1tI7tEeWtFso3SKks5tQJDPgaJpZM4Rzvzj .

KlausT commented 6 years ago

I'm not a Linux expert, but I think /usr/lib/libnvml is the default. On my Ubuntu system I have installed the CUDA Toolkit deb file from the Nvidia web site

sukoshi1507 commented 6 years ago

Basically, all you need is :

sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update ubuntu-drivers devices sudo apt-get install ssh screen git nvidia-common build-essential automake libtool libcurl4-openssl-dev libssl-dev libjansson-dev automake autotools-dev sudo apt-get upgrade sudo apt autoremove sudo reboot

sudo apt-get install linux-headers-$(uname -r)

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb https://www.google.com/url?q=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb&sa=D&ust=1517347029161000&usg=AFQjCNGd_OEAxMZPvez7cZX8MGcF7dc7GQ

sudo reboot and you're done.

Le mer. 31 janv. 2018 à 17:19, KlausT notifications@github.com a écrit :

I'm not a Linux expert, but I think /usr/lib/libnvml is the default. On my Ubuntu system I have installed the CUDA Toolkit deb file from the Nvidia web site

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/KlausT/ccminer/issues/190#issuecomment-361984822, or mute the thread https://github.com/notifications/unsubscribe-auth/AQeB2u1qNx0T3HL3jeXrZNbxhFzc2S2Yks5tQJKegaJpZM4Rzvzj .

eLvErDe commented 6 years ago

Thanks but I'm quite aware of this :p

I'm actually using Debian packages I made myself: http://packages.le-vert.net/mining/debian/pool-stretch-cuda9/ccminer/

And within a docker container with CUDA 9 + patched PHP API consumer: https://github.com/eLvErDe/docker-cuda-ccminer/blob/master/Dockerfile.cuda9.klaust.api

Anyway, my point is: Is that an issue while building or at runtime ? Should I check the way I build the Debian package for a missing nvml dev package that turned off this feature or is that somehow related to a "dlopened" lib not exposed by nvidia-docker ?

Thanks

sukoshi1507 commented 6 years ago

Bonnard !

Le mer. 31 janv. 2018 à 18:01, Adam Cécile notifications@github.com a écrit :

Thanks but I'm quite aware of this :p

I'm actually using Debian packages I made myself: http://packages.le-vert.net/mining/debian/pool-stretch-cuda9/ccminer/

And within a docker container with CUDA 9 + patched PHP API consumer:

https://github.com/eLvErDe/docker-cuda-ccminer/blob/master/Dockerfile.cuda9.klaust.api

Anyway, my point is: Is that an issue while building or at runtime ? Should I check the way I build the Debian package for a missing nvml dev package that turned off this feature or is that somehow related to a "dlopened" lib not exposed by nvidia-docker ?

Thanks

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/KlausT/ccminer/issues/190#issuecomment-361999030, or mute the thread https://github.com/notifications/unsubscribe-auth/AQeB2gR-9-dK_A0ycbb6TarXYXV0LrbAks5tQJxsgaJpZM4Rzvzj .

KlausT commented 6 years ago

It's probably a build issue. The first few lines should look like this:

ccminer 8.20-KlausT (64bit) for nVidia GPUs
Compiled with GCC 5.4 using Nvidia CUDA Toolkit 9.1

Based on pooler cpuminer 2.3.2 and the tpruvot@github fork
CUDA support by Christian Buchner, Christian H. and DJM34
Includes optimizations implemented by sp-hash, klaust, tpruvot and tsiv.

[2018-01-31 19:30:06] NVML GPU monitoring enabled.
[2018-01-31 19:30:06] 2 miner threads started, using 'neoscrypt' algorithm.

Do you see the NVML line there?

sukoshi1507 commented 6 years ago

What does

ldconfig -p | grep nvidia-ml

give from your docker environment?

Le mer. 31 janv. 2018 à 18:01, Adam Cécile notifications@github.com a écrit :

Thanks but I'm quite aware of this :p

I'm actually using Debian packages I made myself: http://packages.le-vert.net/mining/debian/pool-stretch-cuda9/ccminer/

And within a docker container with CUDA 9 + patched PHP API consumer:

https://github.com/eLvErDe/docker-cuda-ccminer/blob/master/Dockerfile.cuda9.klaust.api

Anyway, my point is: Is that an issue while building or at runtime ? Should I check the way I build the Debian package for a missing nvml dev package that turned off this feature or is that somehow related to a "dlopened" lib not exposed by nvidia-docker ?

Thanks

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/KlausT/ccminer/issues/190#issuecomment-361999030, or mute the thread https://github.com/notifications/unsubscribe-auth/AQeB2gR-9-dK_A0ycbb6TarXYXV0LrbAks5tQJxsgaJpZM4Rzvzj .

eLvErDe commented 6 years ago

Ok, i see what's going on here:

I'm trying to create a proper patch for autotools but I'm getting crazy already. I'll probably end up spawing sed during build to set proper name.

Klaus, are you interrested in making libnvidia-ml path overridable from configure script ?

KlausT commented 6 years ago

Since I have no clue about how the configure stuff works or what the differences are between the Linux distros I'm always open for suggestions.

eLvErDe commented 6 years ago

nvml_path_autotools.txt

Here we go. Here is a patch that make --with-nvml configure option working as it should:

eLvErDe commented 6 years ago

Patch applied on tpruvot's package too and published to my docker hub :)

KlausT commented 6 years ago

Small difficulties here:

Applying:
fatal: empty ident name (for <>) not allowed
eLvErDe commented 6 years ago

Remove everything before the first --- / +++ lines

eLvErDe commented 6 years ago

https://stackoverflow.com/questions/41832926/git-empty-ident-name-for-not-allowed Are you applying patch with git?

KlausT commented 6 years ago

I'm trying it with git am nvml_path_autotools.txt Ok, I will try deleting lines then

eLvErDe commented 6 years ago

Yeah check the link, git am does not support "enhanced patch format"

If you can confirm it still builds fine on Windows with working nvml support, we're good.

KlausT commented 6 years ago

Ok, patching worked now.

eLvErDe commented 6 years ago

Please check your windows build, I may have break something ;-) You might also consider setting default Linux value to libnvidia-ml.so.1 which makes more sense to me (and that's the value I use to get it working in my packages)

KlausT commented 6 years ago

Yeah, it still works with Windows