diff --git a/script/detect_gcc b/script/detect_gcc
index a22f097f2811e913ea4909b8056209bdbcd93517..a97d65a178a8e9ae055ae27a7fecc13649b4e167 100755
--- a/script/detect_gcc
+++ b/script/detect_gcc
@@ -161,7 +161,7 @@ function detect_compiler()
         commands[0]="icpc"
         commands[1]="g++"
         possible_solutions "${commands[@]}"
-        dgc_compiler=possible_solutions_ret
+        dgc_compiler=$possible_solutions_command
         dgc_ret=1
         CXX=$dgc_compiler
     fi
diff --git a/script/install_SUITESPARSE.sh b/script/install_SUITESPARSE.sh
index 73cba06e438587546c9544426e4deea0f1ad95d5..459a521043462fddd7e6baa7a5c5374d4a3983ee 100755
--- a/script/install_SUITESPARSE.sh
+++ b/script/install_SUITESPARSE.sh
@@ -40,10 +40,19 @@ if [ x"$platform" = x"osx"  ]; then
 else
     # Installation for linux
 
-    sed -i "/INSTALL_LIB\s=\s\/usr\/local\/lib/c\INSTALL_LIB = $1\/SUITESPARSE\/lib" SuiteSparse_config/SuiteSparse_config.mk
-    sed -i "/INSTALL_INCLUDE\s=\s\/usr\/local\/include/c\INSTALL_INCLUDE = $1\/SUITESPARSE\/include" SuiteSparse_config/SuiteSparse_config.mk
-    sed -i "/\sLAPACK\s=\s-llapack/c\LAPACK = " SuiteSparse_config/SuiteSparse_config.mk
-    sed -i "/\sBLAS\s=\s\-lopenblas/c\BLAS = -L$1/OPENBLAS/lib -lopenblas -lpthread" SuiteSparse_config/SuiteSparse_config.mk
+    if [ x"$CXX" == x"icpc" ]; then
+      export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/$1/OPENBLAS/lib"
+      sed -i "/INSTALL_LIB\s=\s\/usr\/local\/lib/c\INSTALL_LIB = $1\/SUITESPARSE\/lib" SuiteSparse_config/SuiteSparse_config.mk
+      sed -i "/INSTALL_INCLUDE\s=\s\/usr\/local\/include/c\INSTALL_INCLUDE = $1\/SUITESPARSE\/include" SuiteSparse_config/SuiteSparse_config.mk
+      sed -i "/\sLAPACK\s=\s-llapack/c\LAPACK = " SuiteSparse_config/SuiteSparse_config.mk
+      sed -i "/\sBLAS\s=\s\-lopenblas/c\BLAS = -L$1/OPENBLAS/lib -lopenblas -lpthread" SuiteSparse_config/SuiteSparse_config.mk
+    else
+      sed -i "/\sLIB\s=\s-lm\s-lrt/c\LIB\s=\s-shared-intel\s-lm\s-lrt\s-lifcore" SuiteSparse_config/SuiteSparse_config.mk
+      sed -i "/INSTALL_LIB\s=\s\/usr\/local\/lib/c\INSTALL_LIB = $1\/SUITESPARSE\/lib" SuiteSparse_config/SuiteSparse_config.mk
+      sed -i "/INSTALL_INCLUDE\s=\s\/usr\/local\/include/c\INSTALL_INCLUDE = $1\/SUITESPARSE\/include" SuiteSparse_config/SuiteSparse_config.mk
+      sed -i "/\sLAPACK\s=\s-llapack/c\LAPACK = " SuiteSparse_config/SuiteSparse_config.mk
+      sed -i "/\sBLAS\s=\s\-lopenblas/c\BLAS = -L$1/OPENBLAS/lib -lopenblas -lpthread" SuiteSparse_config/SuiteSparse_config.mk
+    fi
 
 fi
 
diff --git a/script/show_solutions b/script/show_solutions
index e1d088f3d07fc12b4b13db305f4924a2cfd698cf..74b1c333ead0c49d4870b055b941a56810c22422 100755
--- a/script/show_solutions
+++ b/script/show_solutions
@@ -32,5 +32,6 @@ function possible_solutions {
  else
    eval ${commands[$possible_solutions_ret]}
  fi
+ possible_solutions_command=${commands[$possible_solutions_ret]}
 }