Question on project build and rebuild using visual studio

Question on project build and rebuild using visual studio

Dear All,

I have a question on Fortran project building. If I modify one source code file, the compiler sometimes recompile the modified source code only, sometimes recompile all the souce codes. For example (see bellow), if I modify the source code  msysrt.F90 and then build, it will compile this file only and link. But next time I modify the same file, event without change,it will compile all the souce codes and link. This two steps will repeat in the following build event. Since there are so many source code files in my project, it taks several minutes to compile all the source codes and then link. Why should this happen? How can I avoid recompiling all the source codes without change?

Thanks,

Daniel

1>------ Build started: Project: MIN3P_THCm, Configuration: Release x64 ------
1>Performing Pre-Build Event...
1>SubWCRev: 'D:\dsu\Research\MINT\Branch_MINT\'
1>Last committed at revision 123
1>Mixed revision range 117:123
1>Local modifications found
1>Unversioned items found
1>Compiling with Intel(R) Visual Fortran Compiler XE 13.1.3.198 [Intel(R) 64]...
1>msysrt.F90
1>Linking...
1>Embedding manifest...
1>
1>Build log written to  "file://D:\dsu\Research\MINT\Branch_MINT\src\project\visualstudio_p\x64\Release\BuildLog.htm"
1>MIN3P_THCm - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

1>------ Build started: Project: MIN3P_THCm, Configuration: Release x64 ------
1>Performing Pre-Build Event...
1>SubWCRev: 'D:\dsu\Research\MINT\Branch_MINT\'
1>Last committed at revision 123
1>Mixed revision range 117:123
1>Local modifications found
1>Unversioned items found
1>Compiling with Intel(R) Visual Fortran Compiler XE 13.1.3.198 [Intel(R) 64]...
1>Version.F90
1>writeversion.F90
1>solver_runtime.F90
1>m_general_tools_cheproo.F90
...

12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I have seen two general causes of this problem. One is that you have circular module dependencies, which are not legal in the language but are difficult to diagnose. The second is when the sources live on a network served disk and the timestamps are not precise enough.

It looks as if you are using a source control system, which may add to the problem if it is not properly reporting modification times to the dependency checker.

Steve - Intel Developer Support

Quote:

Steve Lionel (Intel) wrote:

I have seen two general causes of this problem. One is that you have circular module dependencies, which are not legal in the language but are difficult to diagnose. The second is when the sources live on a network served disk and the timestamps are not precise enough.

It looks as if you are using a source control system, which may add to the problem if it is not properly reporting modification times to the dependency checker.

Hi Steve,

There is no circular module dependencies. The source codes live on my local disk but they are controlled by visualsvn server. The visualsvn server is installed on a network server. The prebuild event will write the building information (version and time information) into version.F90, which will called by some some input/output codes. All the other codes are not changed and the timestamps are not changed either.

I forgot whether this problem occurred  before using version control.

Thanks,

Daniel

You shouldn't use pre-build events for this. Rather, you should use "custom build" events that are taken into account for dependency analysis.

Steve - Intel Developer Support

Hi Steve,

Even the pre-build events are removed, the problem is not solved. It seems tricky.

Anyway, thanks.

Daniel

I don't have anything more to offer right now. Perhaps if you provided us a ZIP of the project we might be able to find something.

Steve - Intel Developer Support

Quote:

Steve Lionel (Intel) wrote:

I don't have anything more to offer right now. Perhaps if you provided us a ZIP of the project we might be able to find something.

I'm afraid I cannot provided the source code at present.

Thanks,

Daniel

FYI, for what it's worth, this happens often for me. Fortunately, my project only takes a few minutes to rebuild when it inexplicably happens so it doesn't bother me; sometimes for just a few of the programs.

NVE

Hi,

I was having the same problem until a few minutes ago.
We have upgraded to Intel(R) Visual Fortran Compiler XE 14.0.1.139 and Visual Studio 2010 and Our projects (An executable and two libraries) started to recompile on every Build, even if NO files were modifyed.

I started to dig in and found the problem in our code:

stop 'Subroutine test; Module test'

In this instruction, the presence of the substring '; Module sss' (where sss is any word) causes the module to recompile always. A print or write with this same substring will cause the same behaviour.
This behaviour was not noticed in the previous versions of Intel Fortran that we used previously.

This small program will reproduce the error:

program Console1
implicit none
! This is OK
write (*,*) "Hello World - Module test"
! This is OK
write (*,*) "Hello World ; test"
    
!This causes the program to always build, if no changes were made
write (*,*) "Hello World ; Module test"
end program Console1

Could you explain this?

Best regads,
Eduardo Jauch

Looks as if it's a parsing error in the dependency analyzer. I will ask the developers to fix this. Thanks for the nice example. Issue ID is DPD200249592.

Steve - Intel Developer Support

Quote:

Steve Lionel (Intel) wrote:

Looks as if it's a parsing error in the dependency analyzer. I will ask the developers to fix this. Thanks for the nice example. Issue ID is DPD200249592.

Thanks Steve

Hi All,

I tried to use makefile to build my project, in this case, the compiler works fine and will not recompile the unchanged codes. The problem seems only exists when use visual studio.

Daniel

Leave a Comment

Please sign in to add a comment. Not a member? Join today