pgi

Cuda Fortran 4D array

元气小坏坏 提交于 2020-01-16 14:08:33
问题 My code is being slowed down by a my 4D arrays access in global memory. I am using PGI compiler 2010. The 4D array I am accessing is read only from the device and the size is known at run time. I wanted to allocate to the texture memory and found that my PGI version does not support texture. As the size is known only at run time, it is not possible to use constant memory too. Only One dimension is known at compile time like this MyFourD(100, x,y,z) where x,y,z are user input. My first idea is

openACC passing a list of struct

杀马特。学长 韩版系。学妹 提交于 2020-01-05 04:27:09
问题 I have a C program to find whether 2 sets of polygons are overlapped. User input 2 sets of polygon (each set of data has several thousands polygons) and the program see which polygon in set1 overlap with which polygon in set2 I have 2 struct like these: struct gpc_vertex /* Polygon vertex */ { double x; double y; }; struct gpc_vertex_list /* Polygon contour */ { int pid; // polygon id int num_vertices; double *mbr; // minimum bounding rectangle of the polygon, so always 4 elements }; I have

linking pgi compiled library with gcc linker

ε祈祈猫儿з 提交于 2020-01-03 05:50:06
问题 I would like to know how to link a pgc++ compiled code (blabla.a) with a main code compiled with c++ or g++ GNU compiler. For the moment linking with default gnu c++ linker gives errors like: undefined reference to `__pgio_initu' 回答1: As the previous person already pointed out, PGI supports G++ name mangling when using the pgc++ command. Judging from this output, I'm guessing that you're linking with g++ rather than pgc++. I've had the most success when using pgc++ as the linker so that it

Using OpenACC to parallelize nested loops

五迷三道 提交于 2019-12-30 03:36:08
问题 I am very new to openacc and have just high-level knowledge so any help and explanation of what I am doing wrong would be appreciated. I am trying to accelerate(parallelize) a not so straightforward nested loop that updates a flattened (3D to 1D) array using openacc directives. I have posted a simplified sample code below that when compiled using pgcc -acc -Minfo=accel test.c gives the following error: call to cuStreamSynchronize returned error 700: Illegal address during kernel execution

OpenACC must have routine information error

本秂侑毒 提交于 2019-12-25 09:25:10
问题 I am trying to parallelize a simple mandelbrot c program, yet I get this error that has to do with not including acc routine information. Also, I am not sure whether I should be copying data in and out of the parallel section. PS I am relatively new to parallel programming, so any advice with learning it would be appreciated. (Warning when compiled) PGC-S-0155-Procedures called in a compute region must have acc routine information: fwrite (mandelbrot.c: 88) PGC-S-0155-Accelerator region

OpenACC must have routine information error

本小妞迷上赌 提交于 2019-12-25 09:22:08
问题 I am trying to parallelize a simple mandelbrot c program, yet I get this error that has to do with not including acc routine information. Also, I am not sure whether I should be copying data in and out of the parallel section. PS I am relatively new to parallel programming, so any advice with learning it would be appreciated. (Warning when compiled) PGC-S-0155-Procedures called in a compute region must have acc routine information: fwrite (mandelbrot.c: 88) PGC-S-0155-Accelerator region

OpenACC parallel kernels not getting generated

亡梦爱人 提交于 2019-12-24 15:09:20
问题 I am developing a code on PGC++ for graphically accelerating the code. I am using OpenBabel which has Eigen dependancy. I have tried using #pragma acc kernel I have tried using #pragma acc routine My compilation command is: "pgc++ -acc -ta=tesla -Minfo=all -I/home/pranav/new_installed/include/openbabel-2.0/ -I/home/pranav/new_installed/include/eigen3/ -L/home/pranav/new_installed/lib/openbabel/ main.cpp /home/pranav/new_installed/lib/libopenbabel.so" I am getting following error PGCC-S-0155

Detect compiler with #ifdef

一个人想着一个人 提交于 2019-12-17 19:59:10
问题 I'm trying to build a small code that works across multiple platforms and compilers. I use assertions, most of which can be turned off, but when compiling with PGI's pgicpp using -mp for OpenMP support, it automatically uses the --no_exceptions option: everywhere in my code with a "throw" statement generates a fatal compiler error. ("support for exception handling is disabled") Is there a define d macro I can test to hide the throw statements on PGI? I usually work with gcc, which has GCC

How to allocate arrays of arrays in structure with CUDA Fortran?

谁说我不能喝 提交于 2019-12-12 22:21:05
问题 With CUDA, I'm trying to allocate arrays in a structure, but I'm having an issue and I don't know why. So here is a short code (stored in a file called struct.cuf ) that describe my problem. I'm compiling with the PGI 16.10 version , and I'm using the following options : -O3 -Mcuda=cc60 -tp=x64 struct.cuf -o struct_out module structure contains type mytype integer :: alpha,beta,gamma real,dimension(:),pointer :: a end type mytype type mytypeDevice integer :: alpha,beta,gamma real,dimension(:)

Results of OpenMP target directives on PGI

帅比萌擦擦* 提交于 2019-12-11 08:44:55
问题 I'm using PGI to compile the following program which uses OpenMP's target directives to offload work to a GPU: #include <iostream> #include <cmath> int main(){ const int SIZE = 400000; double *m; m = new double[SIZE]; #pragma omp target teams distribute parallel for for(int i=0;i<SIZE;i++) m[i] = std::sin((double)i); for(int i=0;i<SIZE;i++) std::cout<<m[i]<<"\n"; } My compilation string is as follows: pgc++ -omp -ta=tesla,pinned,cc60 -Minfo=accel -fast test2.cpp Compilation succeeds, but it