Home > Archive > Fortran > June 2005 > SGI DATE_AND_TIME Unresolved text symbol
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SGI DATE_AND_TIME Unresolved text symbol
|
|
| clusardi2k@aol.com 2005-06-08, 4:00 pm |
| Hello,
I have a man page for it, but I am forced to comment it out
in the code to get it compile. What can I do?
Thank you,
Christopher Lusardi
| |
| Dr Ivan D. Reid 2005-06-08, 4:00 pm |
| On 8 Jun 2005 06:35:38 -0700, clusardi2k@aol.com <clusardi2k@aol.com>
wrote in <1118237738.469379.155940@f14g2000cwb.googlegroups.com>:
> I have a man page for it, but I am forced to comment it out
> in the code to get it compile. What can I do?
Is it in a library that you are not explicitly including?
--
Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration,
Brunel University. Ivan.Reid@brunel.ac.uk Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
| |
| Richard E Maine 2005-06-08, 4:00 pm |
| In article <1118237738.469379.155940@f14g2000cwb.googlegroups.com>,
clusardi2k@aol.com wrote:
> I have a man page for it, but I am forced to comment it out
> in the code to get it compile. What can I do?
Before telling what you can do differently, it would help to see what
you are doing *NOW*. You haven't given nearly enough data to tell that.
Start with what compiler you are using. Date_and_time is an f90
intrinsic. You haven't specified whether you are using the f90 compiler
or not. It is possible that the SGI f77 compiler has it as an extension,
but anyway, it does matter what compiler you are talking about. (I'm
just guessing that you are using an SGI compiler at all - there are
Fortran compilers from multiple vendors available on SGI machines, but
I'm guessing that you probably mean SGI's compiler since you didn't
mention).
Then show us the code. There are many, many ways that you could attempt
to call it, but get it wrong. Among the most trivial - it is an
intrinsic instead of an external; if you perhaps declare it as external,
then the intrinsic won't be used (and there being no such external...).
Other possibilities exist, but it isn't worth my time to elaborate every
arcane thing that I can possibly think of that you might have done
wrong. It is too big a list. Far simpler to see a sample of what you
actually did. Maybe you didn't do anything wrong in the code, in which
case it would really be a waste of my time to elaborate all the wrong
things that you didn't do. No need for a multi-thousand line program.
About 4 lines would do. (But please make it a complete compilable
sample. In particular, do not omit declarations, which matter a lot).
Oh, and the commands you are using to compile could also be relevant,
depending.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
| |
| clusardi2k@aol.com 2005-06-08, 4:00 pm |
|
Richard E Maine wrote:>
> Before telling what you can do differently, it would help to see what
> you are doing *NOW*. You haven't given nearly enough data to tell that.
>
> Start with what compiler you are using. Date_and_time is an f90
> intrinsic. You haven't specified whether you are using the f90 compiler
> or not. It is possible that the SGI f77 compiler has it as an extension,
> but anyway, it does matter what compiler you are talking about. (I'm
> just guessing that you are using an SGI compiler at all - there are
> Fortran compilers from multiple vendors available on SGI machines, but
> I'm guessing that you probably mean SGI's compiler since you didn't
> mention).
C test.f
program test
character * 8 t1
character * 9 t2
call date_and_time (t1,t2)
end
%f77 test.f
....
Unresolved text symbol "date_and_time"
Note: I tried f77 -craylibs -f90libs test.f with similar results.
Christopher Lusardi
| |
| clusardi2k@aol.com 2005-06-08, 4:00 pm |
| Sorry, typo t2 should be defined as below
clusardi2k@aol.com wrote:
> character * 9 t2
character * 10 t2
Christopher Lusardi
| |
| Richard E Maine 2005-06-08, 4:00 pm |
| In article <1118251098.543851.305430@g43g2000cwa.googlegroups.com>,
clusardi2k@aol.com wrote:
> C test.f
> program test
> character * 8 t1
> character * 9 t2
> call date_and_time (t1,t2)
> end
Good. Looks ok.
> %f77 test.f
> ...
> Unresolved text symbol "date_and_time"
This looks like the problem. As I mentioned, date_and_time is an f90
intrinsic, but you are using the f77 compiler. I don't know enough
specifics about SGI (there are some around here, but it has been several
years since I used one and I have no current accounts), but...
It is quite possible (even likely, but not certain) that the SGI f77
compiler just doesn't support this f90 intrinsic at all. (It is also
possible that support was added at some version of the compiler, but not
in earlier ones).
In cases where f77 compilers do support f90 intrinsics like this, they
tend to need to "do something" about the optional arguments. All of the
arguments to the f90 date_and_time intrinsic are optional (though it is
mostly pointless if you don't use at least one of them - might make for
a good edge condition for a test suite and I can even imagine a slightly
obscure f90 scenario where it would be useful). However, f77 does not
have a concept of optional arguments. Typical f77 implementations of
things like date_and_time do something like make all of the arguments
mandatory. If SGI does have an f77 version like that, then your code
needs more arguments (even if you make no constructive use of them).
However, I'd check the man page to see if it specifically mentions f77
support rather than just trying at random, because there are too many
possibilities to try at random (the f77 implementation might have only a
subset of the f90 arguments). It might well make no difference at all.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
| |
| Tim Prince 2005-06-09, 3:58 am |
|
"Richard E Maine" <nospam@see.signature> wrote in message
news:nospam-119C29.10340708062005@news.supernews.com...
> In article <1118251098.543851.305430@g43g2000cwa.googlegroups.com>,
> clusardi2k@aol.com wrote:
>
>
>
> This looks like the problem. As I mentioned, date_and_time is an f90
> intrinsic, but you are using the f77 compiler. I don't know enough
> specifics about SGI (there are some around here, but it has been several
> years since I used one and I have no current accounts), but...
>
> It is quite possible (even likely, but not certain) that the SGI f77
> compiler just doesn't support this f90 intrinsic at all. (It is also
> possible that support was added at some version of the compiler, but not
> in earlier ones).
Likewise, it has been quite a while since I had an Origin account. At that
time, it was quite difficult to persuade their make to use their f90
compiler. But, SGI did add f95 support to the f90 compiler, about the time
that the holdouts who supported only f77+ added DATE_AND_TIME() to their
compilers to take care of those Y2K requirements. So, I'm surprised their
f77 still hangs around, but I'm not surprised that it didn't add any more
f90 style syntax.
| |
| Walter Spector 2005-06-09, 3:58 pm |
| clusardi2k@aol.com wrote:
> ...
> %f77 test.f
> ...
> Unresolved text symbol "date_and_time"
You *must* use the f90 compiler. The SGI f77 compiler does not support
the intrinsic.
Walt
-...-
Walt Spector
(w6ws at earthlink dot net)
| |
| clusardi2k@aol.com 2005-06-10, 4:00 pm |
| I decedied to use IDATE and ITIME.
Thanks,
Christopher Lusardi
|
|
|
|
|