|
[Sponsors] |
September 20, 2009, 07:37 |
Compile error in KIVA 3v with gfortran
|
#1 |
New Member
Robert C
Join Date: Jun 2009
Location: London, UK
Posts: 16
Rep Power: 17 |
I'm trying to build kiva 3v on OS X using gfortran. I had the same code compiling with intel fortran compiler, using XCode so I didn't see compiler options ifort was using.
Anyway, with gfortran I get the follow error I can't seem to find much information on: Code:
begin.F:51.18: call second(tstart) 1 Error: 'time' argument of 'second' intrinsic at (1) must be of kind 4 http://gist.github.com/189768 The second looks like this: Code:
subroutine second (tnow) real*4 d(2) rtnow=etime(d) tnow=d(1)+d(2) return end I'm at a loss of how to proceed, any advice is appreciated! Last edited by ottbot; October 1, 2009 at 07:31. Reason: fix subroutine second to actual kiva second.F |
|
October 1, 2009, 08:10 |
|
#2 |
New Member
Robert C
Join Date: Jun 2009
Location: London, UK
Posts: 16
Rep Power: 17 |
I'm hoping someone could take another look at this - the following program will show what's happening.
Code:
program sec implicit double precision (a-h,o-z) call second(tbegin) end program sec subroutine second (tnow) real*4 d(2) rtnow=etime(d) tnow=d(1)+d(2) return end Code:
rob@cosmo test $ gfortran second.F second.F:4.22: call second(tbegin) 1 Error: 'time' argument of 'second' intrinsic at (1) must be of kind 4 However I'm looking for a way to modify just the subroutine to get it working - as second() is used all over the place in kiva. Any thoughts? Thanks again! |
|
October 1, 2009, 23:08 |
Subroutine Second
|
#3 |
New Member
Tonse
Join Date: Oct 2009
Posts: 1
Rep Power: 0 |
I guess you have solved your problem by now, but here goes anyway:
The gfortran compiler thinks that Second() is an Intrinsic function, (and it probably is for gfortran.) Solution: Rename the subroutine in second.f to be something else, say, Ksecond. Also rename the Calls to Second to be Call Ksecond. That fixes it. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
Error compile file udf | czfluent | Fluent UDF and Scheme Programming | 24 | September 26, 2009 14:24 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |
Compile KIVA in MAC platform | FooChern | Main CFD Forum | 0 | August 9, 2005 16:56 |
PDF - conserved scalar approach in KIVA | vega | Main CFD Forum | 0 | July 5, 2005 03:49 |