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

Vectoradd build error

mnt
New Contributor I
1,071 Views

Hi,

On my first attempt, I wasn't able to build the vector add example. Please see the following output:

 

 

u187665@login-2:~$ git clone https://github.com/oneapi-src/oneAPI-samples.git
Cloning into 'oneAPI-samples'...
remote: Enumerating objects: 24580, done.
remote: Counting objects: 100% (97/97), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 24580 (delta 27), reused 71 (delta 21), pack-reused 24483
Receiving objects: 100% (24580/24580), 256.42 MiB | 28.85 MiB/s, done.
Resolving deltas: 100% (16116/16116), done.
Checking out files: 100% (3457/3457), done.
u187665@login-2:~$ cd oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/

u187665@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add$ cat build.sh
#!/bin/bash
source /opt/intel/inteloneapi/setvars.sh
make clean
make all

u187665@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add$ qsub -l nodes=1:gpu:ppn=2 -d . build.sh
2239335.v-qsvr-1.aidevcloud

u187665@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add$ cat build.sh.o2239
335

########################################################################
# Date: Wed 08 Mar 2023 09:59:23 AM PST
# Job ID: 2239335.v-qsvr-1.aidevcloud
# User: u187665
# Resources: cput=75:00:00,neednodes=1:gpu:ppn=2,nodes=1:gpu:ppn=2,walltime=06:00:00
########################################################################


:: WARNING: setvars.sh has already been run. Skipping re-execution.
To force a re-execution of setvars.sh, use the '--force' option.
Using '--force' can result in excessive use of your environment variables.

usage: source setvars.sh [--force] [--config=file] [--help] [...]
--force Force setvars.sh to re-run, doing so may overload environment.
--config=file Customize env vars using a setvars.sh configuration file.
--help Display this help message and exit.
... Additional args are passed to individual env/vars.sh scripts
and should follow this script's arguments.

Some POSIX shells do not accept command-line options. In that case, you can pass
command-line options via the SETVARS_ARGS environment variable. For example:

$ SETVARS_ARGS="ia32 --config=config.txt" ; export SETVARS_ARGS
$ . path/to/setvars.sh

The SETVARS_ARGS environment variable is cleared on exiting setvars.sh.


########################################################################
# End of output for job 2239335.v-qsvr-1.aidevcloud
# Date: Wed 08 Mar 2023 09:59:28 AM PST
########################################################################

u187665@login-2:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add$ cat build.sh.e2239335
make: *** No rule to make target 'clean'. Stop.
make: *** No rule to make target 'all'. Stop.
/glob/supplementary-software/versions/vector-add/vector-add-buffers: error while loading shared libraries: libsycl.so.5: cannot open shared object file: No such file or directory

 

So, how can I fix the shared library error?

 

0 Kudos
1 Solution
DiyaN_Intel
Moderator
1,010 Views

Hi, 

 

Note : The above solution is for running a build.sh script(batch mode)for CPU/GPU/FPGA nodes.

              The error was coming because you were trying to run in a login node, we should request a node and then do the rest of the job.

 

Please follow the steps to build and run the Base: Vector Add Sample in Intel® DevCloud using interactive mode in FPGA Node:

 

1.  When you are requesting an FPGA Node explicitly please give the below command:

 

 qsub -I -l nodes=1:arria10:ppn=2

 

2. Change to the sample directory by giving this command:

 

cd oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add

 

3. Configure the project to use the buffer-based implementation by giving this command:

 

mkdir build
cd build
cmake ..

 

4. Build and run the program using the below command: 

 

make fpga_emu
./vector-add-buffers.fpga_emu

 

DiyaN_Intel_0-1678440372060.png

DiyaN_Intel_1-1678440486898.png

Please have a look at the above screenshot to get a clear picture of how it is happening.

To get a detailed understanding of running the vector-add sample please follow this link : https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL/DenseLinearAlgebra/vector-add

 

If this resolves your issue, make sure to accept this as a solution. 

This would help others with similar issue. Thank you!

 

Thanks and Regards,

Diya

 

 

View solution in original post

0 Kudos
7 Replies
DiyaN_Intel
Moderator
1,044 Views

Hi,

 

Good day to you.

Thank you for posting in Intel Communities.

 

Please follow the steps to build and run the Base: Vector Add Sample in Intel® DevCloud :

 

Note: Since Intel® DevCloud for oneAPI includes the appropriate development environment already configured, you do not need to set environment variables.

 

1. Change to the sample directory:

cd oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add

2. In that build.sh script please add the below commands:

     a) Configure the build system with these commands:

mkdir build
cd build
cmake ..

  b) Build the program using this command:

 make all

3. You can specify a GPU node and run the script file using a single-line script:

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

4. Run the program with the below command:

./vector-add-buffers

 

To get a detailed understanding of running the vector-add sample please follow this link: https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL/DenseLinearAlgebra/vector-add

 

If this resolves your issue, make sure to accept this as a solution. 

This would help others with similar issue. Thank you!

 

Thanks and Regards,

Diya

 

