PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

error S0011 : Unrecognized command line switch: nvidia

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
ajsuff



Joined: 17 Dec 2009
Posts: 4

PostPosted: Fri Sep 02, 2011 11:20 am    Post subject: error S0011 : Unrecognized command line switch: nvidia Reply with quote

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

...
Back to top
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 436

PostPosted: Fri Sep 02, 2011 3:01 pm    Post subject: Reply with quote

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
Back to top
View user's profile
ajsuff



Joined: 17 Dec 2009
Posts: 4

PostPosted: Mon Sep 05, 2011 5:31 am    Post subject: error S0011 : It was due debugger option! Reply with quote

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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group