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

Compiling OneApi vector_add on Intel Devcloud

solutionsarch
Beginner
1,104 Views

I am unable to get output as expected. I have followed instructions in this page https://devcloud.intel.com/oneapi/get_started/baseToolkitSamples/ without much success, where I am going wrong?

0 Kudos
1 Solution
AlekhyaV_Intel
Moderator
1,037 Views

Hi,

 

Thank you for posting in Intel Communities.

 

From the screenshots you've shared, we could see that you're trying to compile vector_add application on login node. Please follow the below steps to get into CPU/GPU/FPGA nodes.

 

Usually, below command would take you into any available interactive node:

qsub -I

 

If you're looking for a CPU node only, please follow the below command:

qsub -I -l nodes=1:cpu:ppn=2 -d .

 

If you're looking for a GPU node only, please follow the below command:

qsub -I -l nodes=1:gpu:ppn=2 -d .

 

If you're trying to get into FPGA nodes, you have to get into FPGA queue and reserve an FPGA node. Please refer this documentation for more info(https://www.intel.com/content/www/us/en/developer/articles/technical/connecting-to-devcloud-fpga-from-devcloud-oneapi.html) You could select Arria10 for oneAPI/Stratix 10 for oneapi nodes.

Once you get into a compute node, try creating a build folder & follow the cmake commands as given in the Vector_add Readme file as follows:

rm -rf build
mkdir build && cd build
cmake ..

Or you could do any other cmake commands as per the node property you chose.

 

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

 

Regards,

Alekhya

 

View solution in original post

0 Kudos
6 Replies
user100
Beginner
1,063 Views

Can you share more details about the error you are getting?

0 Kudos
solutionsarch
Beginner
1,049 Views

###############################################################################

#

# Welcome to the Intel DevCloud for oneAPI Projects!

#

# 1) See https://devcloud.intel.com/oneapi/ for instructions and rules for

# the OneAPI Instance.

#

# 2) See https://github.com/intel/FPGA-Devcloud for instructions and rules for

# the FPGA Instance.

#

# Note: Your invitation email sent to you contains the authentication URL.

#

# If you have any questions regarding the cloud usage, post them at

# https://software.intel.com/en-us/forums/intel-devcloud

#

# Intel DevCloud Team

#

###############################################################################

#

# Note: Cryptocurrency mining on the Intel DevCloud is forbidden.

# Mining will lead to immediate termination of your account.

#

###############################################################################

Last login: Tue Aug 29 08:08:16 2023 from 10.5.0.46

u202003@login-2:~$ cd oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add$ ls

build build.sh CMakeLists.txt README.md run run.sh sample.json src

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add$ cd build

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add/build$ ls

CMakeCache.txt CMakeFiles cmake_install.cmake Makefile

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add/build$ cmake

Usage

 

  cmake [options] <path-to-source>

  cmake [options] <path-to-existing-build>

 

Specify a source directory to (re-)generate a build system for it in the

current working directory. Specify an existing build directory to

re-generate its build system.

 

Run 'cmake --help' for more information.

 

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add/build$ cmake ../src

-- FPGA_DEVICE was not specified.

Configuring the design to target the default FPGA family (Intel Agilex® 7).

Please refer to the README for information on board selection.

CMake Warning (dev) in CMakeLists.txt:

  No cmake_minimum_required command is present. A line of code such as

 

    cmake_minimum_required(VERSION 3.10)

 

  should be added at the top of the file. The version specified may be lower

  if you wish to support older CMake versions for this project. For more

  information run "cmake --help-policy CMP0000".

This warning is for project developers. Use -Wno-dev to suppress it.

 

-- Configuring done

-- Generating done

-- Build files have been written to: /home/u202003/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/build

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add/build$ make cpu-gpu

[ 50%] Building CXX object CMakeFiles/vector-add-buffers.dir/vector-add-buffers.o

c++: error: unrecognized command line option '-fsycl'

CMakeFiles/vector-add-buffers.dir/build.make:62: recipe for target 'CMakeFiles/vector-add-buffers.dir/vector-add-buffers.o' failed

make[3]: *** [CMakeFiles/vector-add-buffers.dir/vector-add-buffers.o] Error 1

CMakeFiles/Makefile2:163: recipe for target 'CMakeFiles/vector-add-buffers.dir/all' failed

make[2]: *** [CMakeFiles/vector-add-buffers.dir/all] Error 2

CMakeFiles/Makefile2:239: recipe for target 'CMakeFiles/cpu-gpu.dir/rule' failed

make[1]: *** [CMakeFiles/cpu-gpu.dir/rule] Error 2

Makefile:183: recipe for target 'cpu-gpu' failed

