Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-03-2009, 05:39 PM   #1
Albert P. Linnell
LQ Newbie
Registered: Feb 2009
Location: Seattle, WA
Posts: 2

Rep: Reputation: 0
Running a gFortran job and debugging options

I am migrating from Windows Microsoft Powerstation Fortran to gFortran on Ubuntu8.10, and am new to both Linux and gFortran. As a test I used vi to write a simple program to read a line of text from one file and write it to an output file. Compilation via gFortran went OK, with no logged errors and an executable file showing from the ls command. The seemingly trivial question is: how do I run the program? I tried typing the name of the executable and giving a carriage return: got the response command not found.

My second question: do the debug options under gcc also apply to gFortran?
Old 03-03-2009, 11:46 PM   #2
Senior Member
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Older: Coherent, MacOS, Red Hat, Big Iron IXs: AIX, Solaris, Tru64
Posts: 2,317

Rep: Reputation: 438Reputation: 438Reputation: 438Reputation: 438Reputation: 438
I am ... new to both Linux and gFortran.
Welcome Aboard!

I tried typing the name of the executable and giving a carriage return: got the response command not found.
The most probable cause of this is that the subdirectory where you created the executable is not in your PATH.

You should use the command:
(where <CR> is your carriage-return, Enter key, whatever.) The "." represents the current directory. Without the "./" prefix to tell the shell that the command that follows may be found in the current directory, the shell will look at the (colon-delimited) list of directories contained in the shell variable "PATH". Issue the command "echo $PATH" to see that list.

As for the compiler's debugging options, I can't help you there; I haven't written any new FORTRAN code in over a decade and none under Linux. I would hope that the debugging code would be nice enough to point back to a line of the FORTRAN source code when things go south at runtime. Otherwise, it'd seem pretty useless. But that's just a guess. Have you read the manpage for the compiler?

Good luck...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
compilation and debugging options in xemacs abhattacharya Linux - Software 0 07-14-2007 10:55 AM
error running a job ashley75 Linux - General 6 06-10-2005 02:34 PM
cron job not running vincebs Linux - Software 34 10-30-2004 02:27 PM
Cron job not running? james_cwy Linux - Newbie 6 12-14-2003 09:24 PM
Cron Job Not Running pzorn Linux - General 4 10-02-2003 02:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration