ROCm / HIP-Examples

Examples for HIP
194 stars 86 forks source link

How to run mixbench? #43

Open baryluk opened 4 months ago

baryluk commented 4 months ago
user@debian:~/HIP-Examples/mixbench$ make
g++ -c -O2 -I/usr/local/cuda/include -Wall main-cuda.cpp -o main-cuda.o
main-cuda.cpp:9:10: fatal error: cuda.h: No such file or directory
    9 | #include <cuda.h>
      |          ^~~~~~~~
compilation terminated.
make: *** [Makefile:72: main-cuda.o] Error 1

rocm 6.0.2

There is nothing in README or in test_all.sh to guide.

surely include and library paths and compiler are wrong, so some extra arguments needs to be passed

baryluk commented 4 months ago

I guess one needs to use version in hip directory, but that also does not work:

user@debian:~/HIP-Examples/mini-nbody/hip$ ./HIP-nbody-block.sh 
hipcc -I../ -DSHMOO nbody-block.cpp -o nbody-block
In file included from <built-in>:1:
In file included from /opt/rocm-6.0.2/lib/llvm/lib/clang/17.0.0/include/__clang_hip_runtime_wrapper.h:50:
/opt/rocm-6.0.2/lib/llvm/lib/clang/17.0.0/include/cuda_wrappers/cmath:27:15: fatal error: 'cmath' file not found
#include_next <cmath>
              ^~~~~~~
1 error generated when compiling for gfx1030.
./nbody-block 1024
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
./nbody-block 2048
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
./nbody-block 4096
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
./nbody-block 8192
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
./nbody-block 16384
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
./nbody-block 32768
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
./nbody-block 65536
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
./nbody-block 131072
./HIP-nbody-block.sh: line 37: ./nbody-block: No such file or directory
user@debian:~/HIP-Examples/mini-nbody/hip$