Salome HOME
topo2volmesh: on virtual machines use --oversubscribe
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 3 Feb 2022 12:56:52 +0000 (13:56 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 3 Feb 2022 12:56:52 +0000 (13:56 +0100)
products/compil_scripts/topo2volmesh.sh

index 442ce814a8aa3fbd82f7605870d58cb85b761a3e..c8843faf1a76018612d912931f96e98314112834 100755 (executable)
@@ -72,6 +72,16 @@ then
     exit 4
 fi
 
+echo
+echo "*** Check if node is a virtual machine"
+ISVM=$(hostnamectl status|grep -i chassis:|grep vm)
+if [ $? -ne 0 ]; then
+    echo "*** oversubscribe..."
+    sed -i 's/mpirun -np \$(NP)/mpirun -np \$(NP) --oversubscribe/g' src/*/Makefile.am
+else
+    echo "*** hostnamectl says that $HOSTNAME is *NOT* a virtual machine"
+fi
+
 make check
 if [ $? -ne 0 ]
 then