First of all, the sourcing of the variable scripts for the intel compiler, vtune, advisor and inspector works fine for the shell when I put them in my bashrc. Nevertheless, I need the environment variables for the compiler (tbb, mkl, ..) in some of my graphical programs too because I use the icc in Netbeans or Mathematica. Unfortunately, I have not found a way to source the scripts for my gnome session so that graphical programs have them automatically.
As far as I could find out, this is some specific issue for the compilervars.sh script because the e.g. the advisor-vars.sh script works. Here is what I did. I created a file /etc/profile.d/intelCC.sh with the content
source /opt/intel/composerxe/bin/compilervars.sh intel64 source /opt/intel/inspector_xe/inspxe-vars.sh intel64 source /opt/intel/vtune_amplifier_xe/amplxe-vars.sh intel64 source /opt/intel/advisor_xe/advixe-vars.sh intel64 export XXXXX="Hello"
This seems to be the right way to set system-wide variables which are only loaded once at gnome-login. And indeed, after a logout/login some of the variables are always available, be it in a terminal or in a GUI program. For instance the defined XXXXX is available, but additionally e.g. VTUNE_AMPLIFIER_XE_2013_DIR and the PATH was adjusted to contain vtune,advisor,... directories.
What does not work is the setting which happens in all the sub-scripts executed in compilervars.sh.
Does someone has a clue what I am doing wrong here?