Bug 1137

Summary: mpi module is hard-coded for openmpi
Product: ns-3 Reporter: baofenye
Component: mpiAssignee: George Riley <riley>
Status: RESOLVED FIXED    
Severity: major CC: gjcarneiro, jpelkey, ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description baofenye 2011-05-11 15:44:31 UTC
1.
ompi_request_t is only defined in openmpi, other mpi implementation (e.g. MPICH2) has different typedef for MPI_Request.

src/mpi/model/mpi-interface.h:
    22 #ifndef NS3_MPI_INTERFACE_H
    23 #define NS3_MPI_INTERFACE_H
    24 
    25 #include <stdint.h>
    26 #include <list>
    27 
    28 #include "ns3/nstime.h"
    29 #include "ns3/buffer.h"
    30 
****31 struct ompi_request_t;
****32 typedef struct ompi_request_t* MPI_Request;
    33 
    34 namespace ns3 {
    35 
    36 /**
    37  * maximum MPI message size for easy
    38  * buffer creation
    39  */

2. -showme:compile and -showme:link are options for openmpi, not necessarily for other mpi implementation (e.g. MPICH2 uses -compile-info and -link-info)

src/mpi/wscript:
    11         p = subprocess.Popen([conf.env['MPI'], '-showme:compile'], stdout=subprocess.PIPE)
    12         flags = p.stdout.read().rstrip().split()
    13         p.wait()
    14         env.append_value("CXXFLAGS_MPI", flags)
    15 
    16         p = subprocess.Popen([conf.env['MPI'], '-showme:link'], stdout=subprocess.PIPE)
    17         flags = p.stdout.read().rstrip().split()
    18         p.wait()
    19         env.append_value("LINKFLAGS_MPI", flags)
    20 
    21         env.append_value('CXXDEFINES', 'NS3_MPI')
    22         conf.report_optional_feature("mpi", "MPI Support", True, '')
    23         conf.env['ENABLE_MPI'] = True

for MPICH2 it could be 
****11         p = subprocess.Popen([conf.env['MPI'], '-compile-info'], stdout=subprocess.PIPE)
****12         flags = p.stdout.read().rstrip().split()[1:]
    13         p.wait()
    14         env.append_value("CXXFLAGS_MPI", flags)
    15 
****16         p = subprocess.Popen([conf.env['MPI'], '-link-info'], stdout=subprocess.PIPE)
****17         flags = p.stdout.read().rstrip().split()[1:]
    18         p.wait()
    19         env.append_value("LINKFLAGS_MPI", flags)
    20 
    21         env.append_value('CXXDEFINES', 'NS3_MPI')
    22         conf.report_optional_feature("mpi", "MPI Support", True, '')
    23         conf.env['ENABLE_MPI'] = True


FY
Comment 1 Gustavo J. A. M. Carneiro 2011-09-25 11:28:48 UTC
changeset:   7542:5351a9cdb84b
tag:         tip
user:        Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
date:        Sun Sep 25 16:28:09 2011 +0100
summary:     Bug 1137 - mpi module is hard-coded for openmpi