- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello I am trying to understand migration using one of the examples vector-add-dpct/
1. I use intercept-build make to get compile_commands.json
login-2:vector-add-dpct$ intercept-build make
nvcc src/vector_add.cu -o vector_add
2. I try to migrate using dpct
login-2:vector-add-dpct$ dpct -p compile_commands.json --in-root=. --out-root=migrated_code
dpct exited with code: -32 (Error: Intel(R) DPC++ Compatibility Tool was not able to detect path for CUDA header files. Use --cuda-include-path to specify the correct path to the header files.)
3. To fix the issue above I need to locate cuda
login-2:vector-add-dpct$ locate cuda
/usr/include/hwloc/cuda.h
/usr/include/hwloc/cudart.h
/usr/include/linux/cuda.h
/usr/include/unicode/icudataver.h
/usr/include/x86_64-linux-gnu/libavutil/hwcontext_cuda.h
/usr/lib/x86_64-linux-gnu/libicudata.a
/usr/lib/x86_64-linux-gnu/libicudata.so
/usr/lib/x86_64-linux-gnu/libicudata.so.60
/usr/lib/x86_64-linux-gnu/libicudata.so.60.2
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpiext/cuda
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpiext/cuda/c
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpiext/cuda/c/mpiext_cuda_c.h
/usr/share/nmap/scripts/http-barracuda-dir-traversal.nse
/usr/share/vim/vim80/indent/cuda.vim
/usr/share/vim/vim80/syntax/cuda.vim
/usr/src/linux-headers-4.15.0-76/include/linux/cuda.h
/usr/src/linux-headers-4.15.0-76/include/uapi/linux/cuda.h
4. Neither of the cuda paths about work and they are not similar to /usr/local/cuda/include
login-2:vector-add-dpct$ dpct -p compile_commands.json --in-root=. --out-root=migration --cuda-include-path=/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpiext/cuda
dpct exited with code: -5 (Error: Path for CUDA header files specified by --cuda-include-path is invalid.)
5. Could someone let me know how they make this example work?
Best
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @HenryMoncada ,
Thanks for reaching out to us.
Please check the CUDA toolkit version installed, as per the latest Intel DPC++ Compatibility Tool System requirements, the only supported CUDA versions are: 8.0, 9.x, 10.1, 10.2, 11.0~11.6
If the requirements are not met, DPC++ Compatibility Tool will throw an error while migration. DPCT only needs CUDA headers from the supported versions. You can install CUDA toolkit in your home directory. You may find the instructions on the Nvidia official webpage.
Once you have installed the toolkit, include --cuda-include-path flag to perform migration.
dpct -p compile_command.json --cuda-include-path=<path/to/cuda/include>
Let me know if this helps.
Regards,
Shwetha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got a few errors on CUDA INSTALLATION, It asked me to install a new package called "BISON". I called the module,
--enable-cuda \
--enable-targets="x86_64-
arm-elf-linux-gnu,m68k-
CFLAGS='-I/usr/local/cuda/
LDFLAGS='-lpthread'
5. Run make, I get the following errors
Makefile:2631: recipe for target 'ada-lex.c' failed
make[2]: *** [ada-lex.c] Error 1
make[2]: Leaving directory '/home/u136102/usr/local/cuda_
Makefile:9145: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/home/u136102/usr/local/cuda_
Makefile:850: recipe for target 'all' failed
make: *** [all] Error 2
6. Look online for 'ada-lex.c' download into cuda_11_0/gdb/
/home/u136102/usr/local/cuda_
WARNING: 'bison' is missing on your system.
You should only need it if you modified a '.y' file.
You may want to install the GNU Bison package:
<http://www.gnu.org/software/
Makefile:2599: recipe for target 'cuda-parser.tab.c' failed
make[2]: *** [cuda-parser.tab.c] Error 127
make[2]: Leaving directory '/home/u136102/usr/local/cuda_
Makefile:9145: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/home/u136102/usr/local/cuda_
Makefile:850: recipe for target 'all' failed
make: *** [all] Error 2
Currently Loaded Modulefiles:
1) bison/3.7(default)
cuda-parser.exp.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]
cuda-parser.exp.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
bison: /home/u84741/glob/apps/bison/
Makefile:2599: recipe for target 'cuda-parser.tab.c' failed
make[2]: *** [cuda-parser.tab.c] Error 1
make[2]: Leaving directory '/home/u136102/usr/local/cuda_
Makefile:9145: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/home/u136102/usr/local/cuda_
Makefile:850: recipe for target 'all' failed
make: *** [all] Error 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @HenryMoncada ,
If you want to download any older version of the CUDA toolkit, download it from this link, https://developer.nvidia.com/cuda-toolkit-archive
If you want to download the latest CUDA toolkit version follow, https://developer.nvidia.com/cuda-downloads
For Installer type select runfile(local) as option as shown below. And then follow the installation instructions given below in the web page.
For further more information refer https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
Regards,
Shwetha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I assume that your issue is resolved. If you need any further assistance, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Shwetha

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page