-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_oneapi_linux.sh
More file actions
executable file
·39 lines (32 loc) · 1.41 KB
/
install_oneapi_linux.sh
File metadata and controls
executable file
·39 lines (32 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
# This script installs the Fortran compilers provided in Intel OneAPI.
# Usage: bash install_oneapi_linux.sh
# do the job in the temporary directory of the system
cd /tmp || exit 42
# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
# add signed entry to apt sources and configure the APT client to use Intel repository:
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list
# installation
sudo apt update
#sudo apt install intel-basekit intel-hpckit # Instead of this line, the following line seems to suffice
sudo apt install -y intel-oneapi-common-vars intel-oneapi-compiler-fortran
installer_exit_code=$?
sudo apt clean # Remove the .deb
# Run the script that sets the necessary environment variables and then dump them to $GITHUB_ENV
# so that they are available in subsequent steps.
if [[ -f /opt/intel/oneapi/setvars.sh ]] ; then
source /opt/intel/oneapi/setvars.sh
env | grep -i 'intel\|oneapi' >> "$GITHUB_ENV"
else
exit 1
fi
# Show the result of the installation.
echo "The ifx installed is:"
ifx --version
echo "The path to ifx is:"
command -v ifx
# Exit with the installer exit code.
exit $installer_exit_code