Find the answer to your Linux question:
Results 1 to 2 of 2
Hi! I hope someone can help me, although I've browsed through the forum, and it seems noone's dealing with these sorts of problems. Nevertheless.. As a part of one international ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    14

    Thumbs up Fortran compiling

    Hi!
    I hope someone can help me, although I've browsed through the forum, and it seems noone's dealing with these sorts of problems. Nevertheless..

    As a part of one international project among 2 Universities, I ended up in envyless position of compiling one program in Fortran. After resolving syntactic errors (replacing "type" with "print"), I've still had errors concerning unimplemented intrinsic functions 'DCOSD' and 'DSIND'. I've found out that these functions are not yet implemented in the compiler, because I've tried compiling it with f77 and f95 but without any success.

    Code:
    [rgnf@r10331 RFcodes]$ f77 -o rfsyn rfsyn.f refft.o
    rfsyn.f: In program 'MAIN__':
    rfsyn.f:106: warning:
                  w(1,i)=dsind(theta)*dcosd(phi)
                           ^
    Reference to unimplemented intrinsic 'DSIND' at (^) (assumed EXTERNAL)
    rfsyn.f:106: warning:
                  w(1,i)=dsind(theta)*dcosd(phi)
                           ^
    Reference to unimplemented intrinsic 'DCOSD' at (^) (assumed EXTERNAL)
    /tmp/ccGdZmzB.o: In function 'MAIN__':
    rfsyn.f:(.text+0x368): undefined reference to 'dsind_'
    rfsyn.f:(.text+0x380): undefined reference to 'dcosd_'
    rfsyn.f:(.text+0x3b1): undefined reference to 'dsind_'
    rfsyn.f:(.text+0x3c9): undefined reference to 'dsind_'
    rfsyn.f:(.text+0x3fa): undefined reference to 'dcosd_'
    collect2: ld returned 1 exit status
    [rgnf@r10331 RFcodes]$
    Questions: Is anyone familiar with these functions? Are they maybe labeled by another name within the compiler? Is the distribution version any relevant?

    The program only works under Linux. I work under Fedora 8.

    Thanx!

  2. #2
    drl
    drl is online now
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    The generic angle functions sin, cos, etc, assume radians. The similarly-named functions, sind, cosd, assume arguments in degrees. Names like dsind, are double-precision versions of those. Not all vendors supplied the degree versions in their libraries.

    Using "dsind dcosd fortran" in a Google search yields a meager (by Google standards) 700+ hits.

    There are some useful ideas in some of the other forums dealing with conversions, such as using some computing constants to do the degree-radian conversions. The page at SGI TPL (IRIX 6.4: Developer/MProF90_PG - Appendix B. Converting From Fortran 77) lists a module to help, notes other references.

    Best wishes ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...