Date: Tue, 21 Feb 2017 10:20:58 -0800 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Anton Shterenlikht <mexas@bris.ac.uk> Cc: freebsd-ports@freebsd.org Subject: Re: help build mpich with gcc6 Message-ID: <20170221182058.GA97785@troutmask.apl.washington.edu> In-Reply-To: <201702211815.v1LIFgAr099942@mech-as222.men.bris.ac.uk> References: <201702211815.v1LIFgAr099942@mech-as222.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 21, 2017 at 10:15:42AM -0800, Anton Shterenlikht wrote: > >From mexas Tue Feb 21 15:00:10 2017 > >To: freebsd-ports@freebsd.org > >Subject: help build mpich with gcc6 > >Reply-To: mexas@bris.ac.uk > > > >I added > > > >USE_GCC= 6+ > > > >to net/mpich/Makefile > > > >but it seems this affected only the C and C++ parts: > > > >$ mpichversion > >*skip* > > > >MPICH CC: gcc6 -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc6 -fno-strict-aliasing > >MPICH CXX: g++6 -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc6 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc6 > >MPICH F77: gfortran49 -O -Wl,-rpath=/usr/local/lib/gcc49 > >MPICH FC: gfortran49 -Wl,-rpath=/usr/local/lib/gcc49 > > > >The Fortran parts remained at lang/gcc level. > > > >What settings shall I use to make Fortran components > >built with gfortran6 instead? > > > > I moved one step further. > With > > DEFAULT_VERSIONS=gcc=6 > > in /etc/make.conf > > I get: > > MPICH CC: cc -O2 -pipe -fstack-protector -fno-strict-aliasing > MPICH CXX: c++ -O2 -pipe -fstack-protector -fno-strict-aliasing > MPICH F77: gfortran6 -O -Wl,-rpath=/usr/local/lib/gcc6 > MPICH FC: gfortran6 -Wl,-rpath=/usr/local/lib/gcc6 > That's what I use along with FFLAGS+= -O2 -pipe -march=bdver2 -mtune=bdver2 FFLAGS+= -funroll-loops --param max-unroll-times=4 -ftree-vectorize in /etc/make.conf. You'll, of course, want to set -march and -mtune to your hardware or set them to native. -- Steve 20161221 https://www.youtube.com/watch?v=IbCHE-hONow
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170221182058.GA97785>