Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: fortran77 problem on ubuntu(solved)

  1. #1
    Join Date
    Feb 2006
    Beans
    55

    fortran77 problem on ubuntu(solved)

    Dear all:
    I can not compile the fortran program on ubuntu. please see attchement for next post, I tried to use f77,g77,ifort, but none of them work
    I do not use fortran so I do not know how to debug the program, anyone can help me? it looks very easy,

    Code:
    f77 contour2d.f
    
    /tmp/ccOQ8XAw.o: In function `MAIN__':
    contour2d.f:(.text+0x1e4): undefined reference to `classify_'
    contour2d.f:(.text+0x47d): undefined reference to `draw_'
    contour2d.f:(.text+0x482): undefined reference to `sum_'
    contour2d.f:(.text+0x487): undefined reference to `out_'
    collect2: ld returned 1 exit status
    I do have those files in the same directory, for example, a file classify2d.f:
    "
    CCCCC
    CCCCC CLASSIFY
    CCCCC
    c--- classify: classify cells as high or low density

    subroutine classify
    parameter (imax=256,jmax=256)
    .........
    "

    I guess this is a different complier error? in my ubuntu, it can not recognize the subroutine classify?
    please let me know, thank you
    Last edited by adameye; May 28th, 2013 at 01:45 AM. Reason: Added code tags

  2. #2
    Join Date
    Feb 2006
    Beans
    55

    Re: fortran77 problem on ubuntu

    please see attachment , thanks
    Attached Files Attached Files

  3. #3
    Join Date
    Apr 2013
    Location
    43.49°N 7.46°E
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: fortran77 problem on ubuntu

    Assuming that you have already installed gfortran, you could give a look to the online documentation about this compiler, especially to the chapter 2.

  4. #4
    Join Date
    Feb 2006
    Beans
    55

    Re: fortran77 problem on ubuntu

    Hi:
    thanks for your reply, is this a complier problem, or a code problem? I don't use fortran, but only need a ./a.out to get what I want. So I am lost here, please help me

  5. #5
    Join Date
    Apr 2013
    Location
    43.49°N 7.46°E
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: fortran77 problem on ubuntu

    I gave a look to your attachments; could you please indicate the complete compilation command you used, so that we can see if there's something wrong?

  6. #6
    Join Date
    Feb 2006
    Beans
    55

    Re: fortran77 problem on ubuntu

    Thanks, I cleared some stuff in attachment and attached the new original package here. I guess maybe library missing?
    $ f77 contour2d.f
    contour2d.f: In program `contour2d':
    contour2d.f:128: warning:
    common /block1/ ni,nj,nk,deficit,flag,nvert,
    ^
    Padding of 2 bytes required before `delta' in common block `block1' at (^) -- consider reordering members, largest-type-size first
    contour2d.f:158: warning:
    call sum
    ^
    Reference to unimplemented intrinsic `SUM' at (^) (assumed EXTERNAL)
    /tmp/ccwjFS69.o: In function `MAIN__':
    contour2d.f.text+0x1e4): undefined reference to `classify_'
    contour2d.f.text+0x47d): undefined reference to `draw_'
    contour2d.f.text+0x482): undefined reference to `sum_'
    contour2d.f.text+0x487): undefined reference to `out_'
    collect2: ld returned 1 exit status
    Attached Files Attached Files

  7. #7
    Join Date
    Apr 2012
    Beans
    6,897

    Re: fortran77 problem on ubuntu

    The zipfile you attached appears to contain a makefile - have you tried using it (instead of invoking f77 directly)? i.e.

    Code:
    make
    or
    Code:
    make contour2d

  8. #8
    Join Date
    Feb 2006
    Beans
    55

    Re: fortran77 problem on ubuntu

    thanks, I did try 'make', looks ok, and got a 'contour2d' (put a rho.smooth date file here, then use './contour2d, it looks it is running, but it is actually silly stuck here, not running at all)
    so I tried to only complier the contour2d.f. From my experience of C and Matlab, I could only complier contour2d.f and corresponding subprogram, and get an executable ./a.out or contour2d, but I failed.

    any helps appreciated!!!

  9. #9
    Join Date
    Feb 2006
    Beans
    55

    Re: fortran77 problem on ubuntu

    Hi,
    To make sure I did not misunderstand the package, here I post all files I got from the Author,
    top_package.tar is the main file (even I only need the included "Contour2d" folder), and the lib_test.tar.gz is provided by the author when he knew I had problem to run the program.
    suppose this run is very simple, I only need to provide a data file, named with rho.smooth, and specify some parameters from contour2d.inp. detailed descriptions are included in this package.


    because it looks it is a technique problem so I have to come to this forum for the help. One of my paper is almost published but the reviewer suggests me to verify something, which can be calculated by this damned contour2d.f. I do not use Fortran!

    any suggestions appreciated, you can also contact me on adameye AT gmail.com
    Attached Files Attached Files

  10. #10
    Join Date
    Apr 2013
    Location
    43.49°N 7.46°E
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: fortran77 problem on ubuntu

    in the README file, contained in the top_package archive, the author of the software writes
    The command "make everything" will compile and install of these programs.
    The command "make thebasics" will compile and install the ones that are most likely to be useful, in particular contour3 and gsmooth.
    Have you tried to follow these instructions, especially to run the command
    Code:
    make everything

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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