Bug 2726 - Visual Studio 2015 Development Environment for NS-3
Visual Studio 2015 Development Environment for NS-3
Status: ASSIGNED
Product: ns-3
Classification: Unclassified
Component: general
unspecified
PC Windows
: P3 normal
Assigned To: Robert Ammon
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-07 20:50 EDT by Tom Henderson
Modified: 2017-12-08 21:00 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2017-04-07 20:50:00 EDT
This is posted on behalf of Robert Ammon, to track his work on enabling ns-3 for Visual Studio 2015.

Work Completed (as of 4/3/17)
----------------------------
1) Loaded the previous work from John Abraham and made the following changes:
a. Convert the projects from VS 2012 to VS 2015
b. Updated the files in the projects to the latest source files from the ns-3-dev repository.  This involved removing the files that are no longer part of NS-3 and adding the files created since ns-3.18 (which is what John’s work was based upon).
c. Added some of the new modules to the solution:
i. Internet-apps, Wave, Traffic control, topology read, lr-wpan, sixlowpan
ii. Wave
d. Incorporated Windows version of pthreads into the build
e. Incorporated Windows version of dlfcn into the build
f. Created projects for some example applications
g. Updated ns-3-dev source code to resolve all compiler warnings

2) Incorporated Windows versions of
a. GSL
b. Regex
c. Libxml

3) Linked many examples

Future Work
------------
1) Port TUN/TAP driver for Windows for Tap-bridge and Fd-net-device for the Windows implementation.
2) Determine process for creating merged “module” header files such as "ns3/core-module.h" under Windows.  For now, transfer them from a Linux build environment.
3) Successfully complete the relevant project tests (using test.py if possible)
4) Create some Windows specific examples (if required).
5) Update the coding style and build documentation to address the Visual Studio requirements.
6) Update all the affected project documentation and web pages.
7) After completing VS 2015, check operation and update for VS 2017.
8) Incorporate the ns-3-dev source code changes into the repository.

Issues
--------
1) Need to determine how many more NS-3 functions can be reasonably be added.  I have a working version of Python and need to see what other parts of NS-3 can be made workable on Windows.
Comment 1 Tom Henderson 2017-04-13 17:15:53 EDT
Robert's status update:

Work Completed (as of 4/10/2017)
-----
1) Linked the following examples:
a. Wimax
b. Wireless

Future Work
-----------
1) Port TUN/TAP driver for Windows for Tap-bridge and Fd-net-device for the Windows implementation.
2) Determine process for creating merged “module” header files such as "ns3/core-module.h" under Windows.  For now, transfer them from a Linux build environment.
3) Successfully complete the relevant project tests (using test.py if possible)
4) Create some Windows specific examples (if required).
5) Update the coding style and build documentation to address the Visual Studio requirements.
6) Update all the affected project documentation and web pages.
7) After completing VS 2015, check operation and update for VS 2017.
8) Incorporate the ns-3-dev source code changes into the repository.

Issues
------
1) The test application (test-runner) throws exceptions when executing the destructor from a number of tests.  Have started debugging this issue but it is likely some subtle Windows / Linux difference that is going to be exceptionally hard to find.  In the meantime, I am going to execute each example and test manually to make a list of porting issues, then attack the destructor issue.
2) Need to determine how many more NS-3 functions can be reasonably be added.  I have a working version of Python and need to see what other parts of NS-3 can be made workable on Windows.
a. Tap-bridge
b. Fd-net-device
c. Click
d. Openflow
Comment 2 Robert Ammon 2017-04-19 23:05:19 EDT
Work Completed (as of 4/17/2017)
--------

1) Create Optimized configuration (there are 3 configurations Debug, Release and Optimized).  Build options set tot he values defined for MSVC from cflags.py

2) In the process of updating the NS-3 source code to resolve warning level 4 errors.

3) Current execution of test-runner has all tests passing except for the following:

FAIL routing-aodv-regression 0.084 s (packet time difference of 1 ns on some of the tests)

FAIL int64x64 0.012 s
  FAIL Parse int64x64_t numbers as strings 0.006 s
      test="value.GetHigh () (actual) == hi (limit)" actual="-1" limit="-2" in="..\..\..\src\core\test\int64x64-test-suite.cc:230" High parts do not match for input string "-1.000000000000000000054"

FAIL mobility-trace 0.006 s
  FAIL Mobility Trace Test Case 0.006 s
      test="diff (actual) == false (limit)" actual="1" limit="0" in="..\..\..\src\mobility\test\mobility-trace-test-suite.cc:106" ASCII traces C:\Users\ROBERT~1\AppData\Local\Temp\ns-3.10.27.34.11991\mobility-trace\Mobility Trace Test Case\mobility-trace-test.mob and C:\NS3\ns-3-win-dev\y\test\mobility-trace-example.mob differ starting from line 0

