> On Jun 25, 2020, at 10:31 AM, Bjørn-Helge Mevik <b.h.me...@usit.uio.no> wrote: > > Signed PGP part > Ryan Novosielski <novos...@rutgers.edu> writes: > >> Hi there, >> >> I initially asked about this on r-help and was told this might be a better >> venue. I’m not really convinced from reading the posting guide, but I’ll >> give it a shot. It was also suggested that the R-Project doesn’t really care >> about building with “non-standard” compilers, but I can’t find any evidence >> of that on the website (indeed, there’s some mention of successful past >> builds, and the build itself is successful). >> >> I built R 4.0.2 with the Intel Parallel Studio XE compiler suite, versions >> 19.0.x to 19.1.1. Build seems to go fine. I built it like this: >> >> module purge >> module load intel/19.1.1 >> module list >> >> export CC=icc >> export CXX=icpc >> export F77=ifort >> export FC=ifort >> export AR=xiar >> export LD=xild >> >> export CFLAGS="-O3 -ipo -qopenmp -axAVX,CORE-AVX2,CORE-AVX512" >> export F77FLAGS="-O3 -ipo -qopenmp -axAVX,CORE-AVX2,CORE-AVX512" >> export FFLAGS="-O3 -ipo -qopenmp -axAVX,CORE-AVX2,CORE-AVX512" >> export CXXFLAGS="-O3 -ipo -qopenmp -axAVX,CORE-AVX2,CORE-AVX512" >> export MKL="-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread" >> >> VERSION=4.0.1 >> >> /scratch/novosirj/install-files/R-${VERSION}/configure --with-blas="$MKL" >> --with-lapack --prefix=/opt/sw/packages/intel-19_1/R-Project/${VERSION} && \ >> make -j32 && make check && make -j32 install > > For what it is worth, we used to build R with the Intel compilers and > MKL on our HPC cluster (on CentOS Linux), and we used the following > setup. Note the comments about -fp-model precise and -ipo. It might no > longer be a problem, but maybe worth checking. > > fast="-ip -O3 -qopt-mem-layout-trans=3 -xHost -mavx" > ## Notes: > ## -static and -ipo break compilation > ## -no-prec-div breaks make check > ## -fp-model precise is needed for make check > ## -wd188 removes a lot of warnings (see R Inst. & Adm. manual) > export CC="icc" > export CFLAGS="$fast -wd188 -fp-model precise" > export F77="ifort" > export FFLAGS="$fast -fp-model precise" > export CXX="icpc" > export CXXFLAGS="$fast -fp-model precise" > export FC="ifort" > export FCFLAGS="$fast -fp-model precise" > > ## This works with intel 2011.10, at least: > BLAS=--with-blas='-mkl=parallel' > LAPACK=--with-lapack > > ## To make the linker find libraries in modules: > export LDFLAGS=$(echo $LD_LIBRARY_PATH | sed 's/^/-L/; s/:/ -L/g') > > ./configure "$BLAS" "$LAPACK" --enable-BLAS-shlib --enable-R-shlib > make -j 8 > make check > make install
Thanks, Bjørn; -ipo no longer breaks compilation (I didn’t specify it, but I see that it was getting added automatically). I was really hoping that "-fp-model precise” (which also implies -prec-div which would seem to affect the other option mentioned) would have an impact on “make check” here, but apparently not. Also -wd188 is no longer required to hide warnings; this doesn’t seem to be happening anymore (but remember it myself from earlier on). I guess it might make sense to check with Intel; we have support. I wish I could remember if this ever worked right, but I don’t think I thought/knew to run "make check" on our older builds. -- ____ || \\UTGERS, |---------------------------*O*--------------------------- ||_// the State | Ryan Novosielski - novos...@rutgers.edu || \\ University | Sr. Technologist - 973/972.0922 (2x0922) ~*~ RBHS Campus || \\ of NJ | Office of Advanced Research Computing - MSB C630, Newark `'
signature.asc
Description: Message signed with OpenPGP
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel