oneAPI: Compiling [medbow]
The intention of this page is to demonstrate how to use the oneAPI toolkit on MedicineBow
It is not to teach C/C++/Fortran nor any of the associated libraries such as the MKL, MPI and TBB.
Module Loading
To get started, first load the oneapi/<version>
module you wsh to use.
This will setup your environment, adding and extending various environment variables, opening up access to compilers and libraries.
If you try loading the module a second time within an existing session, you will see the following warning:
Note: Although performing a module purge
will remove the oneapi module from your module list, it does not clean up the new/modified environment variables. This is due to them not being directly set by the module file, but rather by an addition script that was called.
Currently, you will need to start a new session if you want a clean environment.
Using
Use the module name oneapi
to discover versions available and to load the toolkit.
Examples
Intel provides a comprehensive list of examples of code samples available via their GitHub oneAPI-samples repository.
Note: In the MPI Example above:
You must
unset I_MPI_EXTRA_FILESYSTEM_LIST
andI_MPI_PMI_LIBRARY
.Use
mpirun
(which is actually the oneAPI’s version) and notsrun
to execute your code.
If you do not, you will warnings of the following form: