Hi,
I'm trying to help a colleague figure out a problem with one of her
codes, and we have managed to bring it down to some odd behaviour with
the sla_ecor subroutine.
As a minimal test code we have:
======================================================
DOUBLE PRECISION AL, DL, FD
C REAL AL, DL, FD
INTEGER IY, ND
C Star coordinates (alpha, delta):
AL=5.06934357
DL=0.0793974474
C IY = Year, ND = Day, FD = fraction of day
IY=2008
ND=215
FD=0.04629627
CALL SLA_ECOR(AL,DL,IY,ND,FD,RV,TL)
TL=TL/86400.
FJH=DJ+TL
write(*,*) ' AL = ', AL, ' DL = ', DL, ' IY = ', IY,
$ ' ND = ', ND, ' FD = ', FD, ' RV = ', RV,
$ ' TL = ', TL
FD=0.04629628
CALL SLA_ECOR(AL,DL,IY,ND,FD,RV,TL)
TL=TL/86400.
FJH=DJ+TL
write(*,*) ' AL = ', AL, ' DL = ', DL, ' IY = ', IY,
$ ' ND = ', ND, ' FD = ', FD, ' RV = ', RV,
$ ' TL = ', TL
=========================================================
When run we have the following, with wild results after a minor change
in FD.
$ ./fasetest_ifort
AL = 5.06934356689453 DL = 7.939744740724564E-002 IY =
2008 ND = 215 FD = 4.629626870155334E-002 RV =
-22.31620 TL = 3.7741994E-03
AL = 5.06934356689453 DL = 7.939744740724564E-002 IY =
2008 ND = 215 FD = 4.629627987742424E-002 RV =
2.1704860E+11 TL = -1.8850322E+07
$
This is a 64 bits machine running Fedora Core 8; I'm not sure about the
version of Starlink, but it is a 32 bits version, from August 2007, and
I am using Intel Fortran Compiler 11.0.081 (although the problem was
similar with GCC and PGI Fortran).
To compile it I did:
$ ifort -m32 -o fasetest_ifort fase.test.for /star/lib/libsla.a
Anyone has any idea what could be wrong?
Thanks,
Ángel de Vicente
--
+---------------------------------------------+
| |
| http://www.iac.es/galeria/angelv/ |
| |
| High Performance Computing Support PostDoc |
| Instituto de Astrofísica de Canarias |
| |
+---------------------------------------------+
---------------------------------------------------------------------------------------------
ADVERTENCIA: Sobre la privacidad y cumplimiento de la Ley de Protección de Datos, acceda a http://www.iac.es/disclaimer.php
WARNING: For more information on privacy and fulfilment of the Law concerning the Protection of Data, consult http://www.iac.es/disclaimer.php?lang=en
|