- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi -
I am working on model comparison across various platform and computering environment.
A program can be compiled successfully using ifort, however I got some errors when I use gofrtran to compile it. (It can be compiled using gfortran in the Linux, but I am trying to compile it on a Mac.)
Below shows the errors:
gfortran main.o climate.o weather.o vegetation.o biogeochem.o initial.o humidity.o \\
radiation.o readpars.o canopy.o physiology.o snow.o soil.o utilities.o \\
ctemfire.o disturbance.o diagnostics.o io-cfs.o ies-io.o math.o stats.o nag-soil.o \\
-ffixed-line-length-132 -I/usr/local/include -L/usr/local/lib -lnetcdff -o ibis
Undefined symbols for architecture x86_64:
"_time_", referenced from:
_MAIN__ in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [ibis] Error 1
bash-3.2$
I really appreciate your solutions and suggestions. Please help me.
Michael
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error you show is from linking, not compiling. It looks as if you are referencing a function named TIME which is not provided. TIME is provided as a generic intrinsic subroutine by Intel Fortran, but it is an extension, perhaps one that gfortran does not support. If portability is a goal, use the DATE_AND_TIME standard intrinsic instead. Read about it in the documentation.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error you show is from linking, not compiling. It looks as if you are referencing a function named TIME which is not provided. TIME is provided as a generic intrinsic subroutine by Intel Fortran, but it is an extension, perhaps one that gfortran does not support. If portability is a goal, use the DATE_AND_TIME standard intrinsic instead. Read about it in the documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good hint! The original time function was dtime in gfortran.
Thanks Steve!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dtime() and etime() were legacy precursors to the f95 intrinsic cpu_time, which could be used to replace them.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page