OpenFOAM plugin library selection issue

Front page Forums Plug-ins OpenFOAM plugin library selection issue

This topic contains 1 reply, has 2 voices, and was last updated by  nico 2 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1294

    world2005
    Member

    Hello,

    I had install cuda 7.0 and I cannot find “lcudart, lcublas, lcusparse” in “/usr/local/cuda/lib”. When I add “-lcudart -lcublas -lcusparse -L/usr/local/cuda/lib \” in my “Make/options”, I got the error “/usr/bin/ld: cannot find -lcudart -lcublas -lcusparse”

    When I remove that line, the Laplace example can run perfectly and the results are showing below. I would like to know if I success execute the program on GPU. What does the libraries “lcudart, lcublas, lcusparse” do?

    ================
    Results
    ================

    /*—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 3.0.0 |
    | \\ / A nd | Web: http://www.OpenFOAM.org |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : 3.0.0-8b097f6d8dd9
    Exec : ./Laplace
    Date : Nov 13 2015
    Time : 22:14:33
    Host : “cchang11-All-Series”
    PID : 7189
    Case : /home/cchang11/paralution-1.0.0/src/examples/OpenFOAM/Laplace
    nProcs : 1
    sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster
    allowSystemOperations : Allowing user-supplied system call operations

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time

    Create mesh for time = 0

    Reading field T

    Reading transportProperties

    Reading diffusivity DT

    This version of PARALUTION is released under GPL.
    By downloading this package you fully agree with the GPL license.
    Number of CPU cores: 8
    Host thread affinity policy – thread mapping on every core
    Number of GPU devices in the system: 1
    PARALUTION ver B1.0.0
    PARALUTION platform is initialized
    Accelerator backend: GPU(CUDA)
    OpenMP threads:8
    Selected GPU device: 0
    ————————————————
    Device number: 0
    Device name: GeForce GTX 970
    totalGlobalMem: 4095 MByte
    clockRate: 1367000
    compute capability: 5.2
    ECCEnabled: 0
    ————————————————
    Time = 1

    PreSolveTime = 17.77 s PreSolveClockTime = 17 s

    paralution_AMG(None): Solving for T, Initial residual = 1, Final residual = 9.30564e-11, No Iterations 13
    PostSolveTime = 31.14 s PostSolveClockTime = 23 s

    ===============
    Contents of my Make/files are:

    Laplace.C
    ../../../../build/inc/plug-ins/OpenFOAM/matrices/lduMatrix/solvers/paralution_PCG/paralution_PCG.C
    ../../../../build/inc/plug-ins/OpenFOAM/matrices/lduMatrix/solvers/paralution_PBiCG/paralution_PBiCG.C
    ../../../../build/inc/plug-ins/OpenFOAM/matrices/lduMatrix/solvers/paralution_PGMRES/paralution_PGMRES.C
    ../../../../build/inc/plug-ins/OpenFOAM/matrices/lduMatrix/solvers/paralution_AMG/paralution_AMG.C
    EXE = ./Laplace

    ===============
    Contents of my Make/options are:

    EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I../../../../build/inc

    EXE_LIBS = \
    -lfiniteVolume \
    -lOpenFOAM \
    -fopenmp \
    ../../../../build/lib/libparalution.so

    ==============

    Thank you very much,
    world2005

    • This topic was modified 2 years, 1 month ago by  world2005.
    #1298

    nico
    Participant

    Hi world2005,

    The output looks good to me, your GPU is recognized by PARALUTION. Please check the user manual for detailed informations on the different objects info() functions, to check if the objects reside on the GPU during computation. For details on the different CUDA libraries, please have a look at the NVIDIA documentations.

    Best regards,
    Nico

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.