Skip to content

Compile problem

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9454
    Bran
    Participant

    Dear community:
    I want to use gpu-openmpimixed, but when I am compiling, it reports:

    mpic++ -O3 -Wall -march=native -mtune=native -std=c++17 -pthread -DPARALLEL_MODE_MPI  -DPLATFORM_CPU_SISD -DPLATFORM_GPU_CUDA  -DDEFAULT_FLOATING_POINT_TYPE=float -I../../../src -I../../../external/zlib -I../../../external/tinyxml -c -o channel3d.o channel3d.cpp
    "../../../src/core/platform/gpu/cuda/device.h", line 28: catastrophic error: cannot open source file "cuda_runtime_api.h"
      #include <cuda_runtime_api.h>
                                   ^
    
    1 catastrophic error detected in the compilation of "channel3d.cpp".
    Compilation terminated.
    make: *** [../../../default.mixed.mk:37: channel3d.o] Error 2

    How could I solve this problem?
    Thank you.

    #9455
    Bran
    Participant

    This is how I set the environment variables:

    export PATH=/usr/local/cuda-11.8/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
    #9456
    Adrian
    Keymaster

    The error message suggests that you need to tell the compiler where to find the CUDA headers.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.