How to run scratch-simulator-subdir ???

498 views
Skip to first unread message

Eric Gamess

unread,
Feb 7, 2013, 6:47:19 PM2/7/13
to ns-3-...@googlegroups.com
Hello all,

There is a simple simulation in a subdirectory of the scratch directory
(ns-allinone-3.16/ns-3.16/scratch/subdir/scratch-simulator-subdir.cc).

I tried to run it, but I had no success. From directory ns-allinone-3.16/ns-3.16,
I tried:
   ./waf --run scratch/subdir/scratch-simulator-subdir
   ./waf --run subdir/scratch-simulator-subdir

Of course, I know that I can copy the file (scratch-simulator-subdir.cc) to
the scratch directory, and run it there with:
   ./waf --run scratch/scratch-simulator-subdir

But, I like the fact that you can put all the related files of a simulation
in a directory, so you do not have a mess in the scratch directory.

Can someone help??? Thank you.

Eric.

Giovanna Garcia

unread,
Feb 8, 2013, 6:15:20 AM2/8/13
to ns-3-...@googlegroups.com
Hello Eric,
I just add a waf and wsript file on the directory, something like this:

# ls scratch/teste
file.c      waf    wscript

On the same directory I use the waf:

#./waf --run teste

Yes, I need to inform the folder's name to compile.

My waf file:

exec "`dirname "$0"`"/../../waf "$@"

------------------------------------------------------

On wscript file you add what you need:

## -*-Mode : python; py-indent-offset : 4; indent-tabs-mode : nil; coding : utf-8; -*-

import wutils
import os
import Options

def options(opt):
          (something here, I do not know what do you need to compile your project)
----------------------

My regards.



Eric.

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-------------------------------------------------------
   _     [GGarciaBas @ mail ~] $ uname --information 
  °v°     > Giovanna Garcia
 /(_)\    > Student at the Universidade Tecnológica Federal do Paraná
  ^ ^     > +55 45 9931-3158 (TIM)

 SEJA LIVRE!!
-------------------------------------------------------

Longhao Zou

unread,
Feb 8, 2013, 7:14:20 AM2/8/13
to ns-3-users
Hi,

Please try this but you keep the scratch-simulator-subdir.cc in the original folder.

./waf --run subdir

Regards,

Eric Gamess

unread,
Feb 8, 2013, 12:14:26 PM2/8/13
to ns-3-...@googlegroups.com

Thank you so much for your answer guys, this perfectly works:

   ./waf --run subdir

Eric.
Reply all
Reply to author
Forward
0 new messages