Questions tagged [pgi]

The Portland Group (PGI) produces compilers (Fortran, C & C++) for high-performance computers. They also provide Fortran compilers with GPU support (CUDA Fortran as well as an implementation of OpenACC).

See also PGI Documentation.

160 questions
3
votes
0 answers

Undefined symbol error in MEX when calling a routine from an PGCC-compiled OpenACC-accelerated shared library

I have a shared library libraberto.so compiled with PGCC. It contains OpenACC pragma directives and is compiled with the -acc flag to ensure these directives are enabled. The corresponding makefile rules are: libraberto.so: file1.o file2.o ... pgcc…
lodhb
  • 929
  • 2
  • 12
  • 29
2
votes
1 answer

Recommendation for nvfortran compiler useful flags

I use gfortran for years but quite new to nvfortran. I would like to ask if anyone can give me recommendation for nvfortran compiler useful flags for both debug and build modes? what I know for debug mode are: -C -g -Mbounds -traceback and for…
imronuke
  • 21
  • 2
2
votes
1 answer

I want to change the compiler of a makefile from pgi to gfortran and I was wondering how I should change the FC and FFLAGS to make it work

I have 5 makefiles which are designed for pgi compiler. However, my system is working with gfortran and I do not how to make them work with my system and how should I change FC and FFLAGS. I am new to Linux operating system and I am using Ubuntu…
user15385774
2
votes
1 answer

Calling Fortran OpenACC from CUDA file. How to compile with PGI?

I have a CUDA code in which I would like to include external code that consists of Fortran with OpenACC kernels. I have two files with the following content inspired on a discussion on the NVIDIA website. File main.cu is the following: #include…
Chiel
  • 6,006
  • 2
  • 32
  • 57
2
votes
1 answer

How to perform manual deep copy of 2D dynamic array of struct in C using OpenACC

I am trying to modify an existing particle method code using OpenACC to run on GPU. The existing code utilizes a 2D dynamic array of struct in c. I need to copy the structure(s) to GPU for further calculation. A code sample is given below: typedef…
Ali Imran
  • 27
  • 4
2
votes
1 answer

PGI compilation error in Fortran: "forward reference to function"

I am a little puzzled with the PGI Fortran compiler. When I try to compiler the following simple module stored in the file named test.f90, with pgfortran 19.10 I get errors that I do not understand. While compiling with gfortran or ifort run…
R. N
  • 707
  • 11
  • 31
2
votes
1 answer

How to transfer a part of a device array to another device array using PGI cuda fortran compiler?

Now I want to transfer a piece of a device array to another device array using following code: program main implicit none integer :: a(5,5,5,5) integer, device :: a_d(5,5,5,5),b_d(5,5,5,5) a=0 a_d=a b_d(1:2,:,:,:)=a_d(2:3,:,:,:) end…
S.C. Zheng
  • 51
  • 6
2
votes
1 answer

Portable random number generation with OpenACC

Is there a portable way to generate random numbers with OpenACC? I know that it is possible to directly use cuRand but then I am restricted to Nvidia GPUs. Another option seems to be generating numbers on the host and then moving them to the device,…
Fabian
  • 547
  • 1
  • 4
  • 17
2
votes
1 answer

OpenMP 4.5 runtime functions not supported in PGI

When I try and compile the following code #include #include #include int main (void) { int sum = 0; #pragma omp target teams distribute parallel for reduction(+:sum) defaultmap(tofrom:scalar) for(int i = 0 ; i <…
Z boson
  • 32,619
  • 11
  • 123
  • 226
2
votes
1 answer

pgfortran equivalent of -J switch in gfortran

When I compile code in gfortran I can use the -J/dir/ switch to set an output directory for .mod files. Now I'm switching to compile with the PGI pgfortran compiler but can't find the equivalent. What is the pgfortran equivalent of -J?
os1
  • 412
  • 1
  • 6
  • 18
2
votes
1 answer

Updating directives OpenACC

When I have a kernel on the top loop, Why I can't use these 2 directives: #pragma acc update device(hbias[0:n_hidden],W[0:n_hidden][0:n_visible]) #pragma acc update device(vbias[0:n_visible) I need to update these variables hbias, vbias, W in…
2
votes
1 answer

c - Linking a PGI OpenACC-enabled library with gcc

Briefly speaking, my question relies in between compiling/building files (using libraries) with two different compilers while exploiting OpenACC constructs in source files. I have a C source file that has an OpenACC construct. It has only a simple…
mgNobody
  • 738
  • 7
  • 23
2
votes
2 answers

Using OpenACC to parallelize nested loops

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)…
anupshrestha
  • 236
  • 5
  • 19
2
votes
1 answer

Name mangling in CUDA and C++

My C++ project main.cpp, compiled with pgcpp from PGI, calls a function cuda() containing CUDA code in a separate file cuda.cu, compiled with nvcc. Unless I wrap the cuda() function with extern "C" in the function declaration and the common header…
lodhb
  • 929
  • 2
  • 12
  • 29
2
votes
1 answer

Does IEEE floating-point arithmetic calculation time depend on value?

I am using IEEE strict floating point arithmetic in a CFD solver. My algorithm is explicit and deterministic (it will perform the exact same number of computations at each time step). Yet I am observing that during periods when solution…
Andreus
  • 2,437
  • 14
  • 22
1
2
3
10 11