F95 Compiler Question: Linking & Execution

  • Thread starter Thread starter globox
  • Start date Start date
  • Tags Tags
    Compiler
AI Thread Summary
The discussion revolves around compiling and linking Fortran 95 (f95) code using a software application on Windows 7. The user is unfamiliar with Fortran and seeks guidance on how to compile and link multiple code segments (a.f95, b.f95, c.f95, d.f95, and main.f95) without a provided makefile. Recommendations include using the g95 Fortran compiler, which allows linking all files in a single command or compiling them into object files first. The user also inquires about specific compilation options, such as fixed format source code and promoting REAL type variables to double precision. The conversation suggests checking documentation and contacting the software author for further assistance, given the freeware nature of the software and the absence of direct support.
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?
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top