diff --git a/AmberTools/src/configure2 b/AmberTools/src/configure2 index dc05aac..49d396f 100755 --- a/AmberTools/src/configure2 +++ b/AmberTools/src/configure2 @@ -2373,12 +2373,18 @@ EOF ##try linking without libmpi_cxx and silently add it if fail $fc testMPICXX.o -o testMPICXX -lstdc++ 2>/dev/null >/dev/null if [ "$?" != "0" ]; then + if [ "$compiler" = 'intel' ]; then + libmpi_cxx="" + fc_add="-nofor-main" + else libmpi_cxx="-lmpi_cxx" + fc_add="" + fi fi ##try linking again, with the flag set to whatever it should be, and this time ##report any failures - $fc testMPICXX.o -o testMPICXX -lstdc++ $libmpi_cxx 2>/dev/null >/dev/null + $fc $fc_add testMPICXX.o -o testMPICXX -lstdc++ $libmpi_cxx 2>/dev/null >/dev/null if [ "$?" != "0" ]; then echo "" echo "Error! Could not link C++ mpi code using mpi fortran linker:"