PGI Community Edition 17.10 Can't compile anything Windows

I have installed pgi community edition and i cannot get anything to compile. For example if i run:
pgcc -Minfo -o main.exe FFT_OpenACC.c

I get:
PGC-F-0206-Can’t find include file stdio.h (C:\PROGRA~1\PGICE/win64/17.10/include/stdio.h: 21)
PGC/x86-64 Windows 17.10-0: compilation aborted

I have checked the directory and stdio.h is indeed there. I’ve compiled the same code on a separate machine running Linux. But I really need it to work with WIndows.

pgcc -V gives:

pgcc 17.10-0 64-bit target on x86-64 Windows -tp haswell
PGI Compilers and Tools
Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.

Thank you

Hi ShadyBoukhary,

You’re most likely missed installing the Visual Studio Community Edition which is a co-requirement for installing on Windows.

See: Windows Co-install Requirements | PGI

-Mat

Hi ,

I am facing the same problem and i have already install Visual Studio 2015. I have added the bin of VS to PATH and the stdio.h is already located in this path; C:\Program Files\PGICE\win64\17.10\include\wrap.
Should I check for other missing files regarding this library ?

Thanks in advance,
Christos

Hi Christos,

Did you also install the Windows 10 SDK? Both the SDK and VS Community Edition are needed. (sorry I was more clear in my early post).

The error above occur when the PGI stdio.h is trying to include the system stdio.h header file but can’t find it. Since the system header is part of the SDK package, the error usually indicates that the SDK wasn’t installed.

Another possibility is that the SDK was installed after the PGI installation. In this case, you’ll need to reinstall PGI so the correct registry entries can be made to the location of the SDK installation.

-Mat

Hi Mat,

Thanks for the quick response.
I had installed the SDK and VS2015 with the Visual C++ package before the installation of the PGI compiler.

The installation of PGI makes a check whether you have already install the SDK and VS15 and quits the install procedure if the above have not been installed.

I have to tell you though that The Visual Studio and the PGI compiler have been installed to different hard drives. The first in F and the second in the system Hard Drive called C… The SDK is installed in C,too. Do you believe this could cause the malfunction?

-Christos

P.S I forgot to mention that I installed Windows SDK first and then the VS15 . It could cause the malfunction of PGI maybe, too. After 6 hours in total searching for a solution I decided to try PGI with Linux OS… I am not familiar with this operating system but its a great opportunity to explore this new world. Thanks for your time and your assistance and i hope this thread save some time for the others who want to start exploring the world of parallel programming !

Hi Christos,

I have to tell you though that The Visual Studio and the PGI compiler have been installed to different hard drives. The first in F and the second in the system Hard Drive called C… The SDK is installed in C,too. Do you believe this could cause the malfunction?

Possibly. During installation, the PGI installer looks in the Windows registry for the location where the SDK and VS are installed. It then creates a configuration file (localrc) in the PGI “bin” directory. I’m wondering if it thinks that VS is installed on the C drive?

Can you please post the contents of the localrc file? (C:\Program Files\PGICE\win64\17.10\bin\localrc)

I decided to try PGI with Linux OS… I am not familiar with this operating system but its a great opportunity to explore this new world.

Great!

-Mat

Hi, Mat

Unfortunately, i had the PGI removed from windows before i saw your reply. It would be great if i could post here my localrc in order to help others…

Big thanks for quick replies and for your time !

-Christos

Hi Mat,

I am seeing the same problem that Christos is seeing. I installed PGI on a Windows 10 machine after first installing Visual Studio 2015 with C++ and the Windows 10 SDK. Everything is on the same drive.

I can call pgfortran -V and get the version information for the compiler. But even a simple call to pgfortran causes PGI CE Cmd to hang indefinitely. For example, I tried to compile the simple file mentioned in the documentation. hello.f:

print *, “hello”
end

The compile statement pgfortran hello.f simply hangs indefinitely.


Here are the contents of my localrc file:

set PSDK=“C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC”;
set WSDK=“C:/Program Files (x86)/Windows Kits/10”;
set MSC_VER=1700;
set WSDK_VERSION=10.0.15063.0;
set PGI_OT_VER=__PGI_TOOLS14;
set PGICUDAINC_OT=$PGICUDAROOT/include_acc/OT_14;
set OEM_INFO=64-bit target on x86-64 Windows $INFOTPVAL;
set COMPBASE64=“C:/Program Files/PGICE”;
set PROGRAMFILES32=“C:/Program Files (x86)”;


I am attempting to use this code on a machine with a GeForce GT 630. I appreciate the help in solving this issue.

Christos,

Just so there is no confusion, I assume you installed the pgfortran
community edition 17.10, by first installing
Visual Studio 2015 Community Edition, with C++, and not
Visual Studio 2015 ‘Express edition’ or ‘Professional Edition’.
You also installed the Win10 SDK.

The result should be that pgfortran and pgcc command line
compilers will work.

Do you have any other Visual Studio products installed?

dave

While I am not Christos, I can say that I installed pgfortran just as you specified. I have no other Visual Studio products installed, only versions of the Microsoft Visual C++ Redistributable. I assume this should not be a problem.

Just to be sure, open the PGI bash window and type

pgfortran -dryrun hello.f

and look and report the output.

Then look at

pgfortran ./hello.f -o ./hello.exe -v
and send the output dialog.

Make sure the directory you are in has read and write permissions
to create those files.

Always remember to install by right-clicking on the
package and “run as administrator” . Say no to any licensing so that
a community license is installed. If you edit the license manually, edit
C:\Program Files\PGICE\license.dat in place, with the editor
“run as administrator”.

Make sure you are not running the license service
Control Panel->Admin Tools->Services->PGI → and stop the service.
Because the community edition license does not use the service.

dave

you should ensure that your computer is the last update,and the vs 2015 should be installed in the default path.and pgi community need sdk 10