cdabs supported in f2c? 
Author Message
 cdabs supported in f2c?

Hi there,
   I have a little problem with a f77 code: It uses a function called
cdabs() to get the absolut value of a double complex number. Now, f2c
gives me a c code that compiles but when linked I get the message
"symbol _cdabs_ referenced in the text not found" or some such.

I use gcc/emx v.2.6.3 on OS/2 Warp and the f2c executable compiled with the
code of 94-07-28.  Any help is welcome.
I also replaced cdabs with zabs, now everything linkes and compiles and
runs, but it never returns (the code needs some 10 seconds on a Sun 4/690-52
with real f77 and already 4 hours on my 386/387, which normally is a factor
of 10 .. 20 slower only.)  Any pointers are welcome.  Stefan

--
===============================================================================

                                                    home^    UTK^     ORNL^
===============================================================================



Fri, 29 Aug 1997 01:16:42 GMT  
 cdabs supported in f2c?
So. I still would love to know whether cdabs and zabs are the smae thing,
but my other problem has been solved. On my PC with f2c and gcc the program
is sent into an endless loop with some wild file read operation, which works
obviously on unix. Hm.  I will post that one.

Stefan

: Hi there,
:    I have a little problem with a f77 code: It uses a function called
: cdabs() to get the absolut value of a double complex number. Now, f2c
: gives me a c code that compiles but when linked I get the message
: "symbol _cdabs_ referenced in the text not found" or some such.

: I use gcc/emx v.2.6.3 on OS/2 Warp and the f2c executable compiled with the
: code of 94-07-28.  Any help is welcome.
: I also replaced cdabs with zabs, now everything linkes and compiles and
: runs, but it never returns (the code needs some 10 seconds on a Sun 4/690-52
: with real f77 and already 4 hours on my 386/387, which normally is a factor
: of 10 .. 20 slower only.)  Any pointers are welcome.  Stefan

: --
: ===============================================================================

:                                                     home^    UTK^     ORNL^
: ===============================================================================
--
===============================================================================

                                                    home^    UTK^     ORNL^
===============================================================================



Fri, 29 Aug 1997 09:23:18 GMT  
 cdabs supported in f2c?
No, f2c does not know about the CD* versions of the Z* intrinsics it
does offer to support DOUBLE COMPLEX.  g77, however, knows about
both forms.  They are equivalent aside from the prefix -- if I'm wrong
about this, somebody please let me know how!
--




Fri, 29 Aug 1997 20:40:13 GMT  
 cdabs supported in f2c?
Thank you. Another gentleman sent email to me already saying the same.
That is the proof :-) And, after all it works.   Cheers. Stefan

: No, f2c does not know about the CD* versions of the Z* intrinsics it
: does offer to support DOUBLE COMPLEX.  g77, however, knows about
: both forms.  They are equivalent aside from the prefix -- if I'm wrong
: about this, somebody please let me know how!
: --


--
===============================================================================

                                                    home^    UTK^     ORNL^
===============================================================================



Sat, 30 Aug 1997 07:45:39 GMT  
 cdabs supported in f2c?

Quote:

> Hi there,
>    I have a little problem with a f77 code: It uses a function called
> cdabs() to get the absolut value of a double complex number. Now, f2c
> gives me a c code that compiles but when linked I get the message
> "symbol _cdabs_ referenced in the text not found" or some such.

CDABS is not in the fortran 77 standard (hard to believe, but true).  Most
compilers allow this extension, as it is the natural way to express the
double complex specific form of a generic function:  first prefix the
generic with the precision (DABS) then prefix the resulting name with the
type (CDABS).  g77 does indeed use ZABS.

I recommend using the generic ABS and you will have no further problems,
as the compiler (if minimally sophisticated) will do the right thing for
the non-standard type DOUBLE COMPLEX.

Ed Skochinski



Sun, 31 Aug 1997 12:42:49 GMT  
 cdabs supported in f2c?
 > CDABS is not in the FORTRAN 77 standard (hard to believe, but true).

That CDABS is not in the standard is not so very hard to believe.  Double
complex is not in the standard, so why should there be CDABS?  Another
question is of course, why is double complex not in the standard ;-).
--
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924098



Mon, 01 Sep 1997 09:14:27 GMT  
 cdabs supported in f2c?
Cheers to everyone. Got it. Stefan. :-)



:  > CDABS is not in the FORTRAN 77 standard (hard to believe, but true).

: That CDABS is not in the standard is not so very hard to believe.  Double
: complex is not in the standard, so why should there be CDABS?  Another
: question is of course, why is double complex not in the standard ;-).
: --
: dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924098

--
===============================================================================

                                                    home^    UTK^     ORNL^
===============================================================================



Tue, 02 Sep 1997 08:20:48 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. dreal, cdabs, etc. in f2c

2. changing case to support f2c

3. dll support in f2c?

4. usage of the function etime, or supporting code to f2c wanted

5. Where find f2c, and is there a f2c++?

6. iand, ior for f2c (was:iand for f2c?)

7. f2c and structures, commercial f2c

8. Boston, MA - Technical Support Analysts - PC/Network Support - Financial Services

9. Boston, MA - Technical Support Analysts - PC/Network Support - Financial Services

10. Boston, MA - Technical Support Analysts - PC/Network Support - Financial Services

11. Is there any profiling support for f2c programs under Linux???

12. linux, f2c: is there a bsd support library (etime & friends)

 

 
Powered by phpBB® Forum Software