install g95 on linux

  • Follow


Hello,

I'm new to this group an also a beginner at programming fortran. That's 
why my question is also quite fundamentally. I just extracted the g95 
compiler on my SuSE 9.3 linux. I read in the compiler's manual to use 
g95 filename.f95 to compile my program. When I do this the console tells 
me not to find this command.
What's wrong?

Thanks a lot for any help!
Mario
0
Reply mospelt (6) 11/2/2005 4:22:51 PM

Mario Ospelt <mospelt@student.ethz.ch> wrote:

> I'm new to this group an also a beginner at programming fortran. That's
> why my question is also quite fundamentally. I just extracted the g95
> compiler on my SuSE 9.3 linux. I read in the compiler's manual to use
> g95 filename.f95 to compile my program. When I do this the console tells
> me not to find this command.
> What's wrong?

The command isn't in your path (i.e. the list of directories that are
searched to find commands). This is pretty much a universal issue with
installing things, not specific to g95 (or even to Unix - same things
applies to WIndows, with differences in detail). You could modify the
path, but generally, I don't like to do that for every application I
install.  I recommend instead making a symlink (sort of like a pointer
in the file system) somewhere that is in your path.

I usually prefer to put things like this in /usr/local/bin. I forget
whether SuSE sets up that directory and a path to it by default though.
If it doesn't and you aren't familliar with such things, it might be
simpler to use someplace that is already set up. If you tell us the
output of
  echo $PATH
that will help me help you on this. Anyway, if /usr/local/bin appears in
that output, and there is a /usr/local/bin directory, then you could
make an appropriate symlink by doing (as root, so as to have permission)

   cd /usr/local/bin
   ln -s wherever-you-installed-g95/bin/*g95 

In the process of checking that I had the name right, I noticed the
INSTALL file in my g95 installation on this system (which is a Mac, but
the procedure is the same). I notice that this is step 2 of the
installation instructions in that file.

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
0
Reply nospam47 (9742) 11/2/2005 5:20:21 PM


Richard Maine schrieb:
> Mario Ospelt <mospelt@student.ethz.ch> wrote:
> 
>    cd /usr/local/bin
>    ln -s wherever-you-installed-g95/bin/*g95 
> 
> In the process of checking that I had the name right, I noticed the
> INSTALL file in my g95 installation on this system (which is a Mac, but
> the procedure is the same). I notice that this is step 2 of the
> installation instructions in that file.
> 

Thanks a lot. It works now!

Mario
0
Reply mospelt (6) 11/2/2005 5:39:53 PM

Mario Ospelt wrote:


either add the directory the compiler exe is in to your PATH, or use the
full pathname to execute, as in: /a/b/c/d/g95 sourcefile.g95
0
Reply Gene 11/2/2005 9:46:50 PM

3 Replies
56 Views

(page loaded in 0.069 seconds)


Reply: