gpu usage question
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › gpu usage question
- This topic has 28 replies, 4 voices, and was last updated 10 months, 3 weeks ago by toson.
-
AuthorPosts
-
March 7, 2023 at 11:18 am #7284AdrianKeymaster
Ok, in this case I’ll definitely need more information on your environment. I can reproduce it neither in my local Nix-based environment (for different CUDA versions, including 11.3) nor on the cluster using e.g. raw CUDA or the one included in Nvidia’s HPC toolkit. Which OS do you use and how did you install CUDA?
The warnings you posted originate from a “naca4412_turb.cpp” case – just to be sure: You also can not compile
examples/laminar/cylinder3d
for GPU?March 8, 2023 at 12:29 pm #7285H.YuParticipantLet’s attach the outputted phrase when ‘make’ is executed.
The “(i.e. the __host__ __device__ called from __host__ warnings, hidden by the default flags).” Can you explain that in a bit more detail?
nvcc version : 11.3
g++ version : 9.4.0
ubuntu version : 20.04
i’m using wsl2some test results
Test 1: Run the example using the .mk file that uses gpu (gpu_only, gpu_openmpi) >> Normal operation
Test 2: Run problematic code using .mk file that uses cpu (cpu_sisd, cpu_openmpi) >> Normal operation
Test 3: Run problematic code using .mk file the uese gpu (gpu_only, gpu_openmpi) >> error!similar error
“https://www.openlb.net/forum/topic/issues-compiling-thermal-examples-with-gpu/” line 20 ~ line 30March 8, 2023 at 12:37 pm #7286H.YuParticipantcuda install procedure
First :
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda-repo-wsl-ubuntu-11-3-local_11.3.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-11-3-local_11.3.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-wsl-ubuntu-11-3-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cudaSecond :
export PATH=/usr/local/cuda-11.3/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}Third :
check nvcc –versionForth : install cuDNN
Fifth : check cuDNNMarch 8, 2023 at 12:46 pm #7287H.YuParticipantSorry, there is an error in the test results I said before.
Test 1: Run the example using the .mk file that uses gpu (gpu_only, gpu_openmpi) >> error!
Test 2: Run problematic code using .mk file that uses cpu (cpu_sisd, cpu_openmpi) >> Normal operation
Test 3: Run problematic code using .mk file the uese gpu (gpu_only, gpu_openmpi) >> error!March 8, 2023 at 12:56 pm #7288H.YuParticipantAfter changing the contents of config.mk to cpu and gpu, I proceeded with “make clean; make”, then moved to the example folder, and there was a previously made content, so I proceeded with “make clean; make” in the example folder.
After that If i do make, it was confirmed that the same error occurs in cylinder 3d and gpu.March 8, 2023 at 2:26 pm #7289AdrianKeymasterOk, the same Ubuntu WSL based setup works for my colleagues using Windows so we’ll have to look even closer.
Can you send me the full error log so I can check it in more detail?
March 8, 2023 at 2:55 pm #7290H.YuParticipantsure but i have problem
I tried to upload the entire error log from before, but a 403 error occurred when specific content was entered, so I inquired about the content to Tim.
March 8, 2023 at 2:58 pm #7291March 9, 2023 at 4:37 am #7293H.YuParticipantmpicxx –showme:compile : -l/usr/local/include -pthread
mpicxx –showme:link : -pthread -Wl,-rpath -Wl,/usr/local/lib -Wl,–enable-new-dtags -L/usr/local/lib -lmpi
mpi –version : OpenMPI 4.1.1March 9, 2023 at 9:27 am #7294H.YuParticipantIt has been confirmed that an error occurs when using ‘using namespace olb::util’
March 9, 2023 at 9:29 am #7295AdrianKeymasterGood, I’ll check the logs you sent me later to confirm and write you a patch (I have encountered this error before e.g. with using namespace std, this is why I originally asked if this was the case)
October 21, 2023 at 6:06 pm #7835alperParticipantI am having the same problem with the aorta3d example via the gpu_only.mk configuration option during the compilation of the example.
“Call of overloaded f(x) is ambiguous” error is generated (no executable) where f(x) is log(const double&), log1p(double), sin(double&) and various other math functions.
I am using a RTX4070 Mobile GPU and running CUDA v12.2. Also the CUDA_ARCH variable is set to 87 in config.mk and rules.mk files.
Additional question: Since my gpu architecture is Lovelace yet the last entry on rules.mk table is Ampere with architecture number 87, should I keep using 87 or may I use 89 as that is what my card supports?
October 21, 2023 at 8:12 pm #7836AdrianKeymasterYou can use the most up to date generation supported by your card – the table will be updated in the next release.
To get the aorta3d case running in your environment you’ll need to remove the “using namespace olb::utils” and add it to the now unknown classes (mostly the Timer, simply follow the compiler errors, should not be many).
I’ll check our repo next week and send you the patch in case it is still an issue.
November 20, 2023 at 11:47 am #7921tosonParticipantI just want to confirm that I had the same problem. Commenting out “using namespace olb::util;” did the trick, I did not need any further adjustments.
Ubuntu 22.04.3 LTS
g++-10 10.5.0
nvcc V11.5.119
CUDA Version: 12.2
CUDA_ARCH 75 (Quadro RTX 5000)I used the gpu_only.mk configuration and added the -ccbin=g++-10 option to nvcc
-
AuthorPosts
- You must be logged in to reply to this topic.