run application need options in command line

14 views
Skip to first unread message

O.ELMahi

unread,
Dec 14, 2010, 11:29:39 PM12/14/10
to resp-sim
Hello,

i just get used to the resp. now iam trying to use my own software to
be tested in.

after creating the application and the architecture file. i went to
the ./startsimulation to run it.

the file was loaded correctly but could not be run. it gives me error
( no input file specified)

my problem is the software i use take the input file as an argument in
the executable command line.

now iam not sure where specify the input file name and other
conditions that should specified in the command line ?

thanks

Luca Fossati

unread,
Dec 15, 2010, 11:15:37 AM12/15/10
to resp...@googlegroups.com
Hi,

thank you for using ReSP; to quickly answer your question, look into
file architectures/base/mp_template.py and at the end you will see examples
of how to pass arguments to the program being simulated.

Please let me know if you have further problems.

Bye

Luca


--
You received this message because you are subscribed to the Google Groups "resp-sim" group.
To post to this group, send email to resp...@googlegroups.com.
To unsubscribe from this group, send email to resp-sim+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/resp-sim?hl=en.


O.ELMahi

unread,
Dec 15, 2010, 10:50:57 PM12/15/10
to resp-sim
first thank you vry much i checked it and it did work.

but now iam facing another problem when i try to use run_simulation()
i resive the following error :

**** RECEIVED EXCEPTION --> At: function unsigned int
BusLT<BUSWIDTH>::transport_dbg(int, tlm::tlm_generic_payload&) [with
BUSWIDTH = unsigned int] file: /home/jana/Desktop/resp-sim/components/
interconnect/simpleBus/BusLT.hpp:387 --> unsigned int
BusLT<BUSWIDTH>::transport_dbg(int, tlm::tlm_generic_payload&) [with
BUSWIDTH = unsigned int] bus: No target at this address: 34164736
Requesting Master: 1 Decoded device: 1 <-- ***

CTRL^D to quit the simulator

Real Elapsed Time (seconds):
0
Simulated Elapsed Time (nano-seconds):
649198.0
Bus Accesses:
30444
Bus Words:
30444



i used the same file you suggested just changed the application.

can you tell me how can i solve this error and what does it mean?

thanks

On Dec 15, 8:15 am, Luca Fossati <fossat...@gmail.com> wrote:
> Hi,
>
> thank you for using ReSP; to quickly answer your question, look into
> file architectures/base/mp_template.py and at the end you will see examples
> of how to pass arguments to the program being simulated.
>
> Please let me know if you have further problems.
>
> Bye
>
> Luca
>
> On Wed, Dec 15, 2010 at 5:29 AM, O.ELMahi <olfat.ibra...@gmail.com> wrote:
> > Hello,
>
> > i just get used to the resp. now iam trying to use my own software to
> > be tested in.
>
> > after creating the application and the architecture file. i went to
> > the ./startsimulation to run it.
>
> > the file was loaded correctly but could not be run. it gives me error
> > ( no input file specified)
>
> > my problem is the software i use take the input file as an argument in
> > the executable command line.
>
> > now iam not sure where specify the input file name and other
> > conditions that should specified in the command line ?
>
> > thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "resp-sim" group.
> > To post to this group, send email to resp...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > resp-sim+u...@googlegroups.com<resp-sim%2Bunsu...@googlegroups.com>
> > .

Luca Fossati

unread,
Dec 16, 2010, 3:33:00 AM12/16/10
to resp...@googlegroups.com
So, the error consists of ... what it says :):)

"No target at this address: 34164736 Requesting Master: 1"
which, means that Master 1 (i.e. the second microprocessor on the bus) tried to access
(read/write) to address 34164736 but there is no component mapped at this
address.

it is more or less the equivalent of a segmentation fault on your PC.

Without more details on what you are trying to do I cannot tell you much more.

Bye

Luca

To unsubscribe from this group, send email to resp-sim+u...@googlegroups.com.

Giovanni Beltrame

unread,
Dec 16, 2010, 12:47:48 PM12/16/10
to resp...@googlegroups.com
On 15/12/10 22:50, O.ELMahi wrote:
> first thank you vry much i checked it and it did work.
>
> but now iam facing another problem when i try to use run_simulation()
> i resive the following error :
> BUSWIDTH = unsigned int] bus: No target at this address: 34164736
> Requesting Master: 1 Decoded device: 1<-- ***

