Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

command not found error

command not found error

command not found error

Hello ALL,

I am a new learner in Fortran. I want to run my code on linux but after compiling get this error. Can any one by chance have some idea what is causing this problem here? Any help would be much appreciated.



aronline@balmerblushingargroup/Farzaneh/Fortran$ gfortran -mcmodel=medium -o file centroidmega-pimms2.f90
aronline@balmerblushingargroup/Farzaneh/Fortran$ ./centroidmega-pimms2
-bash: ./centroidmega-pimms2: No such file or directory
aronline@balmerblushingargroup/Farzaneh/Fortran$ ^C
aronline@balmerblushingargroup/Farzaneh/Fortran$ ./centroidmega-pimms2.f90
./centroidmega-pimms2.f90: line 1: Program: command not found
./centroidmega-pimms2.f90: line 2: $'\r': command not found
./centroidmega-pimms2.f90: line 3: Implicit: command not found
./centroidmega-pimms2.f90: line 4: $'!\r': command not found
./centroidmega-pimms2.f90: line 5: Centroids: command not found
./centroidmega-pimms2.f90: line 6: Kasra: command not found
./centroidmega-pimms2.f90: line 7: $'!\r': command not found
./centroidmega-pimms2.f90: line 8: $'\r': command not found
./centroidmega-pimms2.f90: line 9: syntax error near unexpected token `('
./centroidmega-pimms2.f90: line 9: ` Integer, Parameter :: wp = Selected_real_k'nd( 12, 70 )

RE: command not found error

Let us analyze what you've done


gfortran -mcmodel=medium -o file centroidmega-pimms2.f90 
This compiles the program centroidmega-pimms2.f90 to create the executable file. To run this program you should type


The executable is not called centroidmega-pimms2. If you wanted that, you should have used


gfortran -mcmodel=medium -o centroidmega-pimms2 centroidmega-pimms2.f90 
The rest of it: you're trying to execute the source code. This basically tries to execute every line as shell script and fails.

RE: command not found error

Thank you. I got it!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close