gfortran for puppy 4.1

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
lluamco
Posts: 208
Joined: Fri 16 Mar 2007, 09:10
Location: Banyoles, Spain

gfortran for puppy 4.1

#1 Post by lluamco »

Puppy 4.x series do not include fortran in the devx_4xx.sfs official files.

I have compiled gfortran-4.2.2 and make it available in two forms.

1. devx_with_fortran_410.sfs is a replacement for the official devx_410.sfs for puppy 4.1 which includes gfortran. It can be obtained in
http://puppyisos.org/files/sfs/Puppy-4.1
The above url requires username and passwd. Please get them in
http://murga-linux.com/puppy/viewtopic. ... 141#196141

2. gfortran-4.2.2.pet is a pet-package for those who prefer to use the official devx_410.sfs
file and willing to add fortran as a pet install. Notice that in order to use gfortran,
the devx_410.sfs should be active! The pet is NOT to be used as standalone program.
Get it at
http://dotpups.de/puppy4/dotpups/Progra ... -4.2.2.pet
or, alternatively
http://puppyfiles.ca/dotpupsde/puppy4/d ... -4.2.2.pet

carolus
Posts: 128
Joined: Wed 14 Feb 2007, 21:54

Re: gfortran for puppy 4.1

#2 Post by carolus »

lluamco wrote: gfortran-4.2.2.pet is a pet-package for those who prefer to use the official devx_410.sfs
file and willing to add fortran as a pet install.
Is it correct to presume that the pet package can be used with all versions of Puppy 4 (now up to 4.1.2)?

JohnRoberts
Posts: 145
Joined: Thu 30 Nov 2006, 00:04
Location: Greece

#3 Post by JohnRoberts »

