Skip to content

gpu usage question

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #7284
    Adrian
    Keymaster

    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?

    #7285
    H.Yu
    Participant

    Let’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 wsl2

    some 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 30

    #7286
    H.Yu
    Participant

    cuda 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 cuda

    Second :
    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 –version

    Forth : install cuDNN
    Fifth : check cuDNN

    #7287
    H.Yu
    Participant

    Sorry, 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!

    #7288
    H.Yu
    Participant

    After 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.

    #7289
    Adrian
    Keymaster

    Ok, 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?

    #7290
    H.Yu
    Participant

    sure 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.

    #7291
    Adrian
    Keymaster

    Yes, sorry about that. You can send me an eMail.

    #7293
    H.Yu
    Participant

    mpicxx –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.1

    #7294
    H.Yu
    Participant

    It has been confirmed that an error occurs when using ‘using namespace olb::util’

    #7295
    Adrian
    Keymaster

    Good, 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)

    #7835
    alper
    Participant

    I 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?

    #7836
    Adrian
    Keymaster

    You 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.

    #7921
    toson
    Participant

    I 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

Viewing 14 posts - 16 through 29 (of 29 total)
  • You must be logged in to reply to this topic.