PGC-F-0206 error: PGI17.4 Compilation Aborted

Hello,
When I use PGI17.4 Community Edition to compile a demo program of Jacobi relaxation Calculation, the Command window shows an error as below:
PGC-F-0206-Can’t find include file corecrt.h (C:\PROGRA~1\PGICE/win64/17.4/include/MS_math14.h: 11)
PGC/x86-64 Windows 17.4-0: compilation aborted
Running in Win10,Nvidia Cuda 8.0,VS2015 Community with Windows SDK.
Actually, the math.h has been included in the program. May I have your advises on this error?Please ignore the OMP lines which are for gcc compilation.

Thanks & Regards,
Sean Sun

The demo program is below.

//#include <omp.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include “timer.h”

#define NN 4096
#define NM 4096

double A[NN][NM];
double Anew[NN][NM];

int main(int argc, char** argv)
{
const int n = NN;
const int m = NM;
const int iter_max = 1000;

const double tol = 1.0e-6;
double error = 1.0;

// omp_set_num_threads(12);
memset(A, 0, n * m * sizeof(double));
memset(Anew, 0, n * m * sizeof(double));
StartTimer();
printf(“Jacobi relaxation Calculation: %d x %d mesh\n”, n, m);
//#pragma omp parallel for
for (int j = 0; j < n; j++)
{
A[j][0] = 1.0;
Anew[j][0] = 1.0;
}

int iter = 0;

#pragma acc data copy(A), create(Anew)
while (error > tol && iter < iter_max)
{
error = 0.0;

#pragma omp parallel for shared(m, n, Anew, A)
#pragma acc kernels
//#pragma acc parallel loop
for (int j = 1; j < n - 1; j++)
{
for (int i = 1; i < m - 1; i++)
{
Anew[j] = 0.25 * (A[j][i + 1] + A[j]+ A[j - 1] + A[j + 1]);
error = fmax(error, fabs(Anew[j] - A[j]));
}
}

#pragma omp parallel for shared(m, n, Anew, A)
#pragma acc kernels
//#pragma acc parallel loop
//#pragma omp parallel for
for (int j = 1; j < n - 1; j++)
{
for (int i = 1; i < m - 1; i++)
{
A[j] = Anew[j];
}
}

if (iter % 100 == 0) printf(“%5d, %0.6f\n”, iter, error);

iter++;
}

double runtime = GetTimer();

printf(" total: %f s\n", runtime / 1000);
}

Hi Sean,

It looks like you’re missing the Microsoft header files.

When you installed PGI, did you first install the Windows 10 SDK and Visual Studio per the configuration guide (Windows Co-install Requirements | PGI)?

-Mat

Thank you for your quick reply.

After reinstall everything step by step according to the guide,it does work!

I suppose I have different version of Win SDK from yours.
Btw, where to find a full ERROR code List on PGI compilation?

Hello,

Another question as the title, I run a compilation for cpp program. The command window shows that C++ compilation is not supported.
However, I found the feature compare list as: http://www.pgroup.com/products/feature-compare.html that 17.4 community edition supports the C++ compilation.
I’m not sure what’s true.

Rgds
Sean

pgcpp was dropped as a windows product in 2016.
Our Linux and OS X product, pgc++ is compatible with g++, and never
was built for Windows.

PGI recommends Visual C++ for C++ codes on Windows.
How then can you use OpenACC from C++ on Windows?
You write your openACC sections of C++ code as C code,
compile with pgcc into objects and libraries, and introduce
the libraries in the link stage of your VC++ application.

That is a limitation, we know. But we do have users who want access
to GPUs, and are successfully using it.

dave