Results 1 to 2 of 2

Thread: how to execute GFORTRAN 95 program in ubuntu??

  1. #1
    Join Date
    Nov 2012
    Beans
    1

    how to execute GFORTRAN 95 program in ubuntu??

    Hi

    I am very new to ubuntu and trying to execute a program in GNU FORTRAN 95 Compiler. I am able to compile and run a .f file (SPHYSICSgen_2D.f). But i cannot execute the program.

    inside the terminal after going to the desired directory (SPHYICSgen2D) i did the following steps to create a program called new2 from the source code SPHYSICSgen_2D.f:

    gfortran -o new2 SPHYSICSgen_2D.f

    it created a new2 file. then to execute the new2 program i wrote:

    ./new2

    bt it says permission denied as:

    bash: ./new2: Permission denied


    i also tried by logging in as a root.

    How to solve this; please help me ...............


    SAKIB

  2. #2
    Join Date
    Jun 2008
    Location
    Tennessee
    Beans
    3,421

    Re: how to execute GFORTRAN 95 program in ubuntu??

    Not a fortran expert, but try:
    Code:
    chmod +x new2
    That will give execute permissions to the binary. Probably they are not given by default, for security reasons or because of directory settings.

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
  •