Simulation failed with error GPGPU-Sim PTX: ERROR ** while loading PTX (a) -1

783 views
Skip to first unread message

li...@umich.edu

unread,
May 25, 2015, 9:41:41 PM5/25/15
to gem5-g...@googlegroups.com
Hi,

I am running the latest gem5-gpu on Ubuntu 14.04 64bit in a virtual machine. I have an error in the file gpgpu-sim/cuda-sim/ptx_loader.cc:

GPGPU-Sim PTX: ... done pre-decoding instructions for '_Z24bpnn_adjust_weights_cudaPfiS_iS_S_'.
GPGPU-Sim PTX: finished parsing EMBEDDED .ptx file _1.ptx
GPGPU-Sim PTX: extracting embedded .ptx to temporary file "_ptx_fiXfu1"
Running: cat _ptx_fiXfu1 | sed 's/.version 1.5/.version 1.4/' | sed 's/, texmode_independent//' | sed 's/\(\.extern \.const\[1\] .b8 \w\+\)\[\]/\1\[1\]/' | sed 's/const\[.\]/const\[0\]/g' > _ptx2_sW1lQq
GPGPU-Sim PTX: ERROR ** while loading PTX (a) -1
               Ensure you have write access to simulation directory
               and have 'cat' and 'sed' in your path.

I saw such error in the group before but I could not find any solution to my problem. I tried system("which cat"); in the file which shown in the error and it returned "-1". I think it's a problem with system call. Could anyone help me with that?

Regards,
Sihang

Jason Power

unread,
May 26, 2015, 9:57:24 AM5/26/15
to li...@umich.edu, gem5-g...@googlegroups.com
Hi Sihang,

As far as I can tell, this is a problem with your host system configuration. Either you are running on a cluster machine that doesn't have a full linux environment, or your terminal doesn't support fork, or you don't have write permission to the correct directory, or something else. Without know exactly what your host system is it's hard to help.

Jason

li...@umich.edu

unread,
May 26, 2015, 1:32:55 PM5/26/15
to gem5-g...@googlegroups.com, li...@umich.edu
Hi Jason,

Thank you! We could run it on the host machine. 

Regards,
Sihang

Xuhao Chen

unread,
Jun 28, 2015, 10:37:47 AM6/28/15
to gem5-g...@googlegroups.com
I've got the same error when running the latest gem5-gpu on Ubuntu 14.04 64-bit in a virtual machine.
The thing is, when I run it like this:

build/X86_VI_hammer_GPU/gem5.opt ../gem5-gpu/configs/se_fusion.py --total-mem-size=512MB -c ../benchmarks/rodinia/backprop/gem5_fusion_backprop -o 16

it works, however, when I increase the memory size to 1024MB, like this:

build/X86_VI_hammer_GPU/gem5.opt ../gem5-gpu/configs/se_fusion.py --total-mem-size=1024MB -c ../benchmarks/rodinia/backprop/gem5_fusion_backprop -o 16

I got the error:

Running: cat _ptx_4B46NS | sed 's/.version 1.5/.version 1.4/' | sed 's/, texmode_independent//' | sed 's/\(\.extern \.const\[1\] .b8 \w\+\)\[\]/\1\[1\]/' | sed 's/const\[.\]/const\[0\]/g' > _ptx2_D2nkxE
GPGPU-Sim PTX: ERROR ** while loading PTX (a) -1
               Ensure you have write access to simulation directory
               and have 'cat' and 'sed' in your path.

so it looks like a bug instead of just a system config problem. What do you think?

Joel Hestness

unread,
Jul 8, 2015, 1:13:10 PM7/8/15
to Xuhao Chen, gem5-gpu developers
Hi Xuhao,
  Apologies for the delayed reply. I've only recently run into any of the PTX loading/parsing errors, and I now realize that they are very cryptic. GPGPU-Sim doesn't provide very helpful errors when these problems crop up.

  It would be pretty surprising if the problem you cite is a bug in gem5-gpu. The only thing I can imagine is that somehow the PTX code alignment in the simulated system's memory is tweaked by changing the simulator's memory size parameter. Then again, SE mode doesn't generate minor page faults, so I'd expect reading the PTX from the simulated system's memory should be the same.

  To get a better understanding of what might be going on, I'd recommend that you check out the temporary files that the simulator generates when loading the PTX:

Running: cat _ptx_4B46NS | sed 's/.version 1.5/.version 1.4/' | sed 's/, texmode_independent//' | sed 's/\(\.extern \.const\[1\] .b8 \w\+\)\[\]/\1\[1\]/' | sed 's/const\[.\]/const\[0\]/g' > _ptx2_D2nkxE
GPGPU-Sim PTX: ERROR ** while loading PTX (a) -1
               Ensure you have write access to simulation directory
               and have 'cat' and 'sed' in your path.

Here, the temporary file _ptx_4B46NS might be truncated or otherwise contain PTX code that gem5-gpu/GPGPU-Sim cannot parse. If the file is truncated, it's likely that the gem5-gpu PTX loader may be buggy with your simulator/system/libraries. We'd need to look into why the temporary file is not being loaded correctly. If the file appears to be correct, maybe try running the piped commands in that line (sed) and see if those are producing errors (pretty unlikely).

  Keep us posted on what you find. Thanks!
  Joel

--
  Joel Hestness
  PhD Candidate, Computer Architecture
  Dept. of Computer Science, University of Wisconsin - Madison
  http://pages.cs.wisc.edu/~hestness/
Reply all
Reply to author
Forward
0 new messages