PGI Compilers&Tools @pgicompilers Fortran, C and C++ compilers and tools for high-performance parallel scientific and technical computing on 64-bit x86, OpenPOWER and GPU systems. PGI includes high-performance parallel Fortran, C and C++ compilers and tools for x86-64 and OpenPOWER CPU processor-based systems and NVIDIA Tesla GPU Accelerators running Linux, Microsoft Windows or Apple macOS operating systems.
Active2 years, 10 months ago
I'm currently attempting to accelerate a spectral element fluids solver by porting most of the routines to a GPGPU using OpenACC with the PGI (15.10) compiler. The source code is written in OO-Fortran. This software has 'layers' of subroutines that call other functions and subroutines. To bring the code over to a GPU using openacc, I've been first attempting to place '$acc routine' directives in each routine that needs to be ported. During compilation, using 'pgf90 -acc -Minfo=accel', I receive the following error :
The PGI compilers and tools are supported on both 32-bit and 64-bit variants of the Linux, Apple OS X, and Windows operating systems on a variety of x86-compatible processors. CUDA Fortran includes a Fortran 2003 compiler and tool chain for programming NVIDIA;. Cracker: Team Lz. PGI Visual Fortran 2010 v10.8. State-of-the-art compiler. Crystal.Impact.Diamond.v3.2e2.Cracked; PGI Visual Fortran 7.0.6. Engineering workstation compiler bundle. PGI Fortran Workstation, The Portland Group's native. Free Fortran Compilers. Fortran is one of the earliest imperative computer programming languages around.
nvvmCompileProgram error: 9.
Error: /tmp/pgacc2lMnIf9lMqx8.gpu (146, 24): parse invalid forward reference to function 'innerroutine_' with wrong type!
PGF90-S-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (Test.f90: 1)
This same problem can be reproduced with the following simple fortran program :
Again, compiling the above program with 'pgf90 -acc -Minfo=accel' yields the problem.
Does openacc support acc-enabled routines calling other acc-enabled routines ?
If so, what am I doing wrong ?
Joe SchoonoverJoe Schoonover
1 Answer
You're using the OpenACC 'routine' directive correctly. The problem here is that we (PGI) don't yet support using 'routine' with array-valued functions. The problem being that this support requires the compiler to create a temp array to hold the return value. Meaning that every thread would need to allocate this temp array causing a severe performance penalty. Worse is how to handle sharing the temp array if is a gang or worker level routine.
Pgi Compiler Download
We do have open requests for this feature, but it may be awhile before we can address it. In the meantime, can you try inlining the routine? i.e. compile with '-Minline'.
Mat ColgroveMat Colgrove
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged fortrangpgpuopenaccpgipgi-accelerator or ask your own question.
Hello,This is a terminology question which hopefully can be answered with brief comments.
Is there a difference between Scripting Language and Programming Language and if so, what distinguishes the two?
I'm not a programmer but I do use AutoHotkey (AHK) for some simple macros. I've always seen AHK described as a Scripting Language. Would it therefore be incorrect to refer to it as a Programming Language?
I also have a limited understanding of how to use Excel formulas (not VBA) but would that (Excel formulas) be considered either of the above languages or something different altogether?
And regarding the word 'code', I assume all of the above would have that designation, right?