LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Noob attack time [continued] : Intel Compilers under Slackware :-) (http://www.linuxquestions.org/questions/slackware-14/noob-attack-time-%5Bcontinued%5D-intel-compilers-under-slackware-763423/)

Alexvader 10-21-2009 08:16 AM

Noob attack time [continued] : Intel Compilers under Slackware :-)
 
Hi Forum

As I wrote in previous posts, my workhorse apps are not commercia, they are compiled from source, abd they make intensive use of CPU ( some sort of numeric binary aerobics, for hours though... )

Therefore I have three questions to make :

#1) is the GNU toolchain installed by default with Slackware 13 64 ? ( I opted to install everything at install options ...)

#2) Do Slackware supports Fortran compilers and linkers, like F77, g77, gfortran, or must they be installed as third party apps...?

#3) Like most command line geeks around know, since gcc 4.x.x the support for f77/g77 has been discontinued by GNU, in favor of a substitute with full ( oh reaally... ??? Then why does some legacy code will not compile... ??? ) backward compatibility with legacy code ( Most scientific/math libraries from Harwell or Nag... ) called gfortran.

Being a resourceful person, i managed to compile my legacy code with the Development toochain of Intel ( Absoft is way too expensive... ), this "hack" works under *.deb and *.rpm based distros, the *buntus/Debians RHELs/CentOS/Fedoras...

What I do not know is if it works under Slack... They are binaries packed in rpm, that can be converted with alien...

The install script is in charge of creating directories, environment scripts, symlinks, but the core packages are rpm.

Can this be installed in Slackware... ?
... I mean typing ./install.sh and alien does its job without much of a fuss of having to hack the install.sh file...


In multi processor architectures, the speedup can be remarkable, comparing to gcc compiled binaries...


BRGDS


Alex

pixellany 10-21-2009 08:37 AM

Alex;

It is not a good idea to make references to other posts/threads without linking them. Most readers are not going to remember what you are referring to.

Just about any distro includes the GNU utilities (keep in mind that OpenSource predates Linux)

It's GCC that gives you Fortran, etc.---not Slackware.

Quote:

#3) Like most command line geeks around know, since gcc 4.x.x the support for f77/g77 has been discontinued by GNU, in favor of a substitute with full ( oh reaally... ??? Then why does some legacy code will not compile... ??? ) backward compatibility with legacy code ( Most scientific/math libraries from Harwell or Nag... ) called gfortran.
I have no clue what your point is here......

Alexvader 10-21-2009 09:19 AM

Hi Pixellany

Thanks for your answer,

My point here is this : I use several applications that make extensive use of Fortran 77 ( legacy code ), like Dakota, Flash, Fluka, just to name a few...

http://www.fluka.org/fluka.php
http://www.cs.sandia.gov/DAKOTA
http://flash.uchicago.edu/web/

Will they compile under the fortran of gcc shipped in Slackware...? Because i can tell you, they will NOT COMPILE ( I challenge you to verify this ... :-) ) under the most recent versions of gcc ( those that have substituted the F77 compiler and the g77 linker of cgg 3.x by the gfortran of the gcc 4.x version ) ; So although compiling under Debian 4.x or Ubuntu 8.04 LTS, they will fail to do so under Lenny... which gcc ships with gfortran ...

It is gcc that gives me fortran, not slackware... allright, but some gcc will not give me the fortran that i want... :-)

Some code aheres to the Fortran 77 standard, this will compile with g77/f77 but NOT with gfortran, likewise Fortran 95 code will not compile with f77/g77... and in my opinion, it is not a reasonable option to delve into maybe hundreds of thousands of lines of a code which structure i do not know to change the syntax form a standard to another... ( my opinion here... )

So restating my question,

Can I change the gcc of Slackware, ( in case i need to do so ) installing a prevoius version without fearing major incompatibilities... ?

Is my point clear now... ?

Thanks in advance

BRGDS

Alex

Didier Spaier 10-21-2009 09:46 AM

Quote:

Originally Posted by Alexvader (Post 3727224)
Can I change the gcc of Slackware, ( in case i need to do so ) installing a previous version without fearing major incompatibilities... ?

Not easily AFAIK, but I must admit I didn't try.

What you could do in case you want to try a gcc 3.x.x is install Slackware 12.0 which ships with gcc 3.4.6, possibly in a virtual machine ; for instance Virtual Box is easy to install in Slackware 13.

EDIT But you have gcc.fortran-4.3.3 in Slackware 13.0 and Slackware64-13.0 which *should* work, see http://slackware.mirrors.tds.net/pub...3-x86_64-4.txt :

Code:

gcc-gfortran: gcc-gfortran (Fortran support for GCC)
gcc-gfortran:
gcc-gfortran: This package contains those parts of the compiler collection
gcc-gfortran: needed to compile Fortran code.  The base gcc package is also
gcc-gfortran: required.  The GNU Fortran compiler is able to compile nearly all
gcc-gfortran: standard-compliant Fortran 95, Fortran 90, and Fortran 77 programs,
gcc-gfortran: including a number of standard and non-standard extensions, and can
gcc-gfortran: be used on real-world programs.  In particular, the supported
gcc-gfortran: extensions include OpenMP, Cray-style pointers, and several Fortran
gcc-gfortran: 2003 features such as enumeration, stream I/O, and some of the
gcc-gfortran: enhancements to allocatable array support from TR 15581.

So my best bet is to first try this one.

mostlyharmless 10-21-2009 09:58 AM

