LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-03-2009, 04: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, 10:46 PM   #2
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,802

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

Quote:
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:
Code:
./my-new-g77-program<CR>
(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...

--
RT
 
  


Reply



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 09:55 AM
error running a job ashley75 Linux - General 6 06-10-2005 01:34 PM
cron job not running vincebs Linux - Software 34 10-30-2004 01:27 PM
Cron job not running? james_cwy Linux - Newbie 6 12-14-2003 08:24 PM
Cron Job Not Running pzorn Linux - General 4 10-02-2003 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:43 PM.

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