Olfat,

Make sure your software is properly compiled and linked for the use with
OS emulation. If you don't need multiple processors, stick to one to
simplify problem solving.
This is the equivalent of a segmentation fault, your application has
written outside the available memory space.

Cheers,
Giovanni

O.ELMahi

unread,
Dec 16, 2010, 8:15:48 PM12/16/10
to resp-sim

i am trying to do the simplest thing i am using only the main
architecture (one processor +os emulator +memory +bus) .

the program is compiled correctly on linux when i use the following
command :
gcc encoder.c helperFun.c -lm

it run and gives the following output:
jana@ubuntu:~/Desktop/resp-sim/software/apps/NASA_LF$ ./out --input
hawaii_sc01.raw --output results --row 512 --columns 614 --bands 224 --
format bip --ordering big
Original Image Size: 140836864 bytes, 134.31 Mbytes
Compressed Image Size: 24248406 bytes, 23.13 Mbytes
Average Compressed Band Size: 108251.81 bytes, 105.71 Kbytes
Minimum - Maximum Band Sizes: 63559 - 158291 bytes, 62.07 - 154.58
Kbytes
Compression ratio: 5.81
Bits/Pixel: 2.7547794
Compresison Time (including I/O): 63.13 sec
Overall compression speed (including I/O): 2.13 Mbytes/sec

the script file i used is as follows:

def build(bld):

for arch in bld.lst_variants:
if arch == 'default': continue

obj = bld.new_task_gen(features='cc cprogram')
obj.env = bld.env_of_name(arch).copy()
obj.source = """
encoder.c helperFun.c
"""
obj.target = 'encoder'
obj.includes = '/home/jana/Desktop/resp-sim/software/apps/
NASA_LF/'
obj.uselib_local = 'ompsrc_cc_'+arch+' gomp_'+arch+'
pthread_stub_'+arch
obj.env.append_unique('LINKFLAGS', '-lm')
it is build and loaded correctly but not working and gives the
previously described error ??

Thanks

Luca Fossati

unread,
Dec 17, 2010, 3:45:24 AM12/17/10
to resp...@googlegroups.com
Olfat,

I do not know exactly what the problem is but, definitely, there is something wrong in your architecture as it seems
that you are using more than one master (i.e. more than one processor). So I would say that the problem is there.
Another source of problem could be in the path of the raw input image: I suggest you specify the full path.
One more thing: the compression program you are testing... hasn't been fully tested (trust me, I wrote it :) ) so
there might be also something wrong in it!!! :)

Let me know

Bye

Luca

--
You received this message because you are subscribed to the Google Groups "resp-sim" group.
To post to this group, send email to resp...@googlegroups.com.
To unsubscribe from this group, send email to resp-sim+u...@googlegroups.com.

O.ELMahi

unread,
Dec 17, 2010, 7:36:59 PM12/17/10
to resp-sim
i tried the architecture with other applications and it worked fine so
i think it is the code as u suggested.

i tried to search for othe code to use and found one
http://www-sop.inria.fr/epidaure/personnel/malandain/segment/edges.html

the problem is it is old and use cc instead of gcc. so i can not
write the wscript file correctly to build it the make file for it is
as follow :

CFILES = connexe.c \
convert.c \
extrema.c \
iopnm.c \
recbuffer.c \
recline.c \
test-edges.c \
test-edges-pnm.c \
test-hyster-pnm.c

COBJS = connexe.o \
convert.o \
extrema.o \
iopnm.o \
recbuffer.o \
recline.o \
zcross.o

EOBJS = test-edges.o \
test-edges-pnm.o \
test-hyster-pnm.o

.c.o:; cc -O -I. -c $*.c;

all : clean test-edges test-edges-pnm test-hyster-pnm

clean :
rm -f $(COBJS) $(EOBJS) test-edges test-edges-pnm test-hyster-pnm

test-edges : $(EOBJS) $(COBJS)
cc -O -I. -o test-edges test-edges.o $(COBJS) -lm

test-edges-pnm : $(EOBJS) $(COBJS)
cc -O -I. -o test-edges-pnm test-edges-pnm.o $(COBJS) -lm

