Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28367 Discussions

fortran code can be compile with fortran compiler 2005 but not with 2013

Hamid_Vishkasougheh_
516 Views

I recently installed visual studio 2013 and Fortran compiller 2016 S4 student version on my laptop. Unfortunately with my laptop I cant compile the same Fortran code that I can compile with Fortran compiller 2005 and visual studio 10 on my PC. I am quite sure the Fortran and visual studio are coupled on my laptop. But still don't know what cause this issue. Any help will be greatly appreciated. 

 

0 Kudos
1 Solution
Lorri_M_Intel
Employee
516 Views

I'm going to make a completely wild guess about what happened.

I assume the source file named "vpsc7.for" is a large file, with many subroutines.

I also assume that when you moved the project from one device to the other, you copied all the files with ".for" and ".f90" file extensions, and then recreated the project.

As Andrew pointed out above, the files with the name "XXX__genmod.f90" are intended to be temporary, generated files used only by the compiler to do extensive interface checking.    These are created by default in the DEBUG configuration, and it would not be surprising that they were created in your previous project.

The resolution should be simple; in the Visual Studio application, the "Solution Explorer" window, remove each of the files named "*__genmod.f90" from the project.  Just right-click on the filename and select "Exclude from project".   I think you have to do them one at a time; it's a little clunky, but you only have to do this once.

             Please, let us know how that works for you --

                                             --Lorri

 

 

View solution in original post

0 Kudos
10 Replies
mecej4
Honored Contributor III
516 Views

Please explain what you mean by "I can't compile". How did you attempt to compile, what were the compiler options used, etc.?

0 Kudos
jimdempseyatthecove
Honored Contributor III
516 Views

And what were the error messages?

Also note that a MS VS 2005 Solution and Project files need to be converted to VS 2013 format. MS VS 2013 should do this for you (with prompt).

The Intel Fortran integration to MS VS must be performed (by way of formal install). Copying files/folders will not perform the integration.

Jim Dempsey

0 Kudos
Hamid_Vishkasougheh_
516 Views

errors.jpgThanks for the replies. In terms of the error messages, they are all linking errors. The compiling processes goes well till the linking step. Attached is a screenshot of the errors.

Jim, I am not sure how can I convert the project files from VS 2005 to 2013 version. Can you explain that a bit more please. Thanks.   

 

 

0 Kudos
andrew_4619
Honored Contributor II
516 Views
do a full rebuild and post the build log ( it is an html file). We can then see the compile and link commands and options being used. The genmod files are used for checking interfaces they should not be being linked.
0 Kudos
Hamid_Vishkasougheh_
516 Views
0 Kudos
Lorri_M_Intel
Employee
517 Views

I'm going to make a completely wild guess about what happened.

I assume the source file named "vpsc7.for" is a large file, with many subroutines.

I also assume that when you moved the project from one device to the other, you copied all the files with ".for" and ".f90" file extensions, and then recreated the project.

As Andrew pointed out above, the files with the name "XXX__genmod.f90" are intended to be temporary, generated files used only by the compiler to do extensive interface checking.    These are created by default in the DEBUG configuration, and it would not be surprising that they were created in your previous project.

The resolution should be simple; in the Visual Studio application, the "Solution Explorer" window, remove each of the files named "*__genmod.f90" from the project.  Just right-click on the filename and select "Exclude from project".   I think you have to do them one at a time; it's a little clunky, but you only have to do this once.

             Please, let us know how that works for you --

                                             --Lorri

 

 

0 Kudos
andrew_4619
Honored Contributor II
516 Views
the buildlog was as I suspected. Lorri's advise is exactly what you need to do, remove all the ??genmod.f90 files from the project in solution explorer. It looks like your project only has one real source file.
0 Kudos
Hamid_Vishkasougheh_
516 Views

Thanks so much you guys helped me a lot. It was not those .f90 but those .obj files. I removed them and could get the project compiled and run. Thanks again. 

0 Kudos
andrew_4619
Honored Contributor II
516 Views
Your answer worries me. The obj files would only have existed because the genmod.f90 files had been compiled. They would only be compiled if they were included as part of the project source at some point? Or maybe had you manually added those object files to the project .....
0 Kudos
Hamid_Vishkasougheh_
516 Views

Andrew, The source project files are coming form somebody else so I don't know what he included initially over there. But when I paid more attention during the compiling process, I saw all the .f90 are going through properly but the .obj files were all that cause those errors. I just removed them and the projects get compiled. Thanks for your help.

0 Kudos
Reply