While trying to come up with a nice way to backup my OMNeT++ projects,
I have notice something odd:
Projects created with the template "Empty project with 'src' and
'simulations' folders", when compiled and run:
- the executable of the simulation is also created inside this src dir
- the 'results' dir is created inside the src dir
This seems rather odd to me. I only use Eclipse to work with OMNeT++
so it may be an Eclipse thing, but I would have expect something like
this instead (ASCII art follows):
my-project/
src/
source.cc
omnet.ini
network.ned
bin/
executable
results/
foo.elog
foo.sca
foo.vec
In the "Create, manage and run configurations' window (<Run> -> Run
Configurations...) I have notice there is a 'Working directory' with
the value of 'my-project/src/', maybe it should get change to just
'my-project' and then use suffixes for 'src/', 'results/', 'bin/' when
needed...
What do you think?
--
Alberto Cortés
Telematic Engineering Dept. at UC3M
--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.
You are right, I didn't notice it was actually a link (I use Linux).
> This is done, because usually the simulation
> executable expects the ini file and the root of ned folder in the current
> working directory (unless you specify otherwise). i.e. if you start the
> executable it will work as expected without adding extra command line
> parameters.
I see. The link looks convenient for the command line invocation.
I use to run OMNeT++ using the command line and I remember having to
pass that parameters by hand: I use to had directories for everything
to easily backup only the necessary files to recreate the simulations
and I thought the src-simulations templete was designed just for that.
If the link is a way to have the executable in the same dir as the ini
and NED files, What is the purpose of the simulation dir then?
> Unfortunately on windows (at least on XP and Vista) soft linking is not
> working, so the build process does the best it can and copy the whole
> executable there :( (On windows 7 it would be possible to create a soft
> link)
:(
> You can reconfigure your project to place the the results somewhere else,
> but you are on your own to set up all directories correctly...
> - Project Properies / OMNeT++ / Makemake
> - select the src directory in the tree and click "Options" and you can
> change the Output directory from 'out' to 'bin' but in this case you have to
> give the INI and NED file directories each time you start the simulation.
> The place of the 'result' directory ca be also customized by the
> 'result-dir' INI file option.
Thank you, somehow I miss that in the Configuration Options appendix
of the OMNeT++ manual.
I have succesfully use 'result-dir = ../results' to create a new
results dir at the project root dir.
I have also successfully edit (by hand) the input section of my .anf
files to use the new results dir instead of the old src/results dir.
There is still one problem, though: When I open (by clicking) one of
the result files, the IDE automatically builds an .anf file for it if
there is none already. It looks that the new .anf file is created in
the parent directory of the result dir: If the results dir is
/'my-project/src/results', then the .anf file is created at
'my-project/src', fine, but if the results dir is
'/my-project/results', the .anf file is created at '/my-project'.
It may be a good idea to automatically create all the .anf files in
the 'src' dir, instead of in 'results/..'
Alberto.
On Fri, Sep 17, 2010 at 2:39 PM, Rudolf Hornig <rudolf...@gmail.com> wrote:You are right, I didn't notice it was actually a link (I use Linux).
> Actually the executable is created at
> out/gcc-debug or out/gcc-release
> and for convenience a symbolic link is created in the src directory that
> points to the executable.
I see. The link looks convenient for the command line invocation.
> This is done, because usually the simulation
> executable expects the ini file and the root of ned folder in the current
> working directory (unless you specify otherwise). i.e. if you start the
> executable it will work as expected without adding extra command line
> parameters.
I use to run OMNeT++ using the command line and I remember having to
pass that parameters by hand: I use to had directories for everything
to easily backup only the necessary files to recreate the simulations
and I thought the src-simulations templete was designed just for that.
If the link is a way to have the executable in the same dir as the ini
and NED files, What is the purpose of the simulation dir then?
Thank you, somehow I miss that in the Configuration Options appendix
> Unfortunately on windows (at least on XP and Vista) soft linking is not
> working, so the build process does the best it can and copy the whole
> executable there :( (On windows 7 it would be possible to create a soft
> link)
:(
> You can reconfigure your project to place the the results somewhere else,
> but you are on your own to set up all directories correctly...
> - Project Properies / OMNeT++ / Makemake
> - select the src directory in the tree and click "Options" and you can
> change the Output directory from 'out' to 'bin' but in this case you have to
> give the INI and NED file directories each time you start the simulation.
> The place of the 'result' directory ca be also customized by the
> 'result-dir' INI file option.
of the OMNeT++ manual.
Thank you very much for the explanation, Rudolf. It's indeed a nice
way to improve the re-usability of projects.
> if in doubt try:
> opp_run -h config
That's *very* useful, thanks again. It's time for me to re-read the
user manual again :)