Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 28
I have written FORTRAN77 code,also a makefile.But is not working at all.I need advices how to start looking for errors?No previous experince with debugging....
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    41

    fortran problems

    I have written FORTRAN77 code,also a makefile.But is not working at all.I need advices how to start looking for errors?No previous experince with debugging.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Write *,*
    Debian GNU/Linux -- You know you want it.

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

    Welcome to the forums.

    If you have a simple error message, it is useful to post that, along with some basic information, like:
    I am using Ubuntu 9. When I try to compile a Fortran-77 code with make, I get the message:
    Code:
    make: f77: Command not found
    You might ask yourself:

    Does the simplest Fortran program compile, link, and execute correctly without the use of make?

    Does the simplest Makefile work with make to compile the simplest program, as well as my Fortran-77 program?

    Am I missing a module (subroutine, function), for example, sqrt?

    Good luck ... 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 )

  4. #4
    Just Joined!
    Join Date
    Jun 2010
    Posts
    12
    hi
    i have a document of fortran 77
    my project in university is this
    a source code of nasa projects that is on the net
    i read about fortran 77 but when i want compile this project that has errors
    i don't know why?
    could you help me?
    i don't know is true that i complie the project with source20 that is a fortran 77 compiler? or there is a beter compiler for this?

    please help me
    thanks

  5. #5
    Just Joined!
    Join Date
    May 2010
    Posts
    41
    Well,can not help you much.But I can advise to try some other compilers like Intel 11.1 which can be downloaded from Intel's website for free.I am actually using Intel Linux compiler and so far I am satisfied.

  6. #6
    Just Joined!
    Join Date
    Jun 2010
    Posts
    12
    thanks
    is intle version work for fortran 77 too?

    that size is very big and if that not support fortran 77 i was sad!!!

    please tell me that do intel support fortran 77 ?

  7. #7
    Just Joined!
    Join Date
    May 2010
    Posts
    41
    It works for sure.

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

    With Linux there are a number of Fortran compilers. They can be found by using Google and the appropriate name, but GNU/Linux gfortran should be available from your package manager (which, in turn, depends on your distribution of Linux.) I use Debian, so I installed gfortran with package manager apt-get.

    Here are the results of using the compilers on a very short Fortran-77 program:
    Code:
    #!/usr/bin/env bash
    
    # @(#) s1	Demonstrate Fortran-77 syntax checker, compilers.
    
    pe() { for i;do printf "%s" "$i";done; printf "\n"; }
    pl() { pe;pe "-----" ;pe "$*"; }
    
    pe " Content of hi.f:"
    cat hi.f
    
    pl " Results from ftnchek:"
    ftnchek hi.f
    
    rm -f *.o a.out
    pl " Results with ifort:"
    ifort -v
    ifort hi.f
    ./a.out
    
    rm -f *.o a.out
    pl " Results with gfortran:"
    gfortran --version | head -1
    gfortran hi.f
    ./a.out
    
    rm -f *.o a.out
    pl " Results with g95:"
    g95 --version | head -1
    g95 hi.f
    ./a.out
    
    exit 0
    producing:
    Code:
    % ./s1
     Content of hi.f:
          program main
          write(6,*) " Hello, world from Fortran-77."
          end
    
    -----
     Results from ftnchek:
    
    FTNCHEK Version 3.3 November 2004
    
    File hi.f:
     0 syntax errors detected in file hi.f
    
    -----
     Results with ifort:
    Version 11.1 
      Hello, world from Fortran-77.
    
    -----
     Results with gfortran:
    GNU Fortran (Debian 4.3.2-1.1) 4.3.2
      Hello, world from Fortran-77.
    
    -----
     Results with g95:
    G95 (GCC 4.0.3 (g95 0.92!) Jun 24 2009)
      Hello, world from Fortran-77.
    The compilers look at the suffix, .f, to see which standard of Fortran to use. Others would be f90 and f95 (e.g. hi.f90).

    If you are doing a lot of Fortran-77 work, then the code-checking program ftnchek is worth seeking and using.

    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 )

  9. #9
    Just Joined!
    Join Date
    Jun 2010
    Posts
    12

    my source has some error please help me

    hi
    my source has 170 error that i solve them but 15 error remind...

    please view my code and help me for solve the errors

    there are 76 warning too

    there are 11 subroutine that call in program but there aren't any source code or definition for them...

    how can i solve this?

    i can't give link of main program document and source code because my post are very little

    for view main pdf on nasa site please view ntrs.nasa.gov/search.jsp and search for document id with atleast one word type in document id textbox 19780023849
    this is my document id on nasa site
    and you can view pdf file on there...

    if you can help me please view this

    thanks alot

    have a nice day

    bahar.
    Attached Files Attached Files

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

    The link to which bahar_engineer is referring, and the pdf link ... cheers, drl

    NASA Technical Reports Server

    http://hdl.handle.net/2060/19780023849
    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 )

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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