[R-pkg-devel] Build process generated non-portable files

@@j5xsj9 m@iii@g oii @iiiy@@ddy@io @@j5xsj9 m@iii@g oii @iiiy@@ddy@io
Mon Aug 12 20:24:30 CEST 2024


I'm working on a package that uses some fortran copied from elsewhere. It compiles and build fine everywhere but exclusively in the intel environment (provided by rhub), the intel fortran compiler generates intermediary files from *.f -> *__genmod.f90. The R check then complains that the genmod files are not portable. I include removal of the files in my cleanup file so the files do not exist in the original package source or in the final source tarball but it seems the portable files check is done after compilation but before cleanup.

- Is there a way to get around this complaint?
- Should this complaint be here in the first place?

I'm not familar with fortran but the warning message is: "Found the following files with non-portbale usage of KIND:." In "Writing R Extensions/Writing portable packages/Portable Fortran code" it mentions the use of REAL(KIND=8)​ types are not portable since compilers can map values to different types (and these declarations are in the f90 files), but the compiler called the preprocessing of the files so it should be correct for this specific compiler. The docs also mention the intel compiler will perform this preprocessing so this seems to be expected behavior. Shouldn't the portable files check only be performed on the shipped source code? In general, isn't it reasonable that build processes generate files specific to the environment?

- David R. Connell
	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list