F95 Compiler Question: Linking & Execution

  • Thread starter Thread starter globox
  • Start date Start date
  • Tags Tags
    Compiler
Click For Summary

Discussion Overview

The discussion revolves around the compilation and linking process of Fortran 95 (f95) code segments using specific software on a Windows 7 platform. Participants seek guidance on how to execute a program that consists of multiple Fortran source files and inquire about suitable compilers that meet specific formatting and type promotion requirements.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses unfamiliarity with Fortran and requests assistance with linking and executing f95 code segments using a specific software.
  • Another participant suggests checking for a makefile or contacting the software supplier for help, indicating that the absence of a makefile complicates the process.
  • A participant mentions that the software is freeware and doubts that the supplier will provide support, expressing skepticism about resolving the issue through documentation.
  • One participant provides a command-line example for using the g95 Fortran compiler to link multiple files directly or compile them into object files first, but does not confirm if this method is universally applicable.
  • A follow-up question is raised regarding the specification of fixed format source code and automatic promotion of REAL type variables, asking which Fortran software allows these options.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to compile and link the Fortran code, as multiple suggestions and uncertainties about the software capabilities are presented.

Contextual Notes

Limitations include the lack of a makefile, uncertainty about the software's documentation, and the specific requirements for source code formatting and variable type promotion that may not be universally supported across different Fortran compilers.

Who May Find This Useful

Individuals working with Fortran 95 code, particularly those using Windows platforms and seeking guidance on compilation and linking processes, may find this discussion relevant.

globox
Messages
3
Reaction score
0
Hi guys,

I am thoroughly unfamiliar with the fortran, but I have to use a software that based on f95 codes.

In the user manual of the software it says that, this software involves compilation and linking of the following code segments and in the following order:

a.f95
b.f95
c.f95
d.f95
main.f95

... etc.

So, i am using win7 and plato software for the compilation process but i could not figure out the linking and the compilation process.

Can anyone tell me how to link these codes and execute the program?
Or can anyone suggest me another compilation program for f95?

Any help will be appreciated.

Looking forward to hear from you :)
 
Technology news on Phys.org
Does the software not come with a makefile (or whatever the Windows equivalent is)? If not, you'd probably be better off asking Silverfrost, if you can't find an answer in the documentation. Of course, you might want to contact the author of the software, too.
 
Yeap the software does not have makefile and as the software is a freeware i do not think that the supplier of the software will help for the execution of the program.

I will check documentation right now, but most probably i will not be able to solve the problem :(

Anyway, thank you
 
With the freeware (gnu) g95 Fortran compiler I think you can just give it all the files you want to link on the command line. As in,

g95 a.f95 b.f95 c.f95 d.f95 main.f95 -o whatever.exe

Or you can compile the modules a,b,c and d to object files first. As in,
g95 -c a.f95 -o a.obj
and similarly for b,c and d

Then use
f95 a.obj b.obj c.obj d.obj main.f95 -o whatever.exe
 
ok, another question:

In compiling the codes the following options must be specified:
(1) Fixed format source code (72 columns)
(2) Automatically promote REAL type variables to REAL (KIND = 8)
(double precision)

which fortran software enables specifying the conditions abobe and how?
 

Similar threads

Replies
6
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
11K
  • · Replies 17 ·
Replies
17
Views
5K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 1 ·
Replies
1
Views
3K