Bug 1137 - mpi module is hard-coded for openmpi
This commit is contained in:
@@ -28,8 +28,12 @@
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/buffer.h"
|
||||
|
||||
#if defined(NS3_OPENMPI)
|
||||
struct ompi_request_t;
|
||||
typedef struct ompi_request_t* MPI_Request;
|
||||
#elif defined(NS3_MPICH)
|
||||
typedef int MPI_Request;
|
||||
#endif
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
@@ -6,8 +6,18 @@ from waflib.Errors import WafError
|
||||
|
||||
def configure(conf):
|
||||
if Options.options.enable_mpi:
|
||||
if conf.check_cfg(path='mpic++', args='-showme',
|
||||
package='', uselib_store='MPI', mandatory=False):
|
||||
# try to detect openmpi installation
|
||||
mpi = conf.check_cfg(path='mpic++', args='-showme',
|
||||
package='', uselib_store='MPI', mandatory=False)
|
||||
if mpi:
|
||||
conf.env.append_value('DEFINES_MPI', 'NS3_OPENMPI')
|
||||
else:
|
||||
# try the MPICH2 flags
|
||||
mpi = conf.check_cfg(path='mpic++', args='-compile-info -link-info',
|
||||
package='', uselib_store='MPI', mandatory=False)
|
||||
if mpi:
|
||||
conf.env.append_value('DEFINES_MPI', 'NS3_MPICH')
|
||||
if mpi:
|
||||
conf.env.append_value('DEFINES_MPI', 'NS3_MPI')
|
||||
conf.env['ENABLE_MPI'] = True
|
||||
for libpath in conf.env.LIBPATH_MPI:
|
||||
|
||||
Reference in New Issue
Block a user