test-hyster-pnm : $(EOBJS) $(COBJS)
cc -O -I. -o test-hyster-pnm test-hyster-pnm.o $(COBJS) -lm

how can i use the cc and cc -O -I. -o ??

thanks

On Dec 17, 12:45 am, Luca Fossati <fossat...@gmail.com> wrote:
> Olfat,
>
> I do not know exactly what the problem is but, definitely, there is
> something wrong in your architecture as it seems
> that you are using more than one master (i.e. more than one processor). So I
> would say that the problem is there.
> Another source of problem could be in the path of the raw input image: I
> suggest you specify the full path.
> One more thing: the compression program you are testing... hasn't been fully
> tested (trust me, I wrote it :) ) so
> there might be also something wrong in it!!! :)
>
> Let me know
>
> Bye
>
> Luca
>
> > resp-sim+u...@googlegroups.com<resp-sim%2Bunsu...@googlegroups.com>
> > .

Luca Fossati

unread,
Dec 19, 2010, 12:47:13 PM12/19/10
to resp...@googlegroups.com
Well,

considering that, anyway, it runs natively on your OS, the most likely possibility is that you are doing something wrong
with the architecture and/or in passing the parameters. Investigating at which point in the execution the problem
happens might help :)
Concerning your other tests ... cc is the same as gcc in general :)

Bye

Luca

To unsubscribe from this group, send email to resp-sim+u...@googlegroups.com.

O.ELMahi

unread,
Dec 19, 2010, 5:12:08 PM12/19/10
to resp-sim
Luca,

first thanks for your code then thanks for your help.

i traced the program as you suggested and find out that the error
related to the memory size.

it is stop exactly at line :

case BIP:{

unsigned int k = 0;

for(i = 0; i < numBands; i++){
rawImageBytes[i] = (unsigned short
*)malloc(sizeof(unsigned short)*numRows*numCols);
}


with memory size
32 it reads 53 band
64 it reads 106 band
128 it reads 212 band
512 it reads 223 band which is the exact size i use.

but what i did not got is that it did not give me a final results the
simulator courser just kept flashing ??
is this mean that there is other thing that is wrong or just the
architecture i built is so limited ??

thanks




On Dec 19, 9:47 am, Luca Fossati <fossat...@gmail.com> wrote:
> Well,
>
> considering that, anyway, it runs natively on your OS, the most likely
> possibility is that you are doing something wrong
> with the architecture and/or in passing the parameters. Investigating at
> which point in the execution the problem
> happens might help :)
> Concerning your other tests ... cc is the same as gcc in general :)
>
> Bye
>
> Luca
>
> > <resp-sim%2Bunsu...@googlegroups.com<resp-sim%252Buns...@googlegroups.com>

Giovanni Beltrame

unread,
Dec 19, 2010, 5:17:22 PM12/19/10
to resp...@googlegroups.com
On 12/19/10 17:12, O.ELMahi wrote:
> with memory size
> 32 it reads 53 band
> 64 it reads 106 band
> 128 it reads 212 band
> 512 it reads 223 band which is the exact size i use.

Olfat,

I assume that what you are saying is that your architecture didn't have
enough memory, and it appears to run with 512MB?

> but what i did not got is that it did not give me a final results the
> simulator courser just kept flashing ??

Have you waited for a while? The simulator is several orders of
magnitude slower than executing the code natively.

Cheers,
Giovanni

O.ELMahi

unread,
Dec 19, 2010, 5:52:39 PM12/19/10
to resp-sim
i am waiting now for 1 houre and the ">>>" curser appeared but no
results displayed so i was not sure that it is working correctly??

O.ELMahi

unread,
Dec 20, 2010, 12:44:20 PM12/20/10
to resp-sim
i am sorry but i have another Q.

the program running for about 90 minutes then it generates the same
previous error so i updated to 1024 memory size then it runes for a
110 minutes then regenerate the same error.

i tried to increase the memory more but it did not uploaded correctly.

my questions are:

is the memory limit for the simulator depend on the memory limit i
have in my laptop ? if not how i can know the max limit?

regarding the application i use is the problem only in the memory size
or should i check other things ( regarding that the 1024 memory should
be enough) ? if yes where should i start looking ?

thanks

Reply all
Reply to author
Forward
0 new messages