Bug 961

Summary: Problem with MPI activation
Product: ns-3 Reporter: jframos45
Component: build systemAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: Other   
OS: Linux   

Description jframos45 2010-07-23 06:24:52 UTC
I want enable MPI. It detected correctly mpic++ but it show an error:
    > ./waf distclean
    > ./waf -d debug configure --enable-mpi

......
Checking for program mpic++                     /bin/mpich/bin/mpic++
c++: unrecognized option '-showme:compile'
/usr/lib/crt1.o: In function `_start':
init.c:(.text+0x41): undefined reference to `main'
collect2: ld returned 1 exit status
c++: unrecognized option '-showme:link'
/usr/lib/crt1.o: In function `_start':
init.c:(.text+0x41): undefined reference to `main'
collect2: ld returned 1 exit status
.....

I have been watching the wscript file:

.....
    # for MPI
    conf.find_program('mpic++', var='MPI')
    if Options.options.enable_mpi and conf.env['MPI']:
        p = subprocess.Popen([conf.env['MPI'], '-showme:compile'], stdout=subprocess.PIPE) ////// Problem here, g++ don´t recognized this option
        flags = p.stdout.read().rstrip().split()
        p.wait()
        env.append_value("CXXFLAGS_MPI", flags)

.....

Thanks.
Comment 1 jframos45 2010-07-23 13:23:42 UTC
I had installed MPICH interface for MPI. I have just install OpenMPI and builded without problems. 
The mpic++ of MPICH doesn´t accept "-showme:compile" parameter...