make: *** [cpu-gpu] Error 2

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add/build$

0 Kudos
user100
Beginner
1,040 Views

You can try this:

1.  Go to ~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb

ra/vector-add  and run the command "rm -r build". This will delete the current build directory.

 

2. Now run these following commands in order:

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make cpu-gpu

cmake.png

0 Kudos
AlekhyaV_Intel
Moderator
1,038 Views

Hi,

 

Thank you for posting in Intel Communities.

 

From the screenshots you've shared, we could see that you're trying to compile vector_add application on login node. Please follow the below steps to get into CPU/GPU/FPGA nodes.

 

Usually, below command would take you into any available interactive node:

qsub -I

 

If you're looking for a CPU node only, please follow the below command:

qsub -I -l nodes=1:cpu:ppn=2 -d .

 

If you're looking for a GPU node only, please follow the below command:

qsub -I -l nodes=1:gpu:ppn=2 -d .

 

If you're trying to get into FPGA nodes, you have to get into FPGA queue and reserve an FPGA node. Please refer this documentation for more info(https://www.intel.com/content/www/us/en/developer/articles/technical/connecting-to-devcloud-fpga-from-devcloud-oneapi.html) You could select Arria10 for oneAPI/Stratix 10 for oneapi nodes.

Once you get into a compute node, try creating a build folder & follow the cmake commands as given in the Vector_add Readme file as follows:

rm -rf build
mkdir build && cd build
cmake ..

Or you could do any other cmake commands as per the node property you chose.

 

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

 

Regards,

Alekhya

 

0 Kudos
solutionsarch
Beginner
1,008 Views

I have succeeded 

 

Thanks 

 

 

u202003@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb
ra/vector-add$ qsub -I
qsub: waiting for job 2365755.v-qsvr-1.aidevcloud to start
qsub: job 2365755.v-qsvr-1.aidevcloud ready
######################################################################## # Date: Wed 30 Aug 2023 07:16:26 AM PDT # Job ID: 2365755.v-qsvr-1.aidevcloud
# User: u202003
# Resources: cput=75:00:00,neednodes=1:batch:ppn=2,nodes=1:batch:ppn=2,walltime=06:00:00 ########################################################################

u202003@s001-n067:~$ rm -rf build u202003@s001-n067:~$ mkdir build && cd build && cmake ..
CMake Error: The source directory "/home/u202003" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI. u202003@s001-n067:~/build$ cmake .. CMake Error: The source directory "/home/u202003" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. u202003@s001-n067:~/build$ ls
u202003@s001-n067:~/build$ cmake ../
CMake Error: The source directory "/home/u202003" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
u202003@s001-n067:~/build$ pwd /home/u202003/build
u202003@s001-n067:~/build$ cmake /home/u202003/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb
CMake Error: The source directory "/home/u202003/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgeb" does not exist. Specify --help for usage, or press the help button on the CMake GUI. u202003@s001-n067:~/build$ cmake /home/u202003/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/ -- The CXX compiler identification is Clang 17.0.0
-- Check for working CXX compiler: /glob/development-tools/versions/oneapi/2023.2.0.1/oneapi/compiler/2023.2.1/linux/bin/icpx
-- Check for working CXX compiler: /glob/development-tools/versions/oneapi/2023.2.0.1/oneapi/compiler/2023.2.1/linux/bin/icpx -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done -- FPGA_DEVICE was not specified.
Configuring the design to target the default FPGA family (Intel Agilex® 7).
Please refer to the README for information on board selection.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/u202003/build
u202003@s001-n067:~/build$ make cpu-gpu
Scanning dependencies of target vector-add-buffers
[ 50%] Building CXX object src/CMakeFiles/vector-add-buffers.dir/vector-add-buffers.cpp.o
[100%] Linking CXX executable ../vector-add-buffers
[100%] Built target vector-add-buffers
Scanning dependencies of target cpu-gpu
[100%] Built target cpu-gpu
u202003@s001-n067:~/build$ ls
CMakeCache.txt cmake_install.cmake src
CMakeFiles Makefile vector-add-buffers
u202003@s001-n067:~/build$ ls ../
build maidar oneAPI-samples tmp
u202003@s001-n067:~/build$ ./vector-add-buffers
Running on device: Intel(R) Xeon(R) Gold 6128 CPU @ 3.40GHz
Vector size: 10000
[0]: 0 + 0 = 0
[1]: 1 + 1 = 2
[2]: 2 + 2 = 4
...
[9999]: 9999 + 9999 = 19998
Vector add successfully completed on device.
u202003@s001-n067:~/build$

0 Kudos
AlekhyaV_Intel
Moderator
1,003 Views

Hi,


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


Regards,

Alekhya


0 Kudos
Reply