Raj, I will most likely be in a similar situation soon. Were you able to solve this and get a generic build that works on both Intel and AMD? I didn't see a corresponding PR yet...
Markus On 12/01/2017 04:33 PM, Raj Ayyampalayam wrote: > I managed to get it working on both platforms by adding --enable-fat > option to the stage2_stuff GMP configure options in the EB_GCC > easyblock. I will look at the ISL build setting. > > Thanks! > -Raj > > On Fri, Dec 1, 2017 at 3:27 AM Markus Geimer <m.gei...@fz-juelich.de > <mailto:m.gei...@fz-juelich.de>> wrote: > > All, > > > I believe that it's not GCC itself but the auxiliary infrastructure > > components (GMP, MPFR, etc.) that auto-optimize for the build > > architecture. Though I have to recheck the build logs to confirm > > this. > > I've just checked the build logs of GCCcore 6.3.0 and can confirm > that at least the GMP and ISL builds (for 'stage2_stuff') use > platform-dependent '-march' flags... > > Markus > > > > If this is the case, we would need to find a way to convince their > > configure scripts to build generic code, and then adjust the EasyBlock > > accordingly. > > > > Markus > > > > > > On 11/30/2017 05:40 PM, Alvarez, Damian wrote: > >> I do not know why you are experiencing this, but I don’t think > --optarch > >> plays any role here. --optarch=GENERIC will look for the appropriate > >> value for the compiler used, but GCCcore is built on top of > dummy, which > >> doesn’t have any optarch defined. So EB shouldn’t add any > architecture > >> specific bits to GCCcore itself. Packages on top of GCCcore (like > >> binutils) are a different matter. > >> > >> > >> > >> So I’d look more into the details of building GCC per se, not in the > >> details of EB. > >> > >> > >> > >> Just my 2 cents > >> > >> > >> > >> Damian. > >> > >> > >> > >> *From: *<easybuild-requ...@lists.ugent.be > <mailto:easybuild-requ...@lists.ugent.be>> on behalf of Raj Ayyampalayam > >> <ans...@gmail.com <mailto:ans...@gmail.com>> > >> *Reply-To: *"easybuild@lists.ugent.be > <mailto:easybuild@lists.ugent.be>" <easybuild@lists.ugent.be > <mailto:easybuild@lists.ugent.be>> > >> *Date: *Tuesday 28 November 2017 at 21:20 > >> *To: *"easybuild@lists.ugent.be > <mailto:easybuild@lists.ugent.be>" <easybuild@lists.ugent.be > <mailto:easybuild@lists.ugent.be>> > >> *Subject: *[easybuild] Building GCCcore that will run on AMD and > Intel CPU > >> > >> > >> > >> Hello, > >> > >> > >> > >> I am trying to build a the software stack for our new cluster using > >> easybuild. The cluster has older AMD Opterons and new Intel Broadwell > >> based machines. We have been building applications on the AMD > machines > >> and recently realized that they would not run on Intel machines. > >> > >> > >> > >> I read the easybuild docs and tried to use the --optarch=GENERIC > option > >> to build the entire application stack including the toolchains. I am > >> having issues with getting GCCcore to work on both platforms. If we > >> build GCCcore on AMD it does not work on Intel platforms and vice > versa. > >> > >> > >> > >> It seems that the problem lies in the stage2 part of the build. In > >> stage1, the build system type is identified as > x86_64-unknown-linux-gnu > >> and for stage2 it is identified as broadwell-pc-linux-gnu. > >> > >> > >> > >> Am I missing some configuration options or is there a trick to > building > >> GCC for multiple platforms? > >> > >> > >> > >> Thanks, > >> > >> Raj > >> > > -- > Dr. Markus Geimer > Juelich Supercomputing Centre > Institute for Advanced Simulation > Forschungszentrum Juelich GmbH > 52425 Juelich, Germany > > Phone: +49-2461-61-1773 <tel:+49%202461%20611773> > Fax: +49-2461-61-6656 <tel:+49%202461%20616656> > E-Mail: m.gei...@fz-juelich.de <mailto:m.gei...@fz-juelich.de> > WWW: http://www.fz-juelich.de/jsc > > > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > -- Dr. Markus Geimer Juelich Supercomputing Centre Institute for Advanced Simulation Forschungszentrum Juelich GmbH 52425 Juelich, Germany Phone: +49-2461-61-1773 Fax: +49-2461-61-6656 E-Mail: m.gei...@fz-juelich.de WWW: http://www.fz-juelich.de/jsc