diff --git a/script/install_PETSC.sh b/script/install_PETSC.sh
index d4f67ab9d7176e5e3fd0266293f277ff4fc13d4a..60268df90685065913c943c0e35ddf8f94464623 100755
--- a/script/install_PETSC.sh
+++ b/script/install_PETSC.sh
@@ -11,7 +11,7 @@ fi
 
 source script/detect_gcc
 source script/discover_os
-detect_gcc_or_clang g++
+detect_compiler g++
 discover_os
 
 ##### if we are on osx we use gsed