Search code examples
gccenvironment-variablesicc

After passing ctree nosetests I failed after updating .bashrc to include openmp


I was able to pass the ctree nosetests before I downloaded the intel compiler for the openmp libraries. After downloading the compiler and changing bashrc:

export PATH=/usr/local/llvm-omp/bin/:$PATH
export C_INCLUDE_PATH=/usr/local/llvm-omp/include:/opt/intel/composerxe/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/usr/local/llvm-omp/include:/opt/intel/composerxe/include:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=/usr/local/llvm-omp/lib:/opt/intel/composerxe/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/llvm-omp/lib:/opt/intel/composerxe/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/intel/composerxe/lib:$LD_LIBRARY_PATH

Now, however, I fail the nosetests with this error:

/opt/intel/composerxe/include/math.h:29:3: error: "This Intel <math.h> is for use with only
  the Intel compilers!"

Solution

  • Try adding:

    /usr/include:
    

    and

    /usr/lib:
    

    respectively before all the rest of the paths in your environment variables, so it uses your system headers before it finds the intel ones.