When /opt/intel/oneapi/setvar.sh
is sourced, it overrides ${@}
(the bash variable that stores command line arguments).
This is very problematic when when you are sourcing the script inside of another script that needs to process command line arguments.
To reproduce:
docker run -i ubuntu:20.04 /bin/bash -s <<EOF
echo "Bash Arguments: \${@}"
apt-get -y update
apt-get -y install gnupg curl
echo "deb https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/icc.list
curl --silent --show-error -L https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB -o - | apt-key add -
apt-get -y update
apt-get -y --no-install-recommends install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
source /opt/intel/oneapi/setvars.sh
echo "Bash Arguments: \${@}"
EOF
The last line SHOULD print out:
Bash Arguments:
But instead it prints:
Bash Arguments: compiler=latest tbb=latest dev-utilities=latest
This is keeping Thrust's CI system from building with ICPC. We've got it patched for now but would like it fixed.
I haven't, it's been a few years since I've worked o this.
The link you provided doesn't work for me.