Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gfortran/g95 differences

64 views
Skip to first unread message

Luka Djigas

unread,
Mar 14, 2010, 5:45:41 PM3/14/10
to
GNU corporation always leaves me baffled with their approach to simplicity.

To put it simple; I'm looking for a free compiler which can run on an usb stick, for
a demonstration of some features, on computers which are handled by a rather
heavy-to-deal-with administrator, who doesn't want to install a compiler already bought by
the faculty he works for (don't ask me anything, I'm already on thin nerves regarding the man).

I always knew of those two from GNU world, but never used either of them.
If I got things right, there were three in the beginning, g77, gfortran and g95.
g77 is nowadays obsolete, and therefore out of the picture. So that leaves two: gfortran and g95.

1. Can any of these two be installed on an usb stick (I have gfortran installed on my computer, it
didn't seem to mess to much about in the registry) as to work portably from a stick ?
Can I just copy it from my Program Files directory on an usb and run it ?
(I cannot test it for sure since I have only one machine).

2. This is of lesser importance, but which of the two above is considered more up to date as to the
latest fortran'03 features ?
It is, I repeat, of lesser importance, but their information pages are so confusing to me, that I
just cannot understand where development of each of them currently stands.


With regards to all, as always,
Luka

FX

unread,
Mar 14, 2010, 6:08:32 PM3/14/10
to
> 1. Can any of these two be installed on an usb stick (I have gfortran
> installed on my computer, it didn't seem to mess to much about in the
> registry) as to work portably from a stick ? Can I just copy it from my
> Program Files directory on an usb and run it ? (I cannot test it for
> sure since I have only one machine).

This should work for gfortran, at it finds all its files by relative
path. (It stores strictly nothing in registry, and can get some help.)

For G95, if I remember correctly, you might need to have an environment
variable set (LIBRARY_PATH or G95_LIBRARY_PATH) to find its own files
(see http://www.g95.org/windows_faq.shtml for details).

> 2. This is of lesser importance, but which of the two above is
> considered more up to date as to the latest fortran'03 features ? It
> is, I repeat, of lesser importance, but their information pages are so
> confusing to me, that I just cannot understand where development of
> each of them currently stands.

They both have partial, but far from complete support for F2003. In
particular, g95 has co-array supports (runtime is shareware), while
gfortran requires very recent versions for some of the more OO stuff
(polymorphism, type-bound procedures, etc.).

But I only follow development of gfortran from far away, nowadays, so
I'll let others comment.

(PS: Looking at the website, it seems like g95 development is slow these
days.)

--
FX

jfh

unread,
Mar 14, 2010, 7:08:33 PM3/14/10
to

Am I missing something here? The g95 or gfortran you download to your
computer is different on different machines. You can upload any
particular version(s) to your stick, but to be portable you'd have to
put many different versions on the stick and download the appropriate
one to whatever machine you're currently using, unless of course you
want to put the source code on your stick and recompile it every time
you use g95 or gfortran. Look, for example, at how many
different binaries exist on the g95 web site.

John Harper

Luka Djigas

unread,
Mar 14, 2010, 8:06:59 PM3/14/10
to
On Sun, 14 Mar 2010 16:08:33 -0700 (PDT), jfh <john....@vuw.ac.nz> wrote:

>Am I missing something here? The g95 or gfortran you download to your
>computer is different on different machines. You can upload any
>particular version(s) to your stick, but to be portable you'd have to
>put many different versions on the stick and download the appropriate
>one to whatever machine you're currently using, unless of course you
>want to put the source code on your stick and recompile it every time
>you use g95 or gfortran. Look, for example, at how many
>different binaries exist on the g95 web site.
>
>John Harper

Ah, my mistake here. I misused the term portable, as in "can be started on my Windows machine
and can be started on some other Windows running machine". I did not mean portable as in
"between platforms".

with regards,
Luka

Richard Maine

unread,
Mar 14, 2010, 8:30:56 PM3/14/10
to
Luka Djigas <ldigas@___gmail___.com> wrote:

> GNU corporation always leaves me baffled with their approach to simplicity.

Well, if you think that GNU is a corporation, it is indeed likely to
bafflle you. :-( It isn't.

Afraid I know very little about the Windows ports of either g95 or
gfortran.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain

Tobias Burnus

unread,
Mar 15, 2010, 2:54:18 AM3/15/10
to
FX wrote:
>> 2. This is of lesser importance, but which of the two above is
>> considered more up to date as to the latest fortran'03 features ? It
>> is, I repeat, of lesser importance, but their information pages are so
>> confusing to me, that I just cannot understand where development of
>> each of them currently stands.

Regarding the implementation status of Fortran 2003 and Fortran 2008
features, see ACM SIGPLAN Fortran Forum
(http://doi.acm.org/10.1145/1667140.1667145) - or slightly older at
http://fortranwiki.org/fortran/show/Fortran+2003+status

For gfortran see also for the status
http://gcc.gnu.org/wiki/Fortran2003Status
http://gcc.gnu.org/wiki/Fortran2008Status
and for the release notes (changes)
http://gcc.gnu.org/gcc-4.5/changes.html
http://gcc.gnu.org/gcc-4.4/changes.html
http://gcc.gnu.org/gcc-4.3/changes.html

> They both have partial, but far from complete support for F2003. In
> particular, g95 has co-array supports (runtime is shareware), while

I think the coarray console only works under Linux (or at least there
seem to be only Linux binaries).

Tobias

Paul Thomas

unread,
Mar 15, 2010, 10:53:34 AM3/15/10
to
Out of curiosity, during an extremely boring meeting, I downloaded and
extracted the equation.com gcc-4.5.0 snapshot package onto a memory
stick. I thought that this would be a good test because I have
absolutely no administrator rights on my work laptop :-)

It worked perfectly. I tried compiling and running a few progams and
encountered no problems. One nice feature of this package is that it,
as well as gcc, gfortran and g++, comes with all sorts of bits and
pieces like gdb, make etc..

http://www.equation.com/servlet/equation.cmd?call=fortran

Regards

Paul Thomas

Arjen Markus

unread,
Mar 15, 2010, 11:11:47 AM3/15/10
to

I have done the same thing, well, not during a boring meeting. It all
gets
installed without much ado. I like it better than some of the other
distributions
I know of.

Regards,

Arjen

James Van Buskirk

unread,
Mar 15, 2010, 12:32:49 PM3/15/10
to
"Paul Thomas" <paul.rich...@gmail.com> wrote in message
news:5f1e1e90-a716-4b3c...@g19g2000yqe.googlegroups.com...

> http://www.equation.com/servlet/equation.cmd?call=fortran

The www.equation.com package is the most usable of the Windows x64
ones (g95 doesn't have a Windows x64 version), and installation
really is a snap, but it does write to your PATH variable (and
maybe EQ_LIBRARY_PATH -- but maybe I did that myself). So maybe
the installation on that stick won't work on another machine.
What I like to do is to create a new command prompt and point it
at a new *.BAT file. Here is one for 32-bit gfortran:

@echo off
Title Build environment for 32-bit gfortran equation solutions
set
path=C:\gcc_equation32\bin;C:\gcc_equation32\libexec\gcc\i386-pc-mingw32\4.5.0;%path%
set EQ_LIBRARY_PATH=C:\gcc_equation32\i386-pc-mingw32\lib;%EQ_LIBRARY_PATH%

If you put such a command prompt and Shortcut.bat file on your
thumb drive then I would give it a better chance of working when
plugged in to another random (Windows) computer. You could test
this by taking your thumb drive to a coffeeshop and borrowing
anyone's laptop. Mmmm... but how do you know the drive letter for
your thumb drive on the computer you are going to plug it in to?
I'm sure there's a solution, but it might make the Shortcut.bat
file a bit more complicated.

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end


Jason Blevins

unread,
Mar 15, 2010, 2:04:01 PM3/15/10
to
On 2010-03-15, Tobias Burnus <bur...@net-b.de> wrote:
> Regarding the implementation status of Fortran 2003 and Fortran 2008
> features, see ACM SIGPLAN Fortran Forum
> (http://doi.acm.org/10.1145/1667140.1667145) - or slightly older at
> http://fortranwiki.org/fortran/show/Fortran+2003+status

This was a good opportunity to update this table--something I've been
meaning to do since December:

http://fortranwiki.org/fortran/show/Fortran+2003+status

I was happy to update quite a few entries thanks to your continued
hard work on gfortran, and that of many others!

--
Jason Blevins
Ph.D. Candidate, Department of Economics, Duke University
http://jblevins.org/

Gabor

unread,
Mar 15, 2010, 2:17:17 PM3/15/10
to

This is a really useful table !
Could someone add a column for the Portland Fortran compiler ?

user1

unread,
Mar 15, 2010, 2:55:41 PM3/15/10
to
James Van Buskirk wrote:

> If you put such a command prompt and Shortcut.bat file on your
> thumb drive then I would give it a better chance of working when
> plugged in to another random (Windows) computer. You could test
> this by taking your thumb drive to a coffeeshop and borrowing
> anyone's laptop. Mmmm... but how do you know the drive letter for
> your thumb drive on the computer you are going to plug it in to?
> I'm sure there's a solution, but it might make the Shortcut.bat
> file a bit more complicated.
>


Don't know the thumb drive letter.

I keep a setpath.bat file on the thumbdrive, open a brand new cmd.exe,
and run the bat file on the thumb drive before doing anything else.

something like "d:\gcc443\bin\setpath.bat d" if the thumbdrive is drive
letter d.

There still must be a neater way.

--------------------------------------------------------------------------

@echo off

set path=%1:\gcc443\bin;%1:\gcc443\libexec\gcc\i386-pc-mingw32\4.4.3;%path%
set EQ_LIBRARY_PATH=%1:\gcc443\i386-pc-mingw32\lib


Luka Djigas

unread,
Mar 15, 2010, 3:23:06 PM3/15/10
to
On Sun, 14 Mar 2010 17:30:56 -0700, nos...@see.signature (Richard Maine) wrote:

>Luka Djigas <ldigas@___gmail___.com> wrote:
>
>> GNU corporation always leaves me baffled with their approach to simplicity.
>
>Well, if you think that GNU is a corporation, it is indeed likely to
>bafflle you. :-( It isn't.

Of course,
but you have to let me have a little fun in the process.

MS vs. GNU:
MS GNU
- have funny looking leader check check
- their licences are a pain to understand check check
- have an army of followers check check
- probably will take over the world someday check check
- billion dollars funding check ... aww, crap :-(

-- Luka

Luka Djigas

unread,
Mar 15, 2010, 3:43:37 PM3/15/10
to
On Mon, 15 Mar 2010 07:53:34 -0700 (PDT), Paul Thomas <paul.rich...@gmail.com> wrote:

>Out of curiosity, during an extremely boring meeting, I downloaded and
>extracted the equation.com gcc-4.5.0 snapshot package onto a memory
>stick. I thought that this would be a good test because I have
>absolutely no administrator rights on my work laptop :-)

Not even gonna ask why ...

>
>It worked perfectly. I tried compiling and running a few progams and
>encountered no problems. One nice feature of this package is that it,
>as well as gcc, gfortran and g++, comes with all sorts of bits and
>pieces like gdb, make etc..
>
>http://www.equation.com/servlet/equation.cmd?call=fortran
>

Indeed. Apart from the difference that I tried the Windows port from gfortran's download page, it
worked without errors. A PATH here and there, but those can hardly be mentioned as "problems".

I'm interested though. (saw it a few times but never looked into it). That www.equation.com above -
they develop a parallel branch of compilers, or have I misunderstood something from their page ?
What is their motivation for doing so ?
I see they're very hardy on the updates, so ...


Btw, the meeting went relatively well ... in short, it was mostly about presenting some
newer fortran features and their comparison to some of the more recent computational systems
(mathcad and matlab, specifically) in regards to should some newer features on some actively used,
but not so actively developed, applications be written in fortran (newer one>f90) or should we start
messing with mixed language combinations fortran/matlab/mathcad - (I've no idea how this last/first
combination's supposed to work) in which some of the newer comers are more comfortable. Their main
objective, as so many times before, is that they still have f77 in their mindset.

-- Luka

>Regards
>
>Paul Thomas

Luka Djigas

unread,
Mar 15, 2010, 3:57:13 PM3/15/10
to


Indeed.

fortranwiki is coming along nicely (looking at the "recently" page, I see Jason is doing his bit
above and beyond the call of duty !!)
The last time I visited it, I thought it was rather ascetic, and that it would never live.
But now, I'm pleasantly suprised it is not so. Will definitely be visiting it more in the future.

One suggestion though. It is purely a esthetic issue, but wouldn't it maybe be a good idea, if the
cells in the table which contain "Y" be colored green, and the ones "N" red (or whatever
combination). Simply as to provide a more easier to look at viewpoint. One easily gets lost in the
columns/rows. (the thing that fortran drastically needs is visuality in its image).

-- Luka

Luka Djigas

unread,
Mar 15, 2010, 3:59:15 PM3/15/10
to
On Mon, 15 Mar 2010 20:43:37 +0100, Luka Djigas <ldigas@___gmail___.com> wrote:

>objective, as so many times before, is that they still have f77 in their mindset.

replace: objective --> problem

Sjouke Burry

unread,
Mar 15, 2010, 4:21:23 PM3/15/10
to
James Van Buskirk wrote:
> "Paul Thomas" <paul.rich...@gmail.com> wrote in message
> news:5f1e1e90-a716-4b3c...@g19g2000yqe.googlegroups.com...
>
>> Out of curiosity, during an extremely boring meeting, I downloaded and
>> extracted the equation.com gcc-4.5.0 snapshot package onto a memory
>> stick. I thought that this would be a good test because I have
>> absolutely no administrator rights on my work laptop :-)
>
>> It worked perfectly. I tried compiling and running a few progams and
>> encountered no problems. One nice feature of this package is that it,
>> as well as gcc, gfortran and g++, comes with all sorts of bits and
>> pieces like gdb, make etc..
>
>> http://www.equation.com/servlet/equation.cmd?call=fortran
>
> The www.equation.com package is the most usable of the Windows x64
> ones (g95 doesn't have a Windows x64 version), and installation
> really is a snap, but it does write to your PATH variable (and
> maybe EQ_LIBRARY_PATH -- but maybe I did that myself). So maybe
> the installation on that stick won't work on another machine.
> What I like to do is to create a new command prompt and point it
> at a new *.BAT file. Here is one for 32-bit gfortran:
>
> @echo off
> Title Build environment for 32-bit gfortran equation solutions
> set
> path=C:\gcc_equation32\bin;C:\gcc_equation32\libexec\gcc\i386-pc-mingw32\4.5.0;%path%
> set EQ_LIBRARY_PATH=C:\gcc_equation32\i386-pc-mingw32\lib;%EQ_LIBRARY_PATH%

Out of curiosity, I installed the pack in your suggested
C directory.
I am only used to MS forten 5.1 on dos, so do you have a
"hello world" kind of program with batch or make example to
compile/link? Just to get started, here or email(replace nulnulfour,
and remove double letters in last part).

steve

unread,
Mar 15, 2010, 4:30:56 PM3/15/10
to
On Mar 15, 2:43 pm, Luka Djigas <ldigas@___gmail___.com> wrote:

> On Mon, 15 Mar 2010 07:53:34 -0700 (PDT), Paul Thomas <paul.richard.tho...@gmail.com> wrote:
> >It worked perfectly.  I tried compiling and running a few progams and
> >encountered no problems.  One nice feature of this package is that it,
> >as well as gcc, gfortran and g++, comes with all sorts of bits and
> >pieces like gdb, make etc..
>
> >http://www.equation.com/servlet/equation.cmd?call=fortran
>
> Indeed. Apart from the difference that I tried the Windows port
> from gfortran's download page, it worked without errors. A PATH
> here and there, but those can hardly be mentioned as "problems".
>
> I'm interested though. (saw it a few times but never looked
> into it). That www.equation.com above - they develop a parallel
> branch of compilers, or have I misunderstood something from
> their page ?

AFAIK, Equation.com replaced libgomp, the threaded library for OpenMP
support, by their own proprietary version. They may have made
other changes to the compiler, but they haven't released anything
back to GCC if they have.

> What is their motivation for doing so ?

You would need to ask someone at equation.com. Based on their
statement "Binaries distributed at this site are a variant of GCC.
Distributions of Equation Solution have indepentent settings." You
can request the source code that they used to build their binaries,
but don't hold your breath.

--
steve


Jason Blevins

unread,
Mar 15, 2010, 5:22:14 PM3/15/10
to
On 2010-03-15, Luka Djigas <ldigas@___gmail___.com> wrote:
>
>>On Mar 15, 7:04 pm, Jason Blevins <jrble...@sdf.lonestar.org> wrote:
>>> This was a good opportunity to update this table--something I've been
>>> meaning to do since December:
>>>
>>> http://fortranwiki.org/fortran/show/Fortran+2003+status
>
> One suggestion though. It is purely a esthetic issue, but wouldn't it maybe
> be a good idea, if the cells in the table which contain "Y" be colored
> green, and the ones "N" red (or whatever combination). Simply as to provide
> a more easier to look at viewpoint. One easily gets lost in the
> columns/rows. (the thing that fortran drastically needs is visuality in its
> image).

Good idea. I had to convert the table from Markdown to HTML,
which will make it slightly more difficult to edit, but visually
I think the result is very nice. Thanks for the suggestion.

James Van Buskirk

unread,
Mar 15, 2010, 11:33:35 PM3/15/10
to
"user1" <us...@example.net> wrote in message
news:hnlvrf$kio$1...@speranza.aioe.org...

> James Van Buskirk wrote:

> --------------------------------------------------------------------------

> @echo off

I poled around a little and found that the thumb drive letter can be
given by %cd:~0,2%

So I followed this procedure to install 32-bit gfortran on a thumb
drive:

Find big enough thumb drive (e.g. 128 MB was too small) and insert
into USB slot.

Start up windows Explorer with <WINDOWS>+E key combination, navigate
to thumb drive root, and clean up root directory. I just created a
new directory call "Backup" and dragged everything into it.

Then create a new directory call gcc_eq32 in the root directory.

Start Internet Explorer and go to www.equation.com, click on the
Programming Tools link, then the Fortran,C,C++ link and scroll
down to Download: Weekly Snapshot, and click on the link to
download the 32-bit snapshot. When the little window pops up
and asks if you want to run of save, click on Save and navigate
to your thumb drive and the gcc_eq32 directory, then click on
Save.

Now back in Windows Explorer, navigate to the gcc_eq32
directory and double-click the installation executable that
you just downloaded. Accept the terms, and in the next
dialog box click on browse and browse to the gcc_eq32
directory. Click OK but delete the extra \gcc in the
installation directory name, then click on Install.

After installation, you need a couple of extra things to
make this work cleanly. First, select your gcc_eq32
directory in Windows Explorer and from the menu bar select
File | New | Text document. Change the name to Shortcut.bat,
right-click on the file and select Edit from the drop-down
menu. Paste in this stuff:

@echo off
Title Build environment for 32-bit gfortran equation solutions
set

path=%cd:~0,2%\gcc_eq32\bin;%cd:~0,2%\gcc_eq32\libexec\gcc\i686-pc-mingw32\4.5.0;%path%
set EQ_LIBRARY_PATH=%cd:~0,2%\gcc_eq32\i686-pc-mingw32\lib;%EQ_LIBRARY_PATH%
cd %cd:~0,2%\gcc_eq32

(correct any line wraps above) and then exit Notepad, saving the file.

Next, start up another instance of Windows Explorer and using the
right mouse button, drag and drop C:\WINDOWS\system32\cmd.exe to the
root directory of your thumb drive and select Create Shortcut from
the drop down menu. Right-click on the shortcut, select Properties,
and under the General tab change the name to
Command Prompt for 32-bit gfortran
Under the shortcut tab, change the target to
C:\WINDOWS\system32\cmd.exe /K %cd:~0,2%\gcc_eq32\Shortcut.bat
Change Start in to
%cd:~0,2%\gcc_eq32
And under the Options tab, make sure that QuickEdit mode
and Insert mode are checked. Click on OK, and you should have
a working thumb drive installation.

So now I tried starting up Windows Explorer, and from there
double-click the Command Prompt for 32-bit gfortran and got the
following session:

F:\gcc_eq32>dir
Volume in drive F has no label.
Volume Serial Number is 15FC-004D

Directory of F:\gcc_eq32

03/15/2010 07:35 PM <DIR> .
03/15/2010 07:35 PM <DIR> ..
03/15/2010 07:36 PM 28,969,812 gcc-4.5-20100311-32.exe
03/15/2010 07:39 PM <DIR> bin
03/15/2010 07:41 PM <DIR> i686-pc-mingw32
03/15/2010 07:44 PM <DIR> include
03/15/2010 07:45 PM <DIR> lib
03/15/2010 07:47 PM <DIR> libexec
03/15/2010 07:49 PM <DIR> share
03/15/2010 08:20 PM 269 Shortcut.bat
2 File(s) 28,970,081 bytes
8 Dir(s) 971,669,504 bytes free

F:\gcc_eq32>type Shortcut.bat


@echo off
Title Build environment for 32-bit gfortran equation solutions
set

path=%cd:~0,2%\gcc_eq32\bin;%cd:~0,2%\gcc_eq32\libexec\gcc\i686-pc-mingw32\4
.5.0;%path%
set EQ_LIBRARY_PATH=%cd:~0,2%\gcc_eq32\i686-pc-mingw32\lib;%EQ_LIBRARY_PATH%
cd %cd:~0,2%\gcc_eq32

F:\gcc_eq32>cd ..

F:\>dir
Volume in drive F has no label.
Volume Serial Number is 15FC-004D

Directory of F:\

05/31/2008 02:24 PM <DIR> Backup
03/15/2010 07:35 PM <DIR> gcc_eq32
03/15/2010 07:35 PM <DIR> gcc_eq64
03/15/2010 08:19 PM 811 Command Prompt for 32-bit
gfortran.lnk
03/15/2010 08:19 PM 811 Command Prompt for 64-bit
gfortran.lnk
03/15/2010 08:50 PM <DIR> examples
2 File(s) 1,622 bytes
4 Dir(s) 971,669,504 bytes free

F:\>cd examples

F:\examples>dir
Volume in drive F has no label.
Volume Serial Number is 15FC-004D

Directory of F:\examples

03/15/2010 08:50 PM <DIR> .
03/15/2010 08:50 PM <DIR> ..
03/15/2010 08:52 PM 99 test1.f90
03/15/2010 08:54 PM 1,030,117 test1.exe
2 File(s) 1,030,216 bytes
2 Dir(s) 971,669,504 bytes free

F:\examples>del *.exe

F:\examples>gfortran -v
Built by Equation Solution <http://www.Equation.com>.
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=f:/gcc_eq32/bin/../libexec/gcc/i686-pc-mingw32/4.5.0/lto-wra
pper.exe
Target: i686-pc-mingw32
Configured with:
../gcc-4.5-20100311-mingw/configure --host=i686-pc-mingw32 --bu
ild=x86_64-unknown-linux-gnu --target=i686-pc-mingw32 --prefix=/home/gfortran/gc
c-home/binary/mingw32/native/x86_32/gcc/4.5-20100311 --with-gcc --with-gnu-ld
--
with-gnu-as --disable-shared --disable-nls --disable-tls --with-gmp=/home/gfortr
an/gcc-home/binary/mingw32/native/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home
/binary/mingw32/native/x86_32/mpfr --with-mpc=/home/gfortran/gcc-home/binary/min
gw32/native/x86_32/mpc --enable-languages=c,fortran,c++ --with-sysroot=/home/gfo
rtran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.5-20100311 --enable-libgomp
--e
nable-threads=win32 --disable-win32-registry
Thread model: win32
gcc version 4.5.0 20100311 (experimental) (GCC)

F:\examples>type test1.f90
program test1
implicit none
write(*,*) 'Hello, world ',gamma(0.5d0)**2
end program test1

F:\examples>gfortran test1.f90 -otest1

F:\examples>test1
Hello, world 3.1415926535897936

F:\examples>

While I was at it, I also installed the 64-bit gfortran from
www.equation.com under the gcc_eq64 directory. The Command Prompt
for 64-bit gfortran shortcut had a different name, of course, and
also the target was changed to
C:\WINDOWS\system32\cmd.exe /K %cd:~0,2%\gcc_eq64\Shortcut.bat
And Start In was changed to
%cd:~0,2%\gcc_eq64
and the gcc_eq64\Startup.bat file was changed a little, too.

Sample session:

F:\gcc_eq64>dir
Volume in drive F has no label.
Volume Serial Number is 15FC-004D

Directory of F:\gcc_eq64

03/15/2010 07:35 PM <DIR> .
03/15/2010 07:35 PM <DIR> ..
03/15/2010 07:38 PM 37,500,044 gcc-4.5-20100311-64.exe
03/15/2010 08:49 PM 273 Shortcut.bat
03/15/2010 08:22 PM <DIR> bin
03/15/2010 08:24 PM <DIR> include
03/15/2010 08:25 PM <DIR> lib
03/15/2010 08:26 PM <DIR> libexec
03/15/2010 08:29 PM <DIR> share
03/15/2010 08:30 PM <DIR> x86_64-pc-mingw32
2 File(s) 37,500,317 bytes
8 Dir(s) 971,931,648 bytes free

F:\gcc_eq64>type Shortcut.bat
@echo off
Title Build environment for 64-bit gfortran equation solutions
set
path=%cd:~0,2%\gcc_eq64\bin;%cd:~0,2%\gcc_eq64\libexec\gcc\x86_64-pc-mingw32
\4.5.0;%path%
set
EQ_LIBRARY_PATH=%cd:~0,2%\gcc_eq64\x86_64-pc-mingw32\lib;%EQ_LIBRARY_PATH%
cd %cd:~0,2%\gcc_eq64

F:\gcc_eq64>cd ..

F:\>dir
Volume in drive F has no label.
Volume Serial Number is 15FC-004D

Directory of F:\

05/31/2008 02:24 PM <DIR> Backup
03/15/2010 07:35 PM <DIR> gcc_eq32
03/15/2010 07:35 PM <DIR> gcc_eq64
03/15/2010 08:19 PM 811 Command Prompt for 32-bit
gfortran.lnk
03/15/2010 08:19 PM 811 Command Prompt for 64-bit
gfortran.lnk
03/15/2010 08:50 PM <DIR> examples
2 File(s) 1,622 bytes
4 Dir(s) 971,931,648 bytes free

F:\>cd examples

F:\examples>dir
Volume in drive F has no label.
Volume Serial Number is 15FC-004D

Directory of F:\examples

03/15/2010 08:50 PM <DIR> .
03/15/2010 08:50 PM <DIR> ..
03/15/2010 08:52 PM 99 test1.f90
03/15/2010 09:27 PM 780,247 test1.exe
2 File(s) 780,346 bytes
2 Dir(s) 971,931,648 bytes free

F:\examples>del *.exe

F:\examples>gfortran -v
Built by Equation Solution <http://www.Equation.com>.
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=f:/gcc_eq64/bin/../libexec/gcc/x86_64-pc-mingw32/4.5.0/lto-w
rapper.exe
Target: x86_64-pc-mingw32
Configured with:
../gcc-4.5-20100311-mingw/configure --host=x86_64-pc-mingw32 --
build=x86_64-unknown-linux-gnu --target=x86_64-pc-mingw32 --prefix=/home/gfortra
n/gcc-home/binary/mingw32/native/x86_64/gcc/4.5-20100311 --with-gmp=/home/gfortr
an/gcc-home/binary/mingw32/native/x86_64/gmp --with-mpfr=/home/gfortran/gcc-home
/binary/mingw32/native/x86_64/mpfr --with-mpc=/home/gfortran/gcc-home/binary/min
gw32/native/x86_64/mpc --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cro
ss/x86_64/gcc/4.5-20100311 --with-gcc --with-gnu-ld --with-gnu-as --disable-shar
ed --disable-nls --disable-tls --enable-libgomp --enable-languages=c,fortran,c++
--enable-threads=win32 --disable-win32-registry
Thread model: win32
gcc version 4.5.0 20100311 (experimental) (GCC)

F:\examples>gfortran test1.f90 -otest1

F:\examples>test1
Hello, world 3.1415926535897936

F:\examples>

Well, that worked for me. Are you having any problems with this
procedure?

Sjouke Burry

unread,
Mar 16, 2010, 12:43:48 AM3/16/10
to
James Van Buskirk wrote:
> "user1" <us...@example.net> wrote in message
cut
>
I was missing the -otest1 piece for the executable,
not used to that,and got an a.exe.

Thanks. :)


output:

double precision x/5d0/
x=4d0*atan(1d0)
print '("hello world")'
print '(1f10.8)',x
end

C:\test>gfortran hello.for -ohello

C:\test>hello
hello world
3.14159265

C:\test>

glen herrmannsfeldt

unread,
Mar 16, 2010, 1:07:20 AM3/16/10
to
James Van Buskirk <not_...@comcast.net> wrote:
(snip)


> I poled around a little and found that the thumb drive letter can be
> given by %cd:~0,2%

As far as I can tell, that gives the disk that the current
directory is on. I suppose that is useful, but cd \ will
also change to the root of the current disk.

-- glen

Gib Bogle

unread,
Mar 16, 2010, 4:41:59 AM3/16/10
to

hello.f90:

write(*,*) 'Hello world'
end

>gfortran hello.f90 -o hello.exe

Sjouke Burry

unread,
Mar 16, 2010, 11:27:31 AM3/16/10
to
Gib Bogle wrote:
> Sjouke Burry wrote:
cut

>> Out of curiosity, I installed the pack in your suggested
>> C directory.
>> I am only used to MS forten 5.1 on dos, so do you have a
>> "hello world" kind of program with batch or make example to
>> compile/link? Just to get started, here or email(replace nulnulfour,
>> and remove double letters in last part).
>
> hello.f90:
>
> write(*,*) 'Hello world'
> end
>
> >gfortran hello.f90 -o hello.exe

Thanks.

Phred Phungus

unread,
Mar 16, 2010, 6:11:07 PM3/16/10
to

I don't think this is a very nuanced comparison of gnu software and MS.
For example, how could they both take over the world?

Anyways, I've used both g95 and gfortran on a memory stick before. It
can be the cure for a boring party (find a computer and plug in) and can
outlive the OS when it crashes (windows being windows).

If you go with gfortran, you can ask a question here and get advice from
implementors. Andy Vaught, the g95 guy, is reachable by e-mail, but you
wouldn't want to do that for casual questions. You can buy him a beer
off his website, however, and he might pay special attention to your
concerns.

Let me recommend that you go with one or the other. The installation of
both was never a good thing on my machine. YMMV.

Cheers,
--
fred

Phred Phungus

unread,
Mar 17, 2010, 12:08:43 AM3/17/10
to
FX wrote:

> But I only follow development of gfortran from far away, nowadays, so
> I'll let others comment.

"Nowadays" hasn't been a sufficiently-large number of days that you are
some distant, Einsteinian observer. Maybe 250?


>
> (PS: Looking at the website, it seems like g95 development is slow these
> days.)
>

I'm a little concerned for Andy. As far as I know, no one has had
contact with him for 6 months. I'm happy to find out that my notions
are parochial.

He said he was traveling, but he has kids, and kids in Arizona go to
school, so the whole thing doesn't make sense to me.

Pommes fritz,
--
fred

FX

unread,
Mar 17, 2010, 5:12:49 AM3/17/10
to
> "Nowadays" hasn't been a sufficiently-large number of days that you are
> some distant, Einsteinian observer. Maybe 250?

More like 560 by my estimate (since 2008-08).

> He said he was traveling, but he has kids, and kids in Arizona go to
> school, so the whole thing doesn't make sense to me.

I remember someone saying that he was buying a home and working on make
it inhabitable (man, a developer who can work with tools?!)

> Pommes fritz,

Don't tempt me!

--
FX

0 new messages