Find the answer to your Linux question:
Results 1 to 5 of 5
hi all i have just installed mandriva 2006. i am trying to compile hello world program. but the error shows up ' non numeric character in 1" i use command ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    2

    Can't compile on Mandriva 2006 (Fortran)


    hi all i have just installed mandriva 2006. i am trying to compile hello world program. but the error shows up
    ' non numeric character in 1"
    i use command "gfortran file.for" to compile
    i have installed gcc, gcc-c++(and its libraries)
    is anything else required

    will intel fort 9.0i386 work in mandriva 2006(i586)?
    any help will be appreciated

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,287
    Hi, giri76.

    I just finished a large Fortran project using PGI Fortran on RedHat EL. I have installed gfortran on SuSE, but not Mandriva.

    We can probably help more if you post the code, the exact command you used, and the error messages ... 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 )

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    2
    the code
    program giri
    implicit none
    print*, "hello giri"
    end program

    (file saved as - giri.f)
    changed to the dir where the file is located(/home/giri/newfolder/)

    compilation command given in terminal
    gfortran giri.for


    the errors

    giri@localhost New Folder]$ gfortran hello.f
    In file hello.f:1

    program giri
    1
    Error: Non-numeric character in statement label at (1)
    In file hello.f:1

    program giri
    1
    Error: Unclassifiable statement at (1)
    In file hello.f:2

    implicit none
    1
    Error: Non-numeric character in statement label at (1)
    In file hello.f:2

    implicit none
    1
    Error: Unclassifiable statement at (1)
    In file hello.f:3

    print*,"hello giri"
    1
    Error: Non-numeric character in statement label at (1)
    In file hello.f:3

    print*,"hello giri"
    1
    Error: Unclassifiable statement at (1)
    In file hello.f:4

    end program
    1
    Error: Non-numeric character in statement label at (1)
    In file hello.f:4

    end program
    1
    Error: Unclassifiable statement at (1)

    same error obtained when file saved as giri.for
    doesnt compile when saved as giri.f90

    would be grateful if you can help
    earlier i was very successfully using intel fortran 90 (version 9.0) in FC 4

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,287
    Hi, giri76.

    I am not in front of the Linux box right now, but generally a ".f" implies Fortran-77, which requires 6 spaces before the beginning of each statement -- in some compilers, a TAB will also work.

    That was a good thought to change the suffix to f90, and I would have expected that be compiled without error, so I'll have to see why that doesn't seem to work.

    More later ... 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 )

  5. #5
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,287
    Hi, giri76.

    I am using CentOS with gfortran, but I think this will solve your problem.
    Code:
     > cat giri.f
    program giri
    implicit none
    print*, "hello giri"
    end program
     > gfortran -ffree-form giri.f
     > ./a.out
     hello giri
    Depending on how you got gfortran installed, there should be a man page. It's not an in-depth discussion, but it's quite useful. The man pages are your friends ... 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
  •