Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

Compilation order with modules

ferrad01
Beginner
732 Views

I have a largish project (155 f90 files, each containg 1 module). All was building fine, the I decided to rename some modules, and now it won't link, saying it cannot find the module that the file it's compiling is trying to USE. I then deleted all the .MOD files, now it's even worse.

I thought that the linker would work out the dependencies itself, but this doesn appear to be happening. How do I get this to build automatically without me having to manually work out what depends on what?

One thing I did do is move all the USE statements from some f90 files into separate f90 files, and INCLUDE'd these in the original files. (stop press: just removed these, but it didn't help)

There are no circular dependencies.

I just looked at the CVF IDE, and it has "Build -> Update all Dependencies". I don't see this in the IVF IDE though.

0 Kudos
5 Replies
Les_Neilson
Valued Contributor II
732 Views
>I decided to rename some modules

Just to be clear. You renamed the *module* not the filename?
Simple things first :
check spellings of the changed module names;
check target directoriesare correct

>I thought that the linker would work out the dependencies itself but this doesn appear to >be happening. How do I get this to build automatically without me having to manually >work out what depends on what?

Alas you have to define the dependencies, and build order, yourself (thanks Microsoft!)
Project->Dependencies or Project->Build Order

>One thing I did do is move all the USE statements from some f90 files into separate f90
>files, and INCLUDE'd these in the original files. (stop press: just removed these, but it
> didn't help)

That should have been ok.Provided (a) the modules compiled without error; and (b) the module names are correct.
I prefer toname the include files as .ins rather than .f90; means I can search include files seperate from source files.

Les

0 Kudos
ferrad01
Beginner
732 Views

Yes, I renamed the modules not the files.

As far as dependencies go, I don't see any options under Project or Build named "Dependencies" or "Build Order". I'm using VS2005

A previous thread on this subject said IVF was supposed to work out the dependencies for itself.

0 Kudos
Les_Neilson
Valued Contributor II
732 Views

Ok, the Project->Dependencies and Build Order optionsoccur on the menuonly if the solution has more than one project.

For a similar situation I had with modules and supporting libraries, including mixed langauge libs, I created a new solution thatincluded the individual projects then I set the dependencies and build order manually in that solution. Then instead of buildingthe projects one at a time myself, I build the new solution. It only tookan hour, or two at the most,for the whole thing.

Les

0 Kudos
ferrad01
Beginner
732 Views
I only have one project now. I used to have 7 but I got sick of trying to set up the dependencies of each, so I copied them all into one folder and one project.
0 Kudos
ferrad01
Beginner
732 Views

I upgraded to 10.1 and now it compiles and links properly.

0 Kudos
Reply