examples: Added simulation scenario with MPI support
docs: Update documentation to include instructions
for MPI support and scenario executed in parallel
Change-Id: I5235462cad6f01751bcd5141b2c3e14585d5baa3
Refs: #2504
diff --git a/examples/wscript b/examples/wscript
index b7e9afb..c1eb9c3 100644
--- a/examples/wscript
+++ b/examples/wscript
@@ -6,7 +6,11 @@
# This may be necessary for visualizer to work
all_modules = [mod[len("ns3-"):] for mod in bld.env['NS3_ENABLED_MODULES']]
- for i in bld.path.ant_glob(['*.cpp']):
+ examples = bld.path.ant_glob(['*.cpp'], excl=['*-mpi.cpp'])
+ if 'NS3_MPI' in bld.env['DEFINES_MPI']:
+ examples += bld.path.ant_glob(['*-mpi.cpp'])
+
+ for i in examples:
name = str(i)[:-len(".cpp")]
obj = bld.create_ns3_program(name, all_modules)
obj.source = [i] + bld.path.ant_glob(['%s/**/*.cpp' % name])