Just from curiosity, can you layout (if it's not too complicated)
some instructions on how to compile gfortran?
Help M$ become a Linux distro maintainer...
Force-feed them with Open-Source faster than they can produce patents

lluamco
Posts: 208
Joined: Fri 16 Mar 2007, 09:10
Location: Banyoles, Spain

Re: gfortran for puppy 4.1

#4 Post by lluamco »

carolus wrote: Is it correct to presume that the pet package can be used with all versions of Puppy 4 (now up to 4.1.2)?
Yes. At least it works for Puppy 4.1.1. Please confirm it if you try for Puppy 4.1.2.

lluamco
Posts: 208
Joined: Fri 16 Mar 2007, 09:10
Location: Banyoles, Spain

#5 Post by lluamco »

JohnRoberts wrote:Just from curiosity, can you layout (if it's not too complicated)
some instructions on how to compile gfortran?
I do not remember exactly all steps. If my memory does not fail, I needed to install first
gmp-4.1.4 and mpfr-2.2.1. Then I compiled gcc, with these
configure options (given by executing gfortran -v):

Code: Select all

Configured with: ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include --infodir=/usr/info --mandir=/usr/man --sysconfdir=/etc --localstatedir=/var --disable-debug --without-libpam --without-pam --disable-libpam --disable-pam --host=i486-t2-linux-gnu --enable-__cxa_atexit --disable-checking --disable-bootstrap --disable-libstdcxx-pch --disable-multilib --enable-languages=c,c++,fortran --disable-libmudflap
Finally, I searched for the fortran specific files and/or libraries and build the pet from those.
I hope that helps.
Lluis

carolus
Posts: 128
Joined: Wed 14 Feb 2007, 21:54

Re: gfortran for puppy 4.1

#6 Post by carolus »

lluamco wrote: At least it works for Puppy 4.1.1. Please confirm it if you try for Puppy 4.1.2.
Not so easy to check, since I'm still using Puppy 2.16 on the principle "if it ain't broke, don't upgrade". I'm running fortran in a linux programming environment by means of the Cygwin linux emulator, which also ain't broke. So the most checking I could do in Puppy is "hello fortran-user". I'm still using g77, but have tried a few makefiles with gfortran and found them to work simply by changing the name of the compiler. My benchmarks (all debugging tools enabled) run faster with gfortran.

Many thanks for providing the gfortran pet package, which I'll add to my toolkit as a potentially useful option.

JohnRoberts
Posts: 145
Joined: Thu 30 Nov 2006, 00:04
Location: Greece

#7 Post by JohnRoberts »

Not so easy to check indeed!!! I have been baffled the entire weekend
trying to port a piece of code (~600 lines) - originally written in D.E.C. F77
to gcc. Running the same program in XP gives normal results, running
in Linux with gcc gives really strange results... :roll:
Help M$ become a Linux distro maintainer...
Force-feed them with Open-Source faster than they can produce patents

carolus
Posts: 128
Joined: Wed 14 Feb 2007, 21:54

#8 Post by carolus »

JohnRoberts wrote:Not so easy to check indeed!!! I have been baffled the entire weekend
trying to port a piece of code (~600 lines) - originally written in D.E.C. F77
to gcc. Running the same program in XP gives normal results, running
in Linux with gcc gives really strange results... :roll:
The folks at newsgroup comp.lang.fortran are very helpful with this sort of problem, but they will want you to be quite explicit about which compilers you are using and what the "strange results" are, and would prefer that you illustrate your problem with a code snippet smaller than the whole 600 lines.

DEC f77 for VMS was the best-ever compiler for scrounging other people's code because it would compile almost any dialect of fortran that had ever been created, as well as its own nonstandard extensions. It would not surprise me if you have some nonstandard features in your code. It could be that the Windows compiler you are using happens to support them.

If the "gcc" compiler you are using happens to be lluamco's gfortran package, then I suppose it would not be too far off-topic for you to describe the "strange results" in this forum. Anyway, I'm curious.

elraven
Posts: 82
Joined: Wed 04 Apr 2007, 03:20
Location: wnc-usa

gfortran

#9 Post by elraven »

just drop'n a line to let you know its working on my 4.2 rc2 puppy.

elraven

JohnRoberts
Posts: 145
Joined: Thu 30 Nov 2006, 00:04
Location: Greece

#10 Post by JohnRoberts »

carolus wrote: The folks at newsgroup comp.lang.fortran are very helpful with this sort of problem, but they will want you to be quite explicit about which compilers you are using and what the "strange results" are, and would prefer that you illustrate your problem with a code snippet smaller than the whole 600 lines.

DEC f77 for VMS was the best-ever compiler for scrounging other people's code because it would compile almost any dialect of fortran that had ever been created, as well as its own nonstandard extensions. It would not surprise me if you have some nonstandard features in your code. It could be that the Windows compiler you are using happens to support them.

If the "gcc" compiler you are using happens to be lluamco's gfortran package, then I suppose it would not be too far off-topic for you to describe the "strange results" in this forum. Anyway, I'm curious.
Yep everything you mentioned makes sense.
Code has two major sections. First section produces an interpolating cubic spline from a set of data and outputs the spline's coefficients and
the underlying integral per section. Second part calculates vs. X-ordinate the underlying integral and the spline's curvature on a specified number of equi-spaced points along the spline.
Strange thing is that trying the code on gcc x86-64 (opensuse) both
parts work and the whole program executes normally but the integral numbers of section A and all the results of section B do not make sense.
If I try the code on gcc x86 (Puppy, Xandros/Debian on an Eee, etc.)
I get correct numbers for the entire section A, but the program fails on
section B with an arithmetic exception.
No, I haven't tried lluamco's PET, yet. The main powerline cable under the street pavement shorted, and while repairs last, we have extended power-outs. I just managed to try the first possibility and installed Fortran on Dingo using GSlapt. It seems to work Ok, otherwise. Just to list here the steps, I installed:

- gcc
- gcc-gfortran
- mpfr
- gmp

I will definitely get to the bottom of this, even if I have to reinspect the entire code, variable per variable.
Help M$ become a Linux distro maintainer...
Force-feed them with Open-Source faster than they can produce patents

lluamco
Posts: 208
Joined: Fri 16 Mar 2007, 09:10
Location: Banyoles, Spain

May this help?

#11 Post by lluamco »

One thing I had to change in my g77 programs: every appearence of the type

Code: Select all

	write(20,*)
which should read

Code: Select all

   write(20,'(a)')
in order to get sensible outputs using gfortran.

JohnRoberts
Posts: 145
Joined: Thu 30 Nov 2006, 00:04
Location: Greece

#12 Post by JohnRoberts »

:shock: really?
I suspected the culprit would be me using dynamically allocatable
arrays...Would have never guessed write :shock: :shock:
Help M$ become a Linux distro maintainer...
Force-feed them with Open-Source faster than they can produce patents

carolus
Posts: 128
Joined: Wed 14 Feb 2007, 21:54

#13 Post by carolus »

Sounds to me like lluamco's gfortran package is working fine. If anyone wants to pursue the fortran issues, I suggest comp.lang.fortran, where help is generous.

Post Reply