Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*

DPC++ Compatibility Tool Error

Choi__Jaemin
Beginner
2,162 Views

Hi,

 

I tried applying the DPC++ Compatibility Tool to the vector addition example on Intel DevCloud with CUDA 10.1.243, but got the following error:

u47873@login-2:~$ dpct --cuda-include-path=$HOME/cuda-10.1.243/include vector_add.cu
NOTE: Could not auto-detect compilation database for file 'vector_add.cu' in '/home/u47873' or any parent directory.
dpct exited with code: -28 (Error: Input folder is the parent of, or the same folder as, the CUDA_PATH folder)

 

I double-checked the the supplied CUDA include directory has the CUDA headers, so I'm not sure why this error is occuring. Also the CUDA_PATH environment variable has not been set.

0 Kudos
1 Solution
GouthamK_Intel
Moderator
2,096 Views

Hi,

Could you please try giving the path of the directory where vector_add.cu file is present to --in-root flag.

Please use the below command syntax for reference.

Assuming vector_add.cu is inside foo directory.

|foo (directory)

---|vector_add.cu

dpct --cuda-include-path=<path/to/cuda/include> --in-root=./foo ./foo/vector_add.cu


Please refer the below get started guide for more information.

https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-dpcpp-compatibility-tool/top.html


Let us know if your issue gets resolved.


Thanks & Regards

Goutham


View solution in original post

0 Kudos
8 Replies
RaeesaM_Intel
Moderator
2,145 Views

Hi,


Thank you for posting in Intel DevCloud Forum.

The possible reason must be because you are in the login node.

Try with compute node(qsub -I)


Thanks and Regards,

Raeesa


0 Kudos
Choi__Jaemin
Beginner
2,141 Views

I'm getting the same error on a compute node:

u47873@s001-n174:~$ dpct --cuda-include-path=$HOME/cuda-10.1.243/include vector_add.cu
NOTE: Could not auto-detect compilation database for file 'vector_add.cu' in '/home/u47873' or any parent directory.
dpct exited with code: -28 (Error: Input folder is the parent of, or the same folder as, the CUDA_PATH folder)

 

0 Kudos
RaeesaM_Intel
Moderator
2,136 Views

We are moving this case to Intel® oneAPI Data Parallel C++ Forum for much detailed response.


Thank you ,

Raeesa



0 Kudos
GouthamK_Intel
Moderator
2,097 Views

Hi,

Could you please try giving the path of the directory where vector_add.cu file is present to --in-root flag.

Please use the below command syntax for reference.

Assuming vector_add.cu is inside foo directory.

|foo (directory)

---|vector_add.cu

dpct --cuda-include-path=<path/to/cuda/include> --in-root=./foo ./foo/vector_add.cu


Please refer the below get started guide for more information.

https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-dpcpp-compatibility-tool/top.html


Let us know if your issue gets resolved.


Thanks & Regards

Goutham


0 Kudos
Choi__Jaemin
Beginner
2,088 Views

Moving vector_add.cu file from $HOME to $HOME/vector_add made it work (no need for --in-root):

u47873@login-2:~$ dpct --cuda-include-path=$HOME/cuda-10.1.243/include ./vector_add/vector_add.cu
NOTE: Could not auto-detect compilation database for file 'vector_add.cu' in '/home/u47873/./vector_add' or any parent directory.
The directory "dpct_output" is used as "out-root"
Processing: /home/u47873/vector_add/vector_add.cu
Processed 1 file(s) in -in-root folder "/home/u47873/vector_add"

See Diagnostics Reference to resolve warnings and complete the migration:
https://software.intel.com/content/www/us/en/develop/documentation/intel-dpcpp-compatibility-tool-user-guide/top/diagnostics-reference.html

 

It seems weird that dpct does not work when the source code is located in the home directory, it would be good to add this to the documentation under 'Step 1: Migrate a Simple Test Project'.

Thank you for your help!

0 Kudos
Siddhanta_Shroff
2,032 Views

Hello,

I am encountering the same error. However, in my case, I am also getting an error saying that the path for CUDA header files is invalid. I am trying to use the compatibility tool on the devcloud server. 

Now, to include the CUDA path I need to first install the CUDA toolkit but I cannot install it without sudo access. Could you please help me understand what is it that I can do to get it running on the server?

Siddhanta_Shroff_0-1602817798956.png

Thanks & regards,

Siddhanta

0 Kudos
GouthamK_Intel
Moderator
2,077 Views

Hi,

Thanks for the confirmation!

Glad to know that your issue is resolved!


Regarding: "It seems weird that dpct does not work when the source code is located in the home directory,"

DPCT will migrate the code even if the source code is present in the home directory.


"dpct exited with code: -28 (Error: Input folder is the parent of, or the same folder as, the CUDA_PATH folder)"

In your specific case, dpct is not able to migrate the code because the source code and CUDA installed directory are at the same path. i.e $HOME/.


Regarding: "it would be good to add this to the documentation under 'Step 1: Migrate a Simple Test Project'."

Thanks for your suggestion, we will forward your request to the concerned internal team.


Could you please let us know if we are able to answer all your queries? If yes, let us know if we can close this thread from our side.


Have a Good day!


Thanks & Regards

Goutham


0 Kudos
GouthamK_Intel
Moderator
2,051 Views

Hi,

Regarding your documentation suggestion.

We have forwarded your request to the concerned internal team.


As this issue has been resolved, we will no longer respond to this thread. 

If you require any additional assistance from Intel, please start a new thread. 

Any further interaction in this thread will be considered community only. 


Thanks & Regards

Goutham


0 Kudos
Reply