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

Linking subroutines to main file

deben147
Beginner
890 Views
Hi there
I am very new to fortran and this may be a monor thing to ask in forum,but I am actually in problem. Well, my problem is; I have a bunch of fortran files; one of them is main file and others are subroutines. I want to connect all these subroutine files to main file and compile the main file. What I did is created project and added files to the project. But all these files seems parallel, that is, no distinction between main file and sub routine files. I want the structure to be like ,,,,Project-> main file-> sub routine1, subroutine 2,...... .Can you tell me how can I do this?

Thanks in advance.
Deb
0 Kudos
1 Reply
mecej4
Honored Contributor III
890 Views
> I want to connect all these subroutine files to main file...

Any such connection is implicit. When you use the IDE, the compiler looks at all the source code, and decides the order of compiling the source files such that source files containing modules are compiled before it processes source files that USE these modules.

But for the presence of USE statements that impose an order, source files could be compiled in any order.

0 Kudos
Reply