error S0011 : Unrecognized command line switch: nvidia

Hi,

I am trying to compile a first Fortran CUDA project under PGI Visual Accelerator 11.8. I created the project and edited the properties pages, but the compiler outputs the message

error S0011 : Unrecognized command line switch: nvidia

It is supposed to be due the switch -ta=nvidia concerning the accelerator target

Does anybody KNOW how to go solve this?

Thanks a lot!

Below is a small part from the build logfile and from output window in Visual Studio ( I have a permanent license, but I am testing vs. 11.8 under a trial key. I hope it doesnt matter ):

output window:


------ Build started: Project: PVFProject1, Configuration: Debug Win32 ------
Compiling Project …
Kernel_mod.cuf
NOTE: your trial license will expire in 12 days, 8.85 hours.
NOTE: your trial license will expire in 12 days, 8.85 hours.
: error S0011 : Unrecognized command line switch: nvidia
Cuda_teste_01_main.f90
NOTE: your trial license will expire in 12 days, 8.85 hours.
NOTE: your trial license will expire in 12 days, 8.85 hours.
: error S0011 : Unrecognized command line switch: nvidia
Kernel_mod.cuf
NOTE: your trial license will expire in 12 days, 8.85 hours.
NOTE: your trial license will expire in 12 days, 8.85 hours.
: error S0011 : Unrecognized command line switch: nvidia
PVFProject1 build failed.

Compiling Project …

Kernel_mod.cuf

===========
Build log:


c:\program files\pgi\win32\11.8\bin\pgfortran.exe -Hx,123,8 -Hx,123,0x40000 -Hx,0,0x40000000 -Mx,0,0x40000000 -Hx,0,0x20000000 -g -Bstatic -Mbackslash -Mcuda -Mfree -I"c:\program files\pgi\win32\11.8\include" -I"C:\Program Files\PGI\Microsoft Open Tools 10\include" -I"C:\Program Files\PGI\Microsoft Open Tools 10\PlatformSDK\include" -tp=px-32 -ta=nvidia,noflushz,wait,cuda4.0,cc11 -Minform=warn -module “Win32\Debug” -Minfo=accel,ftn -o “Win32\Debug\Kernel_mod.obj” -c “D:\Projetos\PVFProject1\PVFProject1\Kernel_mod.cuf”

Command exit code: 2

To program for Nvidia GPUs in PVF, you need to right click on the
project, and set

properties | Fortran | Target Accelerators | Target Nvidia Accelerator → Yes

and for For CUDA fortran

properties | Fortran | Language | Enable CUDA Fortran → Yes

And that is all you need to do for GPU programming from Fortran.

dave

Hi Dave

thank You very much for You reply and Help!
I checked the properties | Fortran | Language | Enable CUDA Fortran and It was set to “Yes”, together with properties | Fortran | Target Accelerators | Target Nvidia Accelerator → Yes.

Meanwhile, I read the user guides and changed the configuration to “ralease”, and the compiler was able to do its job. It seems I cant even compile for the debbuger plataform ( I knew already I couldn’t debbug the device routines, but I didn’t know I could not even compile the project under this option).

Now I’m getting some Linker errors like:

Error 3 unresolved external symbol _cudaSetupArgument@12 referenced in function _MMUL_MOD_MMUL_KERNEL@24 Kernel_mod.obj


But I suppose Visual Studio is just missing some include and lib paths. I think I can handle it.

Thanks again!

Alexandre