0 Kudos
mnt
New Contributor I
1,029 Views

Would you please help with the following error?

 

u187665@login-2:~$ cd oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add
u187665@login-2:vector-add$ mkdir build
u187665@login-2:vector-add$ cd build/
u187665@login-2:build$ cmake ..
-- The CXX compiler identification is Clang 16.0.0
-- Check for working CXX compiler: /glob/development-tools/versions/oneapi/2023.0.1/oneapi/compiler/2023.0.0/linux/bin/icpx
-- Check for working CXX compiler: /glob/development-tools/versions/oneapi/2023.0.1/oneapi/compiler/2023.0.0/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 run on the default FPGA device intel_a10gx_pac:pac_a10 (Intel(R) PAC with Intel Arria(R) 10 GX FPGA).                     
Please refer to the README for information on device selection.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/u187665/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/build
u187665@login-2:build$ make all
Scanning dependencies of target vector-add-buffers
[ 16%] Building CXX object src/CMakeFiles/vector-add-buffers.dir/vector-add-buffers.cpp.o
[ 33%] Linking CXX executable ../vector-add-buffers
[ 33%] Built target vector-add-buffers
Scanning dependencies of target vector-add-buffers.fpga_emu
[ 50%] Building CXX object src/CMakeFiles/vector-add-buffers.fpga_emu.dir/vector-add-buffers.cpp.o
[ 66%] Linking CXX executable ../vector-add-buffers.fpga_emu
terminate called after throwing an instance of 'std::runtime_error'
terminate called recursively
llvm-foreach: Aborted
icpx: error: fpga compiler command failed with exit code 254 (use -v to see invocation)
Intel(R) oneAPI DPC++/C++ Compiler 2023.0.0 (2023.0.0.20221201)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /glob/development-tools/versions/oneapi/2023.0.1/oneapi/compiler/2023.0.0/linux/bin-llvm
Configuration file: /glob/development-tools/versions/oneapi/2023.0.1/oneapi/compiler/2023.0.0/linux/bin-llvm/../bin/icpx.cfg
icpx: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
src/CMakeFiles/vector-add-buffers.fpga_emu.dir/build.make:94: recipe for target 'vector-add-buffers.fpga_emu' failed
make[2]: *** [vector-add-buffers.fpga_emu] Error 1
CMakeFiles/Makefile2:227: recipe for target 'src/CMakeFiles/vector-add-buffers.fpga_emu.dir/all' failed
make[1]: *** [src/CMakeFiles/vector-add-buffers.fpga_emu.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I ran the commands without qsub.

0 Kudos
DiyaN_Intel
Moderator
1,011 Views

Hi, 

 

Note : The above solution is for running a build.sh script(batch mode)for CPU/GPU/FPGA nodes.

              The error was coming because you were trying to run in a login node, we should request a node and then do the rest of the job.

 

Please follow the steps to build and run the Base: Vector Add Sample in Intel® DevCloud using interactive mode in FPGA Node:

 

1.  When you are requesting an FPGA Node explicitly please give the below command:

 

 qsub -I -l nodes=1:arria10:ppn=2

 

2. Change to the sample directory by giving this command:

 

cd oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add

 

3. Configure the project to use the buffer-based implementation by giving this command:

 

mkdir build
cd build
cmake ..

 

4. Build and run the program using the below command: 

 

make fpga_emu
./vector-add-buffers.fpga_emu

 

DiyaN_Intel_0-1678440372060.png

DiyaN_Intel_1-1678440486898.png

Please have a look at the above screenshot to get a clear picture of how it is happening.

To get a detailed understanding of running the vector-add sample please follow this link : https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL/DenseLinearAlgebra/vector-add

 

If this resolves your issue, make sure to accept this as a solution. 

This would help others with similar issue. Thank you!

 

Thanks and Regards,

Diya

 

 

0 Kudos
DiyaN_Intel
Moderator
970 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



0 Kudos
parnumeric
Beginner
691 Views

I've managed to resolve the same issue following the solution doing the exercise without FPGA support, that is by requesting a GPU node using the following command:

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

and running all `cmake` and `make` commands from within the interactive mode. However, I'd like to be able to build the application without the interactive mode (as initially described) using the following command:

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

where all `cmake` and `make` commands are run from the `build.sh` script. I get the same error about the same shared library error which makes me think that some module needs to be loaded, doesn't it? If yes, which module needs to be loaded? Otherwise, why isn't it working exactly as it is described initially?

0 Kudos
wan1
Beginner
297 Views

Hi Diya,

 

How to run this vector-add project on fpga using "qsub -I -l nodes=1:arria10:ppn=2"?

 

I followed this tutorial.

Screen Shot 2023-12-19 at 1.04.38 PM.png

However, I met this following mistake. Any help would be appreciate! 

Screen Shot 2023-12-19 at 1.00.02 PM.png

 

Thank you,

Wan

0 Kudos
wan1
Beginner
140 Views

Hi Diya,,

 

Can I get any response?

Any help would be appreciate!

 

Thank you,

Wanyu

0 Kudos
Reply