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

Building with .obj files from a different workstation

AhmedAbouhussein
Beginner
442 Views

Hello,

 

I am trying to cut some of my build time by having my Fortran projects build on another computer with similar hardware and an identical workflow setup (VS studio 2022 and ifort 2023.0.0). However, when I copy .obj files from the 'build' workstation to my local machine I notice I have to rebuild any Fortran file which has a 'use' statement. Interestingly, .obj files made from source files without 'use' statements typically do not get rebuilt. When I tried diffing the .obj file using a hex reader I see that the directory information is somehow stored in .obj files and obviously show up as a difference between the two workstations.

Does anyone know why and how VS studio 2022 identifies this information from the .obj file? Why does it choose to recompile when there's a 'use' statement? For reference I checked the timestamps to make sure my source files are always older than the .obj files.

Thanks,

 

Ahmed

0 Kudos
2 Replies
mecej4
Honored Contributor III
439 Views

When you copy the object files across machines, do you also copy the relevant .mod files? If not, or the dates on the .mod files indicate the need for recompilation, the compiler/VS build system will attempt to regenerate the .mod files.

0 Kudos
andrew_4619
Honored Contributor III
430 Views

the "use" creates a dependency on the module used so if the system thinks that things has changed it want to build it....

0 Kudos
Reply