CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Fortran- linking object file with for. files

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2013, 15:50
Default Fortran- linking object file with for. files
  #1
Senior Member
 
MAZI
Join Date: Oct 2009
Posts: 103
Rep Power: 16
mazdak is on a distinguished road
Hi Dears
I have an object file and 3 .for files.
The Object file is a solver.
How can i link those 3 files with the object file in Intel Visual FORTRAN?
thanks
mazdak is offline   Reply With Quote

Old   January 4, 2013, 15:59
Default
  #2
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
1. The compiled file (obj) was generated by Intel Visual Fortran from a Fortran (for) source file ?

2. Any chance to access the source for the solver ?

3. Do you know what is in the solver file ? I mean the subroutines and functions declarations etc ...

You could try to do this in a Terminal, something like:

ifort file1.for file2.for file3.for solver.obj
DoHander is offline   Reply With Quote

Old   January 4, 2013, 16:22
Default
  #3
Senior Member
 
MAZI
Join Date: Oct 2009
Posts: 103
Rep Power: 16
mazdak is on a distinguished road
1- i dont know
2- no
3- it solves u, v, k, e, p equations. as a matter of fact it is for 2-d turbulent channel flow.

i can not understand what you mean by last line that you have written.
mazdak is offline   Reply With Quote

Old   January 4, 2013, 16:55
Default
  #4
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
Say that you have 3 Fortran source files (ending in .for) named here file1.for, file2.for, file3.for and an obj file named solver.obj. In order to link the above 4 files into one executable (I'm assuming here that one of your .for files is the main program) you could use Intel Visual Fortran from the command line. The Fortran compiler is named "ifort".

Compiling and linking the above 4 files can be, theoretically, done with this command:

ifort file1.for file2.for file3.for solver.obj

where, obviously, you will substitute your real file names for file1.for etc ...
DoHander is offline   Reply With Quote

Old   January 4, 2013, 17:18
Default
  #5
Senior Member
 
MAZI
Join Date: Oct 2009
Posts: 103
Rep Power: 16
mazdak is on a distinguished road
error #5082: Syntax error, found IDENTIFIER 'FILE1' when expecting one of: ( % : . = =>


i dealt with above error. where should i put those 4 files, in which directory.
mazdak is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPU Linear Solvers for OpenFOAM gocarts OpenFOAM Announcements from Other Sources 37 August 17, 2022 14:22
wmake compiling new solver mksca OpenFOAM Programming & Development 14 June 22, 2018 06:29
[foam-extend.org] Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 137 January 20, 2016 14:56
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 13:14
1.7.x Environment Variables on Linux 10.04 rasma OpenFOAM Installation 9 July 30, 2010 04:43


All times are GMT -4. The time now is 03:49.