Skip to content

Error occurring when make gpgpu-sim (CUDA 11.2) #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ajavadinezhad opened this issue Apr 17, 2021 · 9 comments
Open

Error occurring when make gpgpu-sim (CUDA 11.2) #221

ajavadinezhad opened this issue Apr 17, 2021 · 9 comments

Comments

@ajavadinezhad
Copy link

Hello,

I've installed all dependencies which specified in the repo readme. Although I was able to compile a sample program written in CUDA. But when I run the make command, I get the following error and I've no idea how to fix it.

The environment on which I ran gpgpu-sim:
Ubuntu 20.10
CUDA 11.2
Let me know, if you need more information

In file included from ../../libcuda/../src/cuda-sim/cuda-sim.h:37, from ../../libcuda/gpgpu_context.h:3, from ptx_parser.cc:30: ../../libcuda/../src/cuda-sim/../gpgpu-sim/shader.h: In constructor ‘scheduler_unit::scheduler_unit(shader_core_stats*, shader_core_ctx*, Scoreboard*, simt_stack**, std::vector<shd_warp_t*>*, register_set*, register_set*, register_set*, register_set*, register_set*, std::vector<register_set*>&, register_set*, int)’: ../../libcuda/../src/cuda-sim/../gpgpu-sim/shader.h:429:32: warning: ‘scheduler_unit::m_spec_cores_out’ will be initialized after [-Wreorder] 429 | std::vector<register_set *> &m_spec_cores_out; | ^~~~~~~~~~~~~~~~ ../../libcuda/../src/cuda-sim/../gpgpu-sim/shader.h:428:17: warning: ‘register_set* scheduler_unit::m_mem_out’ [-Wreorder] 428 | register_set *m_mem_out; | ^~~~~~~~~ ../../libcuda/../src/cuda-sim/../gpgpu-sim/shader.h:329:3: warning: when initialized here [-Wreorder] 329 | scheduler_unit(shader_core_stats *stats, shader_core_ctx *shader, | ^~~~~~~~~~~~~~ /home/ahmad/Documents/gpgpu-sim_distribution-4.0.1/build/gcc-/cuda-11020/release/cuda-sim/ptx_parser_decode.def: In member function ‘symbol_table* gpgpu_context::init_parser(const char*)’: /home/ahmad/Documents/gpgpu-sim_distribution-4.0.1/build/gcc-/cuda-11020/release/cuda-sim/ptx_parser_decode.def:2:11: error: unable to find string literal operator ‘operator""end’ with ‘const char [30]’, ‘long unsigned int’ arguments 2 | DEF(YYEOF,"YYEOF /* "end of file" */") | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ptx_parser.cc:115:43: note: in definition of macro ‘DEF’ 115 | #define DEF(X, Y) g_ptx_token_decode[X] = Y; | ^ /home/ahmad/Documents/gpgpu-sim_distribution-4.0.1/build/gcc-/cuda-11020/release/cuda-sim/ptx_parser_decode.def:4:13: error: unable to find string literal operator ‘operator""invalid’ with ‘const char [28]’, ‘long unsigned int’ arguments 4 | DEF(YYUNDEF,"YYUNDEF /* "invalid token" */") | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ptx_parser.cc:115:43: note: in definition of macro ‘DEF’ 115 | #define DEF(X, Y) g_ptx_token_decode[X] = Y; | ^ make[1]: *** [Makefile:116: /home/ahmad/Documents/gpgpu-sim_distribution-4.0.1/build/gcc-/cuda-11020/release/cuda-sim/ptx_parser.o] Error 1 make[1]: Leaving directory '/home/ahmad/Documents/gpgpu-sim_distribution-4.0.1/src/cuda-sim' make: *** [Makefile:208: cuda-sim] Error 2

@AjinkyaBankar
Copy link

Hi,
I am using Ubuntu 18.04, CUDA 11.0, and the GPGPU-Sim works perfectly for me.

@ajavadinezhad
Copy link
Author

Hi,
I am using Ubuntu 18.04, CUDA 11.0, and the GPGPU-Sim works perfectly for me.

May it be due to the new version of CUDA either Ubuntu?

@PsFreedom
Copy link

PsFreedom commented Apr 20, 2021

Don't use Ubuntu 20, it has some problems as I have replied here #211 (comment)

I use 18.04 LTS with CUDA 11.3 (which is out few days ago), it works fine so far.

@ajavadinezhad
Copy link
Author

Don't use Ubuntu 20, it has some problems as I have replied here #211 (comment)

I use 18.04 LTS with CUDA 11.3 (which is out few days ago), it works fine so far.

That's right, I downgraded my Ubuntu to version 18.04 and the problem was resolved.

@abhishekk06
Copy link

abhishekk06 commented Sep 28, 2021

Hi,

I am hitting the same error. Can someone please help?

I am using ubuntu 18.04 and cuda 9.1

image

@ajavadinezhad
Copy link
Author

@abhishekk06
I'm not sure what's the reason for occurring error. but one thing that may be related to your issue is the MinGW version. make sure you are using MinGW below v9.

@abhishekk06
Copy link

Hi,

In order to get past the issue. I actually go ahead and modified the line as follows. By any chance can anyone how to fix it fully? These files are auto-generated one so after every make clean, I have to repeat the same step again :(

Before:
DEF(YYEOF,"YYEOF /* "end of file" */")
.
.
DEF(YYUNDEF,"YYUNDEF /* "invalid token" */")

After:
DEF(YYEOF,"YYEOF /* end of file */")
.
.
DEF(YYUNDEF,"YYUNDEF /* invalid token */")

@ajavadinezhad ajavadinezhad reopened this Sep 29, 2021
@wu-kan
Copy link

wu-kan commented Dec 27, 2021

Hi,

In order to get past the issue. I actually go ahead and modified the line as follows. By any chance can anyone how to fix it fully? These files are auto-generated one so after every make clean, I have to repeat the same step again :(

Before: DEF(YYEOF,"YYEOF /* "end of file" /") . . DEF(YYUNDEF,"YYUNDEF / "invalid token" */")

After: DEF(YYEOF,"YYEOF /* end of file /") . . DEF(YYUNDEF,"YYUNDEF / invalid token */")

src/cuda-sim/Makefile

berfore:

$(OUTPUT_DIR)/ptx_parser_decode.def: $(OUTPUT_DIR)/ptx.tab.c
ifeq ($(shell uname),Linux)
	cat $(OUTPUT_DIR)/ptx.tab.h | grep "=" | sed 's/^[ ]\+//' | sed 's/[=,]//g' | sed 's/\([_A-Z1-9]\+\)[ ]\+\([0-9]\+\)/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' > $(OUTPUT_DIR)/ptx_parser_decode.def
else
	cat $(OUTPUT_DIR)/ptx.tab.h | grep "=" | sed -E 's/^ +//' | sed 's/[=,]//g' | sed -E 's/([_A-Z1-9]+).*/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' > $(OUTPUT_DIR)/ptx_parser_decode.def
endif

after:

$(OUTPUT_DIR)/ptx_parser_decode.def: $(OUTPUT_DIR)/ptx.tab.c
ifeq ($(shell uname),Linux)
	cat $(OUTPUT_DIR)/ptx.tab.h | grep "=" | sed 's/^[ ]\+//' | sed 's/[=,]//g' | sed 's/\([_A-Z1-9]\+\)[ ]\+\([0-9]\+\)/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' | sed 's/"end of file"/end of file/' | sed 's/"invalid token"/invalid token/' > $(OUTPUT_DIR)/ptx_parser_decode.def
else
	cat $(OUTPUT_DIR)/ptx.tab.h | grep "=" | sed -E 's/^ +//' | sed 's/[=,]//g' | sed -E 's/([_A-Z1-9]+).*/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' | sed 's/"end of file"/end of file/' | sed 's/"invalid token"/invalid token/' > $(OUTPUT_DIR)/ptx_parser_decode.def
endif

@tschwinge
Copy link

Right, this is not a new-CUDA issue, but a new-Bison issue. See accel-sim#42 "Fixed regex for files generated by newer bison versions which break build from source".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants