-
Notifications
You must be signed in to change notification settings - Fork 3
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
gcc OpenACC runtime errors #4
Comments
This is obsolete. Please write e-mail to Wael Elwasif <elwasifwr@ornl.gov>
for the new instructions.
New instructions can be found here:
https://gcc.gnu.org/wiki/Offloading#How_to_try_offloading_enabled_GCC
…On Fri, Apr 7, 2017 at 6:29 AM, babouFomb ***@***.***> wrote:
Hi, I follow your script for build gcc-5 openacc implementation. All run
well, gcc was built successfully. I don't yet add my new gcc in my path.
When I type, gcc -v I get the following output:
***@***.***:~/Packages/GCCAUTO/install$ ./bin/gcc -v
Using built-in specs.
COLLECT_GCC=./bin/gcc
COLLECT_LTO_WRAPPER=/home/rokiatou/Packages/GCCAUTO/
install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.4.1/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-unknown-linux-gnu
Configured with: /home/rokiatou/Packages/GCCAUTO//src/gcc/configure
--prefix= --disable-bootstrap --enable-languages=c,c++,fortran,lto
--disable-multilib --enable-offload-targets=nvptx-none=/home/rokiatou/Packages/GCCAUTO//install
--with-cuda-driver-include=/usr/local/cuda/include CC='gcc -m64' CXX='g++
-m64' --with-gmp=/home/rokiatou/Packages/GCCAUTO/src/gmp/install
--with-mpfr=/home/rokiatou/Packages/GCCAUTO/src/mpfr/install
--with-mpc=/home/rokiatou/Packages/GCCAUTO/src/mpc/install --with-sysroot=
Thread model: posix
gcc version 5.4.1 20170404 (GCC)
I wanted to test the following OpenACC simple program:
` #include <stdio.h>
#define N 2000000000
#define vl 1024
int main(void) {
double pi = 0.0f;
long long i;
#pragma acc parallel vector_length(vl)
#pragma acc loop reduction(+:pi)
for (i=0; i<N; i++) {
double t= (double)((i+0.5)/N);
pi +=4.0/(1.0+t*t);
}
printf("pi=%11.10f\n",pi/N);
return 0;
}`
I compiled successfully my program with this flag:
***@***.***:~/Packages/GCCAUTO/test-openacc$ ../install/bin/gcc
test.c -fopenacc -foffload=nvptx-none -foffload="-O3" -O3 -lm -g -pg -o gpu
But when I run the object file, I get a Segmentation fault message. I
tried to debug with gbd, this is the gdb output:
***@***.***:/Packages/GCCAUTO/test-openacc$ gdb ./gpu
GNU gdb (Ubuntu 7.7.1-0ubuntu514.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.
html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./gpu...done.
(gdb) run
Starting program: /home/rokiatou/Packages/GCCAUTO/test-openacc/gpu
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78c7e4b in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
(gdb) bt
#0 0x00007ffff78c7e4b in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 <#1> 0x00007ffff78c63f6 in
GOACC_parallel () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 <#2> 0x0000000000400879 in main
() at test.c:12
(gdb) q
A debugging session is active.
Inferior 1 [process 31540] will be killed.
Quit anyway? (y or n) y
The program fails at line 12, where there is: #pragma acc parallel
vector_length(vl)
Thank. ANy help is welcome.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD8vA2xxBVZltN_gQCm1kJKK93dp8QF_ks5rtg_ygaJpZM4M2utS>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I follow your script for build gcc-5 openacc implementation. All run well, gcc was built successfully. I don't yet add my new gcc in my path. When I type, gcc -v I get the following output:
I wanted to test the following OpenACC simple program:
` #include <stdio.h>
I compiled successfully my program with this flag:
But when I run the object file, I get a Segmentation fault message. I tried to debug with gbd, this is the gdb output:
The program fails at line 12, where there is:
#pragma acc parallel vector_length(vl)
Thank. ANy help is welcome.
The text was updated successfully, but these errors were encountered: