Erin Hodgess
2019-Mar-02 13:11 UTC
[Rd] Using a different compiler when creating a package on Windows
Hello! 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 -Ld:/PGI/win64/18.10/bin/pgc14.dll FLIBS= -Ld:/PGI/win64/18.10/bin/pgf90.dll -Ld:/PGI/win64/18.10/bin/pgc14.dll PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) MPI_FFLAGS= -Mmpi=msmpi SHLIB_FFLAGS= -Mmakedll CUDA_FFLAGS=-acc -Minfo=accel -Mlarge_arrays -Ld:/PGI/win64/18.10/bin/pgf90.dll -Ld:/PGI/win64/18.10/bin/pgc14.dll DLLCUDA_FFLAGS=-ta=tesla:nordc -Ld:/PGI/win64/18.10/lib/acc_init_link_cuda.obj -Ld:/PGI/win64/18.10/lib/libaccapi.lib -Ld:/PGI/win64/18.10/lib/libaccg.lib -Ld:/PGI/win64/18.10/lib/libaccn.lib -Ld:/PGI/win64/18.10/lib/libaccg2.lib -Ld:/PGI/win64/18.10/lib/libcudadevice.lib -Ld:/PGI/win64/18.10/lib/pgc14.lib -Ld:/PGI/win64/18.10/lib/libnspgc.lib -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 $(FC) $(SHLIB_FFLAGS) $(FFLAGS) $(MPI_FFLAGS) $(CUDA_FFLAGS) -o 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 compiler. 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. Thanks, Erin Erin Hodgess, PhD mailto: erinm.hodgess at gmail.com [[alternative HTML version deleted]]