public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Anton Starikov <antst@ifm.liu.se>
To: gentoo-dev@lists.gentoo.org, gentoo-science@lists.gentoo.org
Subject: [gentoo-dev] ifc USE flag, fortran support and some general notes about multi-compiler support
Date: Wed, 25 Aug 2004 22:06:38 +0200	[thread overview]
Message-ID: <412CF14E.7040106@ifm.liu.se> (raw)

Hi!

Recently there was added "ifc" flag to support Intel Fortran Compiler. 
And few ebuilds already take it into account. But...

1) Mainly it corresponds to some scientific libraries and programs. And 
I guess that not 99% of such users use ifc. What about ones who use 
Absoft, Lahey Fujitsu, Portland Group and so on? I guess IFC didn't take 
99% of market yet. Because other companies still alive. :)  Moreover, 
AFAIK a lot of people prefer different compilers because IFC still has 
some compatibility problems with complicated codes. Which can be 
compiled without problems with Absoft or Lahey, for example.

2) Optimization flags. I've take a short look at some ebuilds which use 
IFC and ICC flags. Mostly they have hard-encoded into ebuilds 
optimization flags. Which also doesn't seems to be really brilliant 
idea. Of course, some of them check IFCFLAGS and ICCFLAGS environment 
variables...but it is not common, and it is less portable from pint of 
view of different compilers.

OK, partly you can solve such problems with setting some environment 
variables, like F77 and so on. But...it not looks like a really gentoo 
solution, it is not really reliable solution (for example blas-atlas 
will just ignore it, AFIR) and so on.

So, probably there is some need to make some kind of redesign of the 
idea. OK, for C and C++ it is not so important probably, because there 
is not such big choice and anyway mostly you would prefer GCC, and if 
you want, support for icc and tiny-cc here already.

Situation with Fortran just looks a bit more complicated. And different 
from C world.

So, has it sense to think about implementing some abstract 
multi-compiler support? at least for Fortran guys.
But generally, probably, it could be just let say "minor compiler 
support", which means, for C and F you still have gcc and g77 (gfortran 
in future)  as a main compiler of the system, but you can also choose 
some kind of minor compiler. Now it almost work in such way with ICC.
ICC behaves just as some kind of minor compiler and some software that 
can be compiled with ICC will be compiled with icc.

This idea "of minor compiler support" could be also interesting for 
different applications. For example, hypothetic situation: I have SPARC 
with Solaris. I'm not going to completely change my OS, but, probably, I 
would like to take advantages of gentoo portage  also. And probably I 
would like to choose second compiler (SUN compiler of course), which 
will be used for compilation of some stuff that can be compiled with it.
And, if software use automake and autoconf, it probably will be compiled 
without real troubles.

It basically looks very interesting and not such hypothetic, because 
anyway nowadays you fill your Solaris box (or Irix box) with incredible 
amount of GNU stuff, if you want to have some comfort :) And, I guess, 
portage can be really, easy adopted to that. OK, it couldn't be in 
mainstream. But...if, let say, you have 300 Solaris clients and ppl 
whant to use a really a LOT of different stuff, either you compile 
program by program by yourself and put in on a servers into shared /usr 
folder (or whatevere else), or you just force portage think that you 
have gentoo and portage do you job for you and just go and drink coffe 
:) Thats real example.


Of course, there is two ways to implement this.
One - it's just to add more and more USE flags for different compilers. 
it is some kind of clean way with granted result, if you ebuild support 
this compiler which you have in USE flags...but...
I guess, at least in case of Fortran. ebuild that can be compiled with 
ANY Fortran compiler wail NEVER check for all these flags, because for 
such behavior ebuild should be tested with ALL these compilers, reported 
that it works  and submitted a patch for ebuild for particular compiler. 
That practically probably never will be happen :)

But almost for sure a lot of software will be compiled without any 
problems with most of major Fortran compiler. And even with almost any 
widely spread C compilers. Especially if it case of scientific software.
I really can't imaging situation, when MPICH will not compile itself and 
will not compile F90 interface with any non-exotic compiler. I've just 
never meet such situation. :)

One more thing. Lets imaging that next month on market will be available 
one more C++ or Fortran compiler, which really excellent :) Most of 
software can be build with it...but... it will take long time to add 
more flag to USE, change all ebuilds with it and so on.

So, there is coming in mind some idea of different approach. Transparent 
  level of multicompiler support. OK, it is not granted. 
But...scientific guys use to live in not granted world :)
It probably looks like:
1) You have two more flags: "altcc" and "altfc"
2) somewhere (in make.conf for ex) you have specify :
ALTCC=C-compiler-which-I-really-like
ALTCXX=C++-compiler-which-I-really-like
ALTF77=F77-compiler-which-I-really-like
ALTF90=F90-compiler-which-I-really-like
ALTCFLAGS="optimize-it-to-make-a-rocket"
ALTF77LAGS="optimize-it-to-make-a-rocket"

and thats all.
Ebuild just check for "altcc" and "altfc" flags in USE, if they are, it 
force configure or whatever else to use it. Thats done. Of course you 
can't be sure that it will be compiled on all possible alternative 
compilers, but you can try :)

And it make your life really flexible. You do can what you want. Thats 
Gentoo philosophy, I guess :)

It just a general talk, don't kick me if I'm wrong :)

Anton Starikov

--
gentoo-dev@gentoo.org mailing list


             reply	other threads:[~2004-08-25 20:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 20:06 Anton Starikov [this message]
2004-08-25 20:25 ` [gentoo-dev] ifc USE flag, fortran support and some general notes about multi-compiler support Donnie Berkholz
2004-08-25 20:28   ` Donnie Berkholz
2004-08-25 21:26     ` Anton Starikov
2004-08-25 22:59       ` Donnie Berkholz
2004-08-26  0:31         ` Anton Starikov
2004-08-26  0:47         ` Anton Starikov
2004-08-25 21:12   ` Anton Starikov
2004-08-25 23:46 ` Olivier Fisette
2004-08-26  0:37   ` Anton Starikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=412CF14E.7040106@ifm.liu.se \
    --to=antst@ifm.liu.se \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=gentoo-science@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox