User FAQ: Difference between revisions
(started the users faq) |
(some mercurial and scons advice) |
||
Line 20: | Line 20: | ||
Please consult [http://www.nsnam.org/contributing.html#bugs this page]. Also, please consider fixing the bug, not just reporting it :) | Please consult [http://www.nsnam.org/contributing.html#bugs this page]. Also, please consider fixing the bug, not just reporting it :) | ||
== Mercurial == | |||
=== working with subsets of repositories === | |||
Q. Is there a way with mercurial to pull/merge/push subsets of the repositories? For instance, suppose I wanted only to grab the samples directory from a repo and merge that alone. | |||
A. (from Mathieu Lacage) You cannot cherry-pick individual changesets other than by exporting | |||
them to patches first. The reason is that each Changeset contains a | |||
single hash which is, among others, based on the hash of the 'parent' | |||
changeset hash. So, if you 'reparent' a changeset, you change its hash | |||
id because the id of the parent changes. If the hash id of a changeset | |||
changes, it is a different changeset so, mercurial cannot really manage | |||
these individual changesets. | |||
So, the idea is that merging happens from one repo to another, and | |||
cannot be done on a sub-dir basis. The other alternatives are: | |||
1) the latest mercurial has support for in-repo branches: you can | |||
maintain multiple branches within a single repository but each branch | |||
represents a branch for the whole repository. | |||
2) the latest mercurial contains the 'forest' extension which is a way | |||
to make mercurial manage a 'forest' of repos: each repo is independent | |||
but they also behave as a single big repo through the forest extension. | |||
== Scons (build process) == | |||
=== Library not loaded error === | |||
Question: I built ns-3 successfully, but when I try to run a sample program I get something like: | |||
<pre> | |||
> ./sample-packet | |||
dyld: Library not loaded: build-dir/dbg-shared/lib/libcommon.dylib | |||
Referenced from: /tmp/ns-3/build-dir/dbg-shared/bin/./sample-packet | |||
Reason: image not found | |||
Trace/BPT trap | |||
</pre> | |||
Answer: This is because the library path variable of your environment does not include the location where the ns-3 modules (libraries) are located. | |||
In Linux, this is the LD_LIBRARY_PATH variable. In OS X, this is the DYLD_LIBRARY_PATH variable. These need to include the lib/ directory where these ns-3 libraries are built. | |||
In this example, setting | |||
DYLD_LIBRARY_PATH=/tmp/ns-3/build-dir/dbg-shared/lib/ | |||
will work. | |||
=== How do I do the equivalent of a "make clean"? === | |||
<pre> | |||
scons -c | |||
</pre> |
Revision as of 23:39, 31 January 2007
Main Page - Roadmap - Summer Projects - Project Ideas - Developer FAQ - Tools - Related Projects
HOWTOs - Installation - Troubleshooting - User FAQ - Samples - Models - Education - Contributed Code - Papers
This wiki page is devoted to questions for users of the simulator. There is a similar Developer_FAQ page for ns-3 software developers and maintainers.
What is the difference between ns-2 and ns-3?
ns-2 is a popular discrete-event network simulator developed under several previous research grants and activities. It remains in active use and will continue to be maintained.
ns-3 is a new software development effort focused on improving upon the core architecture, software integration, models, and educational components of ns-2. The project commenced in July 2006 and there have not yet been any releases (pre-alpha stage).
If you are looking for a simulator to currently use for research, please use ns-2.
Will ns-2 scripts run on ns-3?
No. ns-2 uses OTcl as its scripting environment. ns-3 will use C++ programs or python scripts to define simulations.
I found a bug in ns-3. How do I report it?
Please consult this page. Also, please consider fixing the bug, not just reporting it :)
Mercurial
working with subsets of repositories
Q. Is there a way with mercurial to pull/merge/push subsets of the repositories? For instance, suppose I wanted only to grab the samples directory from a repo and merge that alone.
A. (from Mathieu Lacage) You cannot cherry-pick individual changesets other than by exporting them to patches first. The reason is that each Changeset contains a single hash which is, among others, based on the hash of the 'parent' changeset hash. So, if you 'reparent' a changeset, you change its hash id because the id of the parent changes. If the hash id of a changeset changes, it is a different changeset so, mercurial cannot really manage these individual changesets.
So, the idea is that merging happens from one repo to another, and cannot be done on a sub-dir basis. The other alternatives are:
1) the latest mercurial has support for in-repo branches: you can maintain multiple branches within a single repository but each branch represents a branch for the whole repository.
2) the latest mercurial contains the 'forest' extension which is a way to make mercurial manage a 'forest' of repos: each repo is independent but they also behave as a single big repo through the forest extension.
Scons (build process)
Library not loaded error
Question: I built ns-3 successfully, but when I try to run a sample program I get something like:
> ./sample-packet dyld: Library not loaded: build-dir/dbg-shared/lib/libcommon.dylib Referenced from: /tmp/ns-3/build-dir/dbg-shared/bin/./sample-packet Reason: image not found Trace/BPT trap
Answer: This is because the library path variable of your environment does not include the location where the ns-3 modules (libraries) are located.
In Linux, this is the LD_LIBRARY_PATH variable. In OS X, this is the DYLD_LIBRARY_PATH variable. These need to include the lib/ directory where these ns-3 libraries are built.
In this example, setting DYLD_LIBRARY_PATH=/tmp/ns-3/build-dir/dbg-shared/lib/ will work.
How do I do the equivalent of a "make clean"?
scons -c