PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

PGI Visual Fortran: Project from existing code
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Anya



Joined: 14 Dec 2007
Posts: 4

PostPosted: Wed Jan 14, 2009 12:42 pm    Post subject: PGI Visual Fortran: Project from existing code Reply with quote

I have just installed PGI Visual Fortran. I would not like to create a project from existing code with a makefile (File -> New -> Project From Existing Code?). I try that and get an error message:

Class not registered. Looking for object with CLSID: {...}

Any assistance would be appreciated. Thanks!
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6138
Location: The Portland Group Inc.

PostPosted: Wed Jan 14, 2009 1:18 pm    Post subject: Reply with quote

Hi Anya,

Unfortunately this Visual Studio option does not yet support PVF projects. However, you can create a project using existing source code.

Start with a new empty PVF project (File->New->Project | PGI Visual Fortran->x64 | Empty Project), and then in the solution explorer, right-click on a PVF project. Select "Add > Existing Item" then select one (or more) source files to add to the project.

Hope this helps,
Mat
Back to top
View user's profile
Anya



Joined: 14 Dec 2007
Posts: 4

PostPosted: Wed Jan 14, 2009 3:50 pm    Post subject: compiles in command line, but not in Visual Studio Reply with quote

Hi Mat,

Thank you very much for the reply. This is not what I was hoping for, but yes, it helps. Now, is there any procedure to ask the PGI Visual Fortran to use the user-specified makefile? I have been able to compile my program with pgf90 in Cygwin with a makefile (using the -Mnomain option), but the program wouldn't compile in the Visual Studio. It outputs lots of basic errors which make it clear that there is something wrong with the dependencies (errors S0142 and S0075, mostly...)

Thanks once again,

Anya
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6138
Location: The Portland Group Inc.

PostPosted: Wed Jan 14, 2009 4:49 pm    Post subject: Reply with quote

Hi Anya,

What should happen is after you have added our Fortran source to your new project and started a build, if any file fails to compile due to a missing module, then that file will be put at the bottom of the list of files and compiled again. So any dependencies between Fortran files should be taken care of automatically.

You mention the use of "-Mnomain", leading me to believe that you also have C source? PVF doesn't include a C compiler so this might be the issue. Can you please post some examples of the errors you're seeing?

Thanks,
Mat
Back to top
View user's profile
Anya



Joined: 14 Dec 2007
Posts: 4

PostPosted: Wed Jan 14, 2009 7:18 pm    Post subject: Reply with quote

Hi Mat,

Sorry, my fault: I accidentally added a source file to the project that was never compiled in my makefile and shouldn't have been part of the project... That was the cause for all the errors.

To answer your question, the reason I use -Mnomain is that I have a module called 'main' in my Fortran code (for a reason: it is conceptually an analogue of a main subroutine in C).

Still, coming back to the original issue: is there a procedure to specify my own makefile for the PGI Visual Fortran to use? Alternatively, can I save a Linux-compatible makefile with PGI Visual? I constantly need to compile the code on a Linux server, and I need to have a functional makefile at hand at all times.

Another really important question is whether I can specify command-line options for my programs while debugging or running the executable through PGI Visual Fortran. If these two questions are solved, I should be all set to start using it.

Thank you very much for the help!

Anya
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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