Visual Studio 2012 Update 2

After installing ‘Update 2’ for Visual Studio 2012 found here:
http://www.microsoft.com/en-us/download/details.aspx?id=38188

PGI fails to compile OpenACC kernels with the following error:
error F0000 : Internal compiler error. Device compiler exited with error status code 0

This same code was working before the update.

This is on Windows 7 64-bit with PGI Visual Fortran 13.3. I tried reinstalling PGI 13.3 to no avail. This seems like it could be a path issue, but I’m not sure.

Any idea of how to fix this?

Thanks for your time,
~David

Hi David,

We’re looking into this but have a few questions.

  1. Did you uninstall / reinstall as admin?
  2. Are you using VS Shell or VS Premium/Professional?
  3. Is there any text above the error indicating why the device compiler failed?

Thanks,
Mat

  1. Yes, I uninstalled and reinstalled as Admin.

  2. I am using VS 2012 Professional

  3. The compiler fails on all of my kernels. There is no text indicating a reason why the device compiler failed.

Here is an example (truncated) output for one of the kernels:

277, Generating present_or_copyout(zrupd(:ncol,:,klev+1))
Generating present_or_copyout(zrup(:ncol,:,klev+1))
Generating present_or_copyout(zrefd(:ncol,:,klev+1))
Generating present_or_copyout(zref(:ncol,:,klev+1))
Generating present_or_copyout(ztrad(:ncol,:,klev+1))
Generating present_or_copyin(palbd(:ncol,:))
Generating present_or_copyout(zrefc(:ncol,:,klev+1))
Generating present_or_copyin(palbp(:ncol,:))
Generating present_or_copyin(ztaur(:ncol,:,:))
Generating present_or_copyin(ztaug(:ncol,:,:))
Generating present_or_copyin(pcldfmc(:ncol,:,:112))
Generating present_or_copyout(lrtchkcld(:ncol,:,:klev))
Generating present_or_copyout(lrtchkclr(:ncol,:,:klev))
278, Loop is parallelizable
295, Loop is parallelizable
Accelerator kernel generated
278, !$acc loop gang, vector(128) ! blockidx%x threadidx%x
295, !$acc loop gang ! blockidx%y
362, Loop is parallelizable
C:\rrtmgs\rrtmg\rrtmg_sw_spcvmc.f90(1041) : error F0000 : Internal compiler error. Device compiler exited with error status code 0
PGF90/x86-64 Windows 13.3-0: compilation aborted

I tried compiling using an older installed Visual Studio 2010 and still have the same problem. I’m completely stuck.

One of our engineers has recreated the issue. She’ll try and get you a work around as soon as possible.

  • Mat

David, here’s what I got back from engineering:

Hi Mat,

It looks like we have an Update 2 incompatibility in a redistributable
library. I have opened TPR 19273 for this problem. David may be able to
workaround the issue by doing the following:

First, rename the files to be replaced to avoid copying over them:

C:\Program Files\PGI\Microsoft Open Tools 11\bin\msvcr110.dll
C:\Program Files\PGI\Microsoft Open Tools 11\bin\amd64\msvcr110.dll

Next, copy msvcr110.dll from the post-update-2 VC redist directories to
the PGI directory. Copy

from: C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\redist\x86\Microsoft.VC110.CRT
to: C:\Program Files\PGI\Microsoft Open Tools 11\bin

and

from: C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\redist\x64\Microsoft.VC110.CRT
to: C:\Program Files\PGI\Microsoft Open Tools 11\bin\amd64

This change resolves the issue for me using a simple OpenACC test case.
Please have David let us know if this resolves the issue for his code as
well.

Please let us know if this works for you.

Thanks,
Mat

Good detective work. That fixed the issue for me. Apparently update 2 made some minor changes to the Microsoft C runtime.

Glad I could be on the bleeding edge and test this out for you :p

Thanks.
~David

David,

This was filed as TPR 19273, and we have corrected the issue in our current 13.5 release, by removing the file mscvrt110.dll from the Windows installation packages

regards,
dave