You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-mathematics/petsc/files/petsc-3.13.0-do_not_run_mpi...

35 lines
2.8 KiB

diff --git a/config/BuildSystem/config/packages/MPI.py b/config/BuildSystem/config/packages/MPI.py
index 7e424e71..ee502bd2 100644
--- a/config/BuildSystem/config/packages/MPI.py
+++ b/config/BuildSystem/config/packages/MPI.py
@@ -210,28 +210,11 @@ shared libraries and run with --known-mpi-shared-libraries=1')
raise RuntimeError('Could not locate MPIEXEC - please specify --with-mpiexec option')
# Support for spaces and () in executable names; also needs to handle optional arguments at the end
# TODO: This support for spaces and () should be moved to core BuildSystem
- self.mpiexec = self.mpiexec.replace(' ', '\\ ').replace('(', '\\(').replace(')', '\\)').replace('\ -',' -')
- if (hasattr(self, 'ompi_major_version') and int(self.ompi_major_version) >= 3):
- (out, err, ret) = Configure.executeShellCommand(self.mpiexec+' -help all', checkCommand = noCheck, timeout = 60, log = self.log, threads = 1)
- if out.find('--oversubscribe') >=0:
- self.mpiexec = self.mpiexec + ' --oversubscribe'
+ self.mpiexec = self.mpiexec + ' --oversubscribe'
# using mpiexec environmental variables make sure mpiexec matches the MPI libraries and save the variables for testing in PetscInitialize()
# the variable HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE is not currently used. PetscInitialize() can check the existence of the environmental variable to
# determine if the program has been started with the correct mpiexec (will only be set for parallel runs so not clear how to check appropriately)
- (out, err, ret) = Configure.executeShellCommand(self.mpiexec+' -n 1 printenv', checkCommand = noCheck, timeout = 60, threads = 1, log = self.log)
- if ret:
- self.logWrite('Unable to run '+self.mpiexec+' with option "-n 1 printenv"\nThis could be ok, some MPI implementations such as SGI produce a non-zero status with non-MPI programs\n'+out+err)
- else:
- if out.find('MPIR_CVAR_CH3') > -1:
- if hasattr(self,'ompi_major_version'): raise RuntimeError("Your libraries are from OpenMPI but it appears your mpiexec is from MPICH");
- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'MPIR_CVAR_CH3')
- elif out.find('MPIR_CVAR_CH3') > -1:
- if hasattr(self,'ompi_major_version'): raise RuntimeError("Your libraries are from OpenMPI but it appears your mpiexec is from MPICH");
- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'MPICH')
- elif out.find('OMPI_COMM_WORLD_SIZE') > -1:
- if hasattr(self,'mpich_numversion'): raise RuntimeError("Your libraries are from MPICH but it appears your mpiexec is from OpenMPI");
- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'OMP')
self.addMakeMacro('MPIEXEC', self.mpiexec)
self.mpiexec = self.mpiexec + ' -n 1'