FAIL waypoint-mobility-model 0.001 s
  FAIL Check Waypoint Mobility Model LAZY notification accuracy 0.000 s
      test="sec - ((double)((int)sec)) (actual) == 0.5 (limit)" actual="0.5" limit="0.5" in="..\..\..\src\mobility\test\waypoint-mobility-model-test.cc:144" Course didn't change between waypoints with LAZY notifications

FAIL pcap-file 0.002 s
  FAIL Check to see that PcapFile::Open with mode std::ios::out works 0.000 s
      test="f.Fail () (actual) == false (limit)" actual="1" limit="0" in="..\..\..\src\network\test\pcap-file-test-suite.cc:136" Open (C:\Users\ROBERT~1\AppData\Local\Temp\ns-3.10.28.36.12193\pcap-file\Check to see that PcapFile::Open with mode std::ios::out works\3073.pcap, "w") returns error

FAIL routing-olsr-header 0.000 s
  FAIL Check Hna olsr messages 0.000 s
      test="hnaOut.associations[0].mask (actual) == Ipv4Mask ("255.255.255.0") (limit)" actual="102.102.102.102" limit="255.255.255.0" in="..\..\..\src\olsr\test\olsr-header-test-suite.cc:295" 502

FAIL rocketfuel-topology-reader 0.000 s
  FAIL RocketfuelTopologyReaderTest 0.000 s
      test="nodes.GetN () (actual) != 0 (limit)" actual="0" limit="0" in="..\..\..\src\topology-read\test\rocketfuel-topology-reader-test-suite.cc:76" Problems reading node information the topology file..

FAIL pie-queue-disc 0.034 s
  FAIL Sanity check on the pie queue disc implementation 0.034 s
      test="test5 (actual) < test4 (limit)" actual="129" limit="129" in="..\..\..\src\traffic-control\test\pie-queue-disc-test-suite.cc:343" Test 5 should have less unforced drops than test 4
Comment 3 Robert Ammon 2017-09-04 20:49:56 EDT
I have successfully compiled and linked NS-3 under VS 2015.  This includes the libraries, test programs and example programs for all current NS-3 components where all third party required libraries for Windows exist (pthreads, libxml, gsl, etc.)  

There are three build targets, Debug, Release and Optimized. The Debug build uses warning level 4 (the W4 complier option) which treats all warnings as errors.  Because warnings are hidden by WAF in the Linux environment, there are a significant number of compiler warnings in each module which have been corrected in the source code base files.

I have started testing the Visual Studio build under Windows and regression testing the source code base changes under Linux.  Regression testing under Linux is being done in two parts; 1) merging non platform specific changes to address compiler warnings and executing the full suite of tests using ./test.py then 2) merging the Windows specific source code base file changes and repeating the regression testing using ./test.py.  Both the Windows testing and Linux testing are occurring simultaneously.

The platform independent corrections for the Internet module have been regression tested under Linux and have been uploaded as http://codereview.appspot.com/326390043.
Comment 4 Robert Ammon 2017-09-05 23:15:19 EDT
Additional testing has identified the following bugs in the Internet module:

Bug 2781 - Invalid iterator access.

Patch has been submitted for this bug

Bug 2211 - Use after free error

This bug has been reopened since there still exists a use after free error.  Review by the module owner is needed to determine a resolution for this bug.
Comment 5 Robert Ammon 2017-09-06 19:28:32 EDT
Additional testing has identified the following bugs in the LTE module:

Bug 2782 - Invalid MCS value is being checked in LteAmc::CreateCqiFeedbacks

