[Rd] Using a different compiler when creating a package on Windows

Erin Hodgess er|nm@hodge@@ @end|ng |rom gm@||@com
Sat Mar 2 14:11:50 CET 2019


I am updating to the R-devel version as of 2/28 and recompiling with
OpenBLAS.   I got that to compile nicely.

I am now updating a package that uses the OpenBLAS and the PGI compiler,
which has changed too.

I just changed the path names in Makevars.  Here is the Makevars file.

FC= d:/PGI/win64/18.10/bin/pgf90
F77= d:/PGI/win64/18.10/bin/pgf90
CC = d:/PGI/win64/18.10/bin/pgcc
FFLAGS= -Ld:/PGI/win64/18.10/bin/pgf90.dll
FLIBS= -Ld:/PGI/win64/18.10/bin/pgf90.dll
MPI_FFLAGS= -Mmpi=msmpi
CUDA_FFLAGS=-acc -Minfo=accel -Mlarge_arrays
-Ld:/PGI/win64/18.10/bin/pgf90.dll -Ld:/PGI/win64/18.10/bin/pgc14.dll
-defaultlib:legacy_stdio_definitions -defaultlib:oldnames
-Ld:/PGI/win64/18.10/bin/pgf90.dll -Ld:/PGI/win64/18.10/bin/pgc14.dll

rmpiFort.obj: rmpiFort.f90
$(FC) $(FFLAGS) $(MPI_FFLAGS) -c rmpiFort.f90 -o rmpiFort.obj  -m64
$(FC) $(CUDA_FFLAGS) $(DLLCUDA_FFLAGS) -c test4.f90 -o test4.obj -m64
rmpiFort.dll test4.obj rmpiFort.obj  -m64

When I do Make check, I get the following:
* installing *source* package 'rmpiFort' ...

** libs

d:/Rtools/mingw_64/bin/gfortran  -O2  -march=native -pipe -Mmpi=msmpi -c
rmpiFort.f90 -o rmpiFort.obj  -m64
gfortran.exe: error: unrecognized command line option '-Mmpi=msmpi'

make: *** [Makevars:14: rmpiFort.obj] Error 1
ERROR: compilation failed for package 'rmpiFort'

* removing 'D:/rnew/rmpiFort.Rcheck/rmpiFort'

So it is still trying to use the gfortran compiler rather than the PGI

The PGI libraries are first in the PATH.

Since it worked fine before, I am at a loss as to why it doesn't work now.
Any suggestions much appreciated.


Erin Hodgess, PhD
mailto: erinm.hodgess using gmail.com

	[[alternative HTML version deleted]]

More information about the R-devel mailing list