每当我尝试使用accull编译器编译以下代码(用于编译openACC)时,我都会收到一条非常奇怪的错误消息。安装编译后运行的基本开箱即用代码并运行得很好,但每当我尝试从nvidia运行代码时
https://github.com/parallel-forall/cudacasts/tree/master/ep3-first-openacc-program
我收到以下错误。这可能与编译器的差异有关? Nvidia推荐PGI,但我目前使用acull因为它是免费的。
ubuntu@tegra-ubuntu:~/accull/example$ accull -v -o main.x laplace2d.c
****************************************
_ _ _ _
| | | | | | |
__ _ ___ ___| | | | | | |
/ _` |/ __/ __| | | | | | |
| (_| | (_| (__| |__| | |____| |____
\__,_|\___\___|\____/|______|______|
****************************************
Release 0.4alpha
* Verbose output
* Output executable name main.x
* Processing laplace2d.c to ./accull_rVpRz/laplace2d.c
* Building laplace2d.c
* Running StS translation
Parsing laplace2d.c .... laplace2d.c :
159:
160: StartTimer();
161: int iter = 0;
162:
163: #pragma acc data copy(A), create(Anew)
164:
165: while ( error > tol && iter < iter_max )
166: {
167: error = 0.0;
ParseError: File: laplace2d.c: 125: before: acc
Traceback (most recent call last):
File "/home/ubuntu/accull/yacf//bin/c2frangollo.py", line 114, in <module>
[ast_, prepro_class, lexer_class, parser_class,] = FrontendFactory().parse_with_language_list(original_source, filename, config.CURRENT_LANGUAGES,dirs)
File "/home/ubuntu/accull/yacf/Frontend/FrontendFactory.py", line 318, in parse_with_language_list
raise pe
Frontend.Acc.plyparser.ParseError: <stdin>:125: before: acc
! Compilation of laplace2d.c FAILED (no Project directory build )
/usr/local/cuda/bin/nvcc -Xcompiler -fopenmp -lrt -lcuda -lOpenCL -lrt -lcuda -arch=sm_20 pi.o _pi_random_1.o /home/ubuntu/accull/frangollo/src/libfrangollo.a -o main.x
* Finished
ubuntu@tegra-ubuntu:~/accull/example$