Patch has been submitted for this bug.
Comment 6 Robert Ammon 2017-11-08 22:56:10 EST
Changes have been uploaded to http://codereview.appspot.com/334960043 to resolve complier warnings for Examples.
Comment 7 Robert Ammon 2017-11-08 23:05:42 EST
Changes have been uploaded to http://codereview.appspot.com/338790043 to resolve complier warnings for Aodv.
Comment 8 Robert Ammon 2017-11-08 23:10:07 EST
Changes have been uploaded to http://codereview.appspot.com/331220043 to resolve complier warnings for Applications.
Comment 9 Robert Ammon 2017-11-09 00:41:53 EST
Changes have been uploaded to http://codereview.appspot.com/331230043 to resolve complier warnings for Buildings.
Comment 10 Robert Ammon 2017-11-09 00:45:45 EST
Changes have been uploaded to http://codereview.appspot.com/334020043 to resolve complier warnings for Config-store.
Comment 11 Robert Ammon 2017-11-09 01:15:46 EST
Changes have been uploaded to http://codereview.appspot.com/336970043 to resolve complier warnings for Core.
Comment 12 Robert Ammon 2017-11-09 01:20:00 EST
Changes have been uploaded to http://codereview.appspot.com/337930043 to resolve complier warnings for CSMA.
Comment 13 Robert Ammon 2017-11-09 01:23:32 EST
Changes have been uploaded to http://codereview.appspot.com/339760043 to resolve complier warnings for DSDV.
Comment 14 Robert Ammon 2017-11-09 01:34:24 EST
Changes have been uploaded to http://codereview.appspot.com/333050043 to resolve complier warnings for DSR.
Comment 15 Robert Ammon 2017-11-09 01:39:14 EST
Changes have been uploaded to http://codereview.appspot.com/336110043 to resolve complier warnings for Energy.
Comment 16 Robert Ammon 2017-11-09 14:05:59 EST
Changes have been uploaded to http://codereview.appspot.com/338820043 to resolve complier warnings for Fd-net-device.
Comment 17 Robert Ammon 2017-11-09 14:09:29 EST
Changes have been uploaded to http://codereview.appspot.com/336980043 to resolve complier warnings for Flow-monitor.
Comment 18 Robert Ammon 2017-11-09 15:27:39 EST
Changes have been uploaded to http://codereview.appspot.com/337950043 to resolve complier warnings for Internet
Comment 19 Robert Ammon 2017-11-09 15:33:39 EST
Changes have been uploaded to http://codereview.appspot.com/337960043 to resolve complier warnings for Internet-apps
Comment 20 Robert Ammon 2017-11-09 15:41:19 EST
Changes have been uploaded to http://codereview.appspot.com/338830043 to resolve complier warnings for Lr-wpan
Comment 21 Robert Ammon 2017-11-09 20:16:33 EST
Changes have been uploaded to http://codereview.appspot.com/338840043 to resolve complier warnings for Lte
Comment 22 Robert Ammon 2017-11-09 20:31:01 EST
Changes have been uploaded to http://codereview.appspot.com/339770043 to resolve complier warnings for Mesh
Comment 23 Robert Ammon 2017-11-09 20:37:07 EST
Changes have been uploaded to http://codereview.appspot.com/331250043 to resolve complier warnings for Mobility
Comment 24 Robert Ammon 2017-11-09 20:40:47 EST
Changes have been uploaded to http://codereview.appspot.com/332170043 to resolve complier warnings for Mpi
Comment 25 Robert Ammon 2017-11-09 20:45:03 EST
Changes have been uploaded to http://codereview.appspot.com/338850043 to resolve complier warnings for Netanim
Comment 26 Robert Ammon 2017-11-10 02:01:16 EST
Changes have been uploaded to http://codereview.appspot.com/339780043 to resolve complier warnings for Network
Comment 27 Robert Ammon 2017-11-10 02:32:19 EST
Changes have been uploaded to http://codereview.appspot.com/336990043 to resolve complier warnings for Nix-vector-routing
Comment 28 Robert Ammon 2017-11-10 02:37:21 EST
Changes have been uploaded to http://codereview.appspot.com/337970043 to resolve complier warnings for Olsr
Comment 29 Robert Ammon 2017-11-10 02:40:19 EST
Changes have been uploaded to http://codereview.appspot.com/337980043 to resolve complier warnings for Point-to-point
Comment 30 Robert Ammon 2017-11-10 02:47:13 EST
Changes have been uploaded to http://codereview.appspot.com/331260043 to resolve complier warnings for Propagation
Comment 31 Robert Ammon 2017-11-10 02:52:53 EST
Changes have been uploaded to http://codereview.appspot.com/338860043 to resolve complier warnings for Sixlowpan
Comment 32 Robert Ammon 2017-11-10 03:01:56 EST
Changes have been uploaded to http://codereview.appspot.com/332190043 to resolve complier warnings for Spectrum
Comment 33 Robert Ammon 2017-11-10 03:09:04 EST
Changes have been uploaded to http://codereview.appspot.com/331270043 to resolve complier warnings for Stats
Comment 34 Robert Ammon 2017-11-10 03:12:24 EST
Changes have been uploaded to http://codereview.appspot.com/332200043 to resolve complier warnings for Tap-bridge
Comment 35 Robert Ammon 2017-11-10 03:35:02 EST
Changes have been uploaded to http://codereview.appspot.com/336140043 to resolve complier warnings for Test
Comment 36 Robert Ammon 2017-11-10 03:38:49 EST
Changes have been uploaded to http://codereview.appspot.com/337000043 to resolve complier warnings for Topology-read
Comment 37 Robert Ammon 2017-11-10 03:42:27 EST
Changes have been uploaded to http://codereview.appspot.com/337010043 to resolve complier warnings for Wave
Comment 38 Robert Ammon 2017-11-10 16:03:02 EST
Changes have been uploaded to http://codereview.appspot.com/333070043 to resolve complier warnings for Wifi
Comment 39 Robert Ammon 2017-11-10 16:42:27 EST
Changes have been uploaded to http://codereview.appspot.com/333080043 to resolve complier warnings for Traffic-control
Comment 40 Robert Ammon 2017-11-10 16:51:25 EST
Changes have been uploaded to http://codereview.appspot.com/338000043 to resolve complier warnings for Uan
Comment 41 Robert Ammon 2017-11-10 16:53:32 EST
Changes have been uploaded to http://codereview.appspot.com/339790043 to resolve complier warnings for Virtual-net-device
Comment 42 Robert Ammon 2017-11-10 17:25:12 EST
Changes have been uploaded to http://codereview.appspot.com/331280043 to resolve complier warnings for Wimax
Comment 43 Robert Ammon 2017-12-08 19:23:50 EST
Updated changes to use C++ type casts have been uploaded to http://codereview.appspot.com/338790043 for Aodv.
Comment 44 Robert Ammon 2017-12-08 19:27:45 EST
Changes to use C++ type casts have been uploaded to http://codereview.appspot.com/331220043 for Applications.
Comment 45 Robert Ammon 2017-12-08 19:30:33 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/331230043 for Buildings.
Comment 46 Robert Ammon 2017-12-08 19:33:20 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/334020043 for Config-store.
Comment 47 Robert Ammon 2017-12-08 19:36:21 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/336970043 for Core.
Comment 48 Robert Ammon 2017-12-08 19:43:07 EST
Updates to use C++ style type casts have been uploaded to http://codereview.appspot.com/337930043 for CSMA.
Comment 49 Robert Ammon 2017-12-08 19:45:43 EST
Changes to use C++ syle type casts have been uploaded to http://codereview.appspot.com/339760043 for DSDV.
Comment 50 Robert Ammon 2017-12-08 19:48:33 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/333050043 for DSR.
Comment 51 Robert Ammon 2017-12-08 19:50:43 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/336110043 for Energy.
Comment 52 Robert Ammon 2017-12-08 19:52:53 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/338820043 for Fd-net-device.
Comment 53 Robert Ammon 2017-12-08 19:55:40 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/336980043 for Flow-monitor.
Comment 54 Robert Ammon 2017-12-08 19:58:39 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/337950043 for Internet
Comment 55 Robert Ammon 2017-12-08 20:01:10 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/337960043 for Internet-apps
Comment 56 Robert Ammon 2017-12-08 20:03:25 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/338830043 for Lr-wpan
Comment 57 Robert Ammon 2017-12-08 20:06:40 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/338840043 for Lte
Comment 58 Robert Ammon 2017-12-08 20:13:40 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/339770043 for Mesh
Comment 59 Robert Ammon 2017-12-08 20:16:14 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/331250043 for Mobility
Comment 60 Robert Ammon 2017-12-08 20:18:34 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/332170043 for Mpi
Comment 61 Robert Ammon 2017-12-08 20:20:51 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/338850043 for Netanim
Comment 62 Robert Ammon 2017-12-08 20:23:19 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/339780043 for Network
Comment 63 Robert Ammon 2017-12-08 20:25:41 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/336990043 for Nix-vector-routing
Comment 64 Robert Ammon 2017-12-08 20:28:56 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/337970043 for Olsr
Comment 65 Robert Ammon 2017-12-08 20:30:44 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/337980043 for Point-to-point
Comment 66 Robert Ammon 2017-12-08 20:33:07 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/331260043 for Propagation
Comment 67 Robert Ammon 2017-12-08 20:35:29 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/338860043 for Sixlowpan
Comment 68 Robert Ammon 2017-12-08 20:37:48 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/332190043 for Spectrum
Comment 69 Robert Ammon 2017-12-08 20:40:11 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/331270043 for Stats
Comment 70 Robert Ammon 2017-12-08 20:42:03 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/332200043 for Tap-bridge
Comment 71 Robert Ammon 2017-12-08 20:44:15 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/336140043 for Test
Comment 72 Robert Ammon 2017-12-08 20:46:15 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/337000043 for Topology-read
Comment 73 Robert Ammon 2017-12-08 20:48:23 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/337010043 for Wave
Comment 74 Robert Ammon 2017-12-08 20:50:45 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/333070043 for Wifi
Comment 75 Robert Ammon 2017-12-08 20:52:39 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/333080043 for Traffic-control
Comment 76 Robert Ammon 2017-12-08 20:55:25 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/338000043 for Uan
Comment 77 Robert Ammon 2017-12-08 20:57:29 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/339790043 for Virtual-net-device
Comment 78 Robert Ammon 2017-12-08 21:00:05 EST
Changes to use C++ style type casts have been uploaded to http://codereview.appspot.com/331280043 for Wimax