@@ -14,12 +14,16 @@ dependencies = []
1414
1515dependencies += dependency (' fftw3' , version : ' >= 3.0.0' , required : true )
1616
17- # Detecting if MPICH is installed and enabling support if present
18- mpi_dependency = dependency (' mpich' , version : ' >= 4.0.0' , required : false )
17+ # Detecting if MPICH or OPENMPI are installed and enabling support if present
18+ mpich_dependency = dependency (' mpich' , version : ' >= 4.0.0' , required : false )
19+ openmpi_dependency = dependency (' ompi' , version : ' >= 5.0.0' , required : false )
1920
20- if mpi_dependency .found()
21+ if mpich_dependency .found()
2122 cpp_args = [' -fPIC' , ' -std=c++11' , ' -DUSE_MPI=1' ]
22- dependencies += mpi_dependency
23+ dependencies += mpich_dependency
24+ elif openmpi_dependency.found()
25+ cpp_args = [' -fPIC' , ' -std=c++11' , ' -DUSE_MPI=1' ]
26+ dependencies += openmpi_dependency
2327else
2428 cpp_args = [' -fPIC' , ' -std=c++11' ]
2529endif
@@ -217,7 +221,7 @@ sources = files([
217221 ' teapot/wrap_matrix_generator.cc' ,
218222 ' teapot/teapotbase.cc' ,
219223 ' teapot/MatrixGenerator.cc'
220- ])
224+ ])
221225inc = include_directories ([
222226 python.get_variable (' INCLUDEPY' , '' ),
223227 ' main' ,
@@ -247,7 +251,7 @@ inc = include_directories([
247251 ' orbit' ,
248252 ' utils/integration' ,
249253 ' orbit/Apertures'
250-
254+
251255])
252256
253257
@@ -397,9 +401,3 @@ python.extension_module('error_base',
397401 install : true ,
398402 subdir : ' orbit/core' ,
399403)
400-
401-
402-
403-
404-
405-
0 commit comments