Hi Riaz,

Can you pass those text files as argument and try below command:

./build/X86/gem5.opt configs/example/se.py -c
tests/test-progs/hello/bin/x86/linux/Method1_X86_BINARY_  -o
"text_file_1.txt text_file_2.txt"

With regards
Sumit Kumar Mandal
PhD Student
Electrical Engineering
Arizona State University
Tempe, AZ 85281
USA


On Thu, Jun 6, 2019 at 7:33 PM Riaz-Ul-Haque Mian <
mian.riaz-ul-haque....@is.naist.jp> wrote:

> I have a C code that takes value form two input file calculate
> multiplication and write the time into another text file. First I compile
> and make executable with GCC and the name is Method1_X86_BINARY_
>
> > gcc DecMulTimeMeasure.c decContext.c decDouble.c decQuad.c -o
> Method1_X86_BINARY_
>
> The executable is working ./Method1_X86_BINARY_ file!
> Now I want to compile using gem5 SE mode by bellow command
>
>  ./build/X86/gem5.opt configs/example/se.py -c
> tests/test-progs/hello/bin/x86/linux/Method1_X86_BINARY_
>
> After that I receive following error
>
> > GEM5 SIMULATION START problem reading inputA.txt file Exiting @ tick
> 9053500 because exiting with last active thread context
> Simulated exit code not 0! Exit code is 1
>
> The Message ***GEM5 SIMULATION START*** and ***problem reading inputA.txt
> file*** shows form my C code where bellow :
>
>  FILE *ptr_file_read, *ptr_file_readB,*ptr_file_write , *Mptr_file_write;
>  char fileNameA [40] = "final_result_a.txt";
>  char fileNameB [40] = "final_result_b.txt";
>
>  printf("GEM5 SIMULATION START");
>
>  ptr_file_read = fopen(fileNameA, "r"); //Name of the input file
>
>  if (!ptr_file_read)
>  {
>  printf("problem reading inputA.txt file");
>  return 1;
>  }
>
> So the message ***GEM5 SIMULATION START*** indicate that the executable is
> okay where as the message ***problem reading inputA.txt file*** indicates
> the problem is during reading form text file.
>
> My question is how I can run the file in GEM-5 simulator.
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to