The version of gcc in Slackware 13, 12 etc. can be found on distrowatch; Slackware 13 has gcc 4.3.3, 12.1 has 4.2.3. I think if you replaced gcc with the old version you'd be in for a world of hurt.

I don't know about the Intel compiler: install it and let us know if it works :)

I presume you tried the -std=legacy or some of the other dialect options and/or -ff2c with gfortran without success. I don't have any other suggestions. :( I agree that it is (1) frustrating that the support for 77 is buggy, (2) that commercial compilers like Absoft have always been so da*ed expensive.

onebuck 10-21-2009 10:04 AM

Hi,

Or the OP could install in VM the OS that worked for the FORTRAN.

The OP is not very versed and seems confused about the current state of OpenSource or GNU.

Quote:

Will they compile under the fortran of gcc shipped in Slackware...? Because i can tell you, they will NOT COMPILE ( I challenge you to verify this ... :-) ) under the most recent versions of gcc ( those that have substituted the F77 compiler and the g77 linker of cgg 3.x by the gfortran of the gcc 4.x version ) ; So although compiling under Debian 4.x or Ubuntu 8.04 LTS, they will fail to do so under Lenny... which gcc ships with gfortran ...
When the OP knows the compiler doesn't provide the means to his/her end but challenges someone to prove otherwise bothers me. To banter on will do no one any good.

The fair way would be to use a 'VM' of choice then install a client system that works for the compiler that produces the desired results. :hattip:

brianL 10-21-2009 10:24 AM

From the sbopkg build log:
Code:

checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes

Does that answer your question?

mostlyharmless 10-21-2009 10:27 AM

Quote:

The fair way would be to use a 'VM' of choice then install a client system that works for the compiler that produces the desired results
The OP wants to use his workhorse apps in his main OS at full speed, not be forced to run them in a VM like retarded Windows apps, so I respectfully disagree.

Alexvader 10-21-2009 10:38 AM

Hi Onebuck

Thanks for your answer,

Let me thank you for your suggestion in using the VM, that had not occured to me before...

#1) Being a newbie in Slackware, I ADMIT, that i am not very versed, and having exhausted any possible ( to my knowledge ... ) means to solve a problem and having failed to do so in other distros, I am ASKING ( like in having a doubt, and implicitly admitting not being very versed ... ) how to do so in Slackware. :-)

#2)I do not KNOW if the compiler provides the means to acheive my goals because of what I explained in #1, all i can state is that to the extent of my attempts it failed to do so so, admitting that my knowledge in this area in unsatisfactory to acheive my goals, i challenged not in a tone of arrogance or banter, but merely to ask someone to prove to me that I am wrong about my statement, and my findings about gcc's ability to do the task i want...

#3) I did not mean to be arrogant or unpolite to anyone in this forum, if I was interpreted this way, I feel sorry about that.

Alex

PS: May I ask the meaning of OP...? Please explain...

Alexvader 10-21-2009 10:40 AM

Hi brianL

This sure answers my questions... :-)

Thanks a lot.

BRGDS

Alex

Alexvader 10-21-2009 10:46 AM

Quote:

Originally Posted by mostlyharmless (Post 3727289)
The OP wants to use his workhorse apps in his main OS at full speed, not be forced to run them in a VM like retarded Windows apps, so I respectfully disagree.

Now you said it all... :-)

SPEED is the main issue here...

BRGDS

Alex

mostlyharmless 10-21-2009 10:59 AM

OP=Original Poster

Alexvader 10-21-2009 11:05 AM

Thank you mostlyharmless :-)

Now for a ( vaguely related ) issue about speed...

I have searched in the web, for Phoronix benchmarks comparing Slackware with other distros, and found nothing...

... I may say that the boot time of Slackware is Light Years faster than the *buntus/Debians or the RHELs...

I know... it depends on the services one enables at boot time in the runlevels if i want it to be faster i only have to edit the /etc/rc.d files... but I am talking about a standard install... Slackware is simply faster...

Do you happen to know of any benchmark using Slacware comparing to other Distros/OSes..?

BRGDS

Alex

mostlyharmless 10-21-2009 11:19 AM

Benchmarks for boot up, or for program run time? I haven't run any recently, but I think they only have validity if you run YOUR code using several different scenarios.

Actually, I wouldn't think program execution would matter on the distro once the kernel and necessary modules and services are installed. Needless to say, if you can, you'd be better off running in init 3 (CLI only), the default in Slackware, rather than in init 4 or from a gui. In fact, I suspect you'd be even a little faster running in init 1 and getting rid of every single other process running that you can.

Lest any of you think that it's silly to run Fortran code in init 1, I quote from one of my favorite books 'Numerical Recipes in C' page 21: "One of the cultural barriers that separates computer scientists from "regular" scientists and engineers is a differing point of view on whether a 30% or 50% loss of speed is worth worrying about."

Alexvader 10-21-2009 11:30 AM

Hi MostlyHarmless,

I was talking more about benchmarks like these... :

http://www.phoronix.com/scan.php?pag...four_way&num=1
http://www.phoronix.com/scan.php?pag..._kubuntu&num=1

Comparing several distros, for instance, ext4 of Slackware 13 is a "plus" in terms of File I/O operations comparing to other filesystems...

So far I found nothing on Slackware on Phoronix's site... Are they afraid of the overwhelming speed advantage ( applications seem to run snappier, pstree seems less cluttered ... ) of Slackware ? :-D

To my subjective feel, it just seems faster...

I wonder when will phoronix run a benhmark over Slack...?

You are absolutely right about that difference in opinion among computer scientists and Engineers in general... :-)


BRGDS

Alex


All times are GMT -5. The time now is 12:35 AM.