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

Fortran- linking object file with for. files

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 4, 2013, 16:50
Default Fortran- linking object file with for. files
  #1
Member
 
MAZI
Join Date: Oct 2009
Posts: 79
Rep Power: 7
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, 16:59
Default
  #2
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 10
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, 17:22
Default
  #3
Member
 
MAZI
Join Date: Oct 2009
Posts: 79
Rep Power: 7
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, 17:55
Default
  #4
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 10
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, 18:18
Default
  #5
Member
 
MAZI
Join Date: Oct 2009
Posts: 79
Rep Power: 7
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
wmake compiling new solver mksca OpenFOAM Programming & Development 13 August 18, 2014 22:26
swak4Foam-groovyBC build problem zxj160 OpenFOAM 18 July 30, 2013 13:14
Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 136 April 25, 2012 11:22
GPU Linear Solvers for OpenFOAM gocarts OpenFOAM Announcements from Other Sources 35 March 1, 2012 21:41
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 09:02.