oneAPI

What is oneAPI?

Intel's oneAPI is a collection of sample projects with corresponding Conda environments to allow for easy set up of various projects.

NOTE: Be aware that the version installed is in Beta mode, so there will be some issues with it that are beyond RC's control.

How is oneAPI loaded?

The below can be used to view all of the installations of oneAPI on a particular system, where this example uses Coeus.

$ module avail |& grep -i "oneapi"

General/oneAPI/2021.1

How is oneAPI used?

This example shows how to load oneAPI on Coeus, create a basic project from a supplied sample, and run that sample.

To traverse the oneAPI menus, the arrow keys or hjkl may be used - if there is a number or character (such as (1) or (q)) displayed to the left of an option, entering that character will select that option.

0) Before getting started, here is where the example is taking place. This will be used as a "before" once the project is set up.

$ pwd

/home/sw23/code

$ ls

worklog

1) First, load and boot oneAPI.

$ module load General/oneAPI/2021.1 

$ oneapi-cli 

Connecting to online Sample Aggregator, this may take some time based on network conditions

2) Next, create a project (1) and the language selection menu will appear.

3) Choose cpp (1) and a menu of sample C++ projects will be displayed. While selecting these options, a description will appear on the right.

4) Create sample Getting Start project "Array Transform."

5) Initialize the project. The "Directory" is what the project is put into, and the project directory within that directory is named "Project Name." The "Destination" is the full path of where the project will live.

6) The completion screen will be shown, close (Click <Enter>) this to return to the terminal.

7) Here is the "after," or what the directory now contains. After creating a new project, always read the README.md fully.

$ pwd

/home/sw23/code

$ ls

oneAPI_example  worklog

$ cd oneAPI_example

$ ls

array-transform

$ cd array-tranform

$ ls

CMakeLists.txt  License.txt  README.md  sample.json  src

$ pwd

/home/sw23/code/oneAPI_example/array-tranform

7.5) To easily read the README.md,  copy the output of the below to MarkdownLivePreview, into the left box. An example of this is below the code.

$ cat README.md

# DPC++ Sample for the Debugger


This is a small DPC++ example that accompanies the

[Get Started Guide](https://software.intel.com/en-us/get-started-with-debugging-dpcpp)

of the debugger.


. . .

8) To build this sample project, use the below, which was taken from the README.md.

$ mkdir build

$ cd build

$ module load Utils/cmake/3.9.1

$ cmake ..

$ make

9) To run this sample project, use the below, which was taken from the README.md.

$ make run