From: Cédric Aguerre Date: Mon, 16 Feb 2015 16:24:24 +0000 (+0100) Subject: add option to select mpi module X-Git-Tag: V7_6_0a1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c83c43aef11f6b193bb511b643fd6d4784c43810;p=modules%2Fkernel.git add option to select mpi module --- diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 11a980bdb..3dfaa46d9 100644 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -237,6 +237,21 @@ class SalomeContext: # try to default to "start" command command = "_runAppli" + mpi_module_option = "--with_mpi_module=" + mpi_module = [x for x in args if x.startswith(mpi_module_option)] + if mpi_module: + mpi_module = mpi_module[0][len(mpi_module_option):] + print "Trying to load MPI module: %s..."%mpi_module, + import subprocess + try: + subprocess.call(["module", "load", mpi_module]) + print " OK" + except: + print " ** Failed **" + pass + options = [x for x in options if not x.startswith(mpi_module_option)] + pass + try: res = getattr(self, command)(options) # run appropriate method return res or (None, None)