Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

DPC++ Compatibility Tool Error

Choi__Jaemin
Einsteiger
5.794Aufrufe

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 Lösung
GouthamK_Intel
Moderator
5.728Aufrufe

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


Lösung in ursprünglichem Beitrag anzeigen

8 Antworten
RaeesaM_Intel
Moderator
5.777Aufrufe

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


Choi__Jaemin
Einsteiger
5.773Aufrufe

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)

 

RaeesaM_Intel
Moderator
5.768Aufrufe

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


Thank you ,

Raeesa



GouthamK_Intel
Moderator
5.729Aufrufe

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


Choi__Jaemin
Einsteiger
5.720Aufrufe

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!

Siddhanta_Shroff
Anfänger
5.664Aufrufe

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

GouthamK_Intel
Moderator
5.709Aufrufe

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


GouthamK_Intel
Moderator
5.683Aufrufe

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


Antworten