Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1716 Discussions

file path question while using jupyterlab of oneapi devcloud

Wei-Chih
Novice
580 Views

Hello intel oneapi devcloud team

 

I have a question about file path while using jupyterlab as below description and picture:

 

In my .cpp file, I need to use the data .in that exist in a file, so I define something as a path (for example:  #define DATA_DIR "C:/Users/user/Desktop/TRYONECPP/data/bm1"). It can run when i use visual studio in my local system.

Then, I wanna run it on jupyter cause I have to try cpu, gup and fpga, So I change the path define to #define DATA_DIR "TRYONECPP20220705/data/bm1". It will run fail when I perform it by qsub as below

 

WeiChih_0-1657064358349.png

 

 

Do you know how to write the correct path if i want to read data from u136316@s001-n012:~/TRYONECPP20220705/data/bm1.

WeiChih_1-1657064378113.png

 

file path and cpp code as below. How to modify the path in my .cpp code?

WeiChih_2-1657064397338.png

 

data files in the bm1 file

WeiChih_3-1657064419580.png

 

 

0 Kudos
1 Solution
DiyaN_Intel
Moderator
556 Views

Hi,

 Thank you for posting in Intel Communities.

I feel the file path that you have mentioned in the code is not correct. I believe if you give the correct file path in the code it should work. Still, if you face the same issue or any other issues related to it please feel free to contact us again.

Let me share a few screenshots to make you understand how to give the path.

 

For example, I want to check the path of the sample.csv file which is kept inside the folder 1/2/3. So, I have given pwd command (present working directory).

 

pwd

 

JaideepK_Intel_0-1657126030433.png

So I have copied this path and used it in my program. You can also do it in a similar way to get your correct file path.

JaideepK_Intel_1-1657105470209.png

 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issues. Thank you!

Regards,

Diya

 

View solution in original post

2 Replies
DiyaN_Intel
Moderator
557 Views

Hi,

 Thank you for posting in Intel Communities.

I feel the file path that you have mentioned in the code is not correct. I believe if you give the correct file path in the code it should work. Still, if you face the same issue or any other issues related to it please feel free to contact us again.

Let me share a few screenshots to make you understand how to give the path.

 

For example, I want to check the path of the sample.csv file which is kept inside the folder 1/2/3. So, I have given pwd command (present working directory).

 

pwd

 

JaideepK_Intel_0-1657126030433.png

So I have copied this path and used it in my program. You can also do it in a similar way to get your correct file path.

JaideepK_Intel_1-1657105470209.png

 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issues. Thank you!

Regards,

Diya

 

DiyaN_Intel
Moderator
528 Views

Hi ,


Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Regards,

Diya


Reply