Giter Site home page Giter Site logo

r-base's Introduction

R 4.3.0 for windows Generic_Debug and <CPU optimized>_NoDebug Versions of Debug/Optimized for C, C++, and Fortran on 64 bit Windows

AppVeyor Build Status

What is This??

This repository builds modified clones (think of Star Wars Clonetroopers) of the Old Non-Official-Version/Patched-snapshot/Build-of-the-development (NOPB) version of R

https://github.com/r-windows/r-base

Changes in this repository https://github.com/AndreMikulec/r-base include different build options

  • debugging flags
  • optimization flags and/or possibly OpenBlas

AppVeyor R Build Variants

Two exist: Generic_Debug and <CPU optimized>_NoDebug.

Generic_Debug Build

The Debug version Generic_Debug contains R language debugging symbols. E.g. if the debug target is Rterm.exe and the package DLL has been loaded, then when debugging the package DLL, the symbols Rf_error and Rf_PrintValue are available.

See the video:

Using gdb to debug R packages with native code
userprimary

https://vimeo.com/11937905

CPU Optimized NoDebug Build

The CPU Optimized version <CPU optimized>_NoDebug is built using custom optimization gcc/gfortran flag(s) available in Rtools. Debugging symbols are not included.

Available Point Releases

One may not be aware of a new release/point_release of R. E.g. a point release is like the following: 4.2.x or 4.3.y. If so, inform one about it. Email to [email protected]. One then should then run the AppVeyor build to create the new release/point_releases.

Other: Official Non-Official-Version/Patched-snapshot/Build-of-the-development (NOPB) Version of R

Official and Non-Official Version of R

If one may want the non-official version of R for windows, then one may go to any one of here (R 4.2.1 and earlier - unofficial): https://cran.r-project.org/bin/windows/base/ or (official) https://github.com/r-windows/r-base/releases .

Non-Official Patched snapshot version of R

If one may want the non-official patched snapshot build of R for windows, then one may go here: https://cran.r-project.org/bin/windows/base/rpatched.html or here: https://nightly.link/r-windows/r-base/workflows/full-build/master (choose r-patched).

Non-Official Build-of-the-development version of R

If one may want the non-offical build of the development version (which will eventually become the next major release) of R for windows, then one may go here: https://cran.r-project.org/bin/windows/base/rdevel.html or here: https://nightly.link/r-windows/r-base/workflows/full-build/master (choose r-devel).

Differences Here compared to the (just previously mentioned) NOPB Version of R

From the NOPB version of R for windows in the repository https://github.com/r-windows/r-base (R 4.2.1 and earlier) compared to this repository https://github.com/AndreMikulec/r-base differences (in here) follow.

Multiple build-job R version (r-patched/r-devel) and Debug/Optimization Combinations may be Attempted

This is configured In the file https://github.com/AndreMikulec/r-base/blob/master/appveyor.yml

environment:
  matrix:
    - version: 4.3.0
      BUILDFLAGS: 'DEBUG=T USE_ATLAS=YES'
      MARCHMTUNE: '-march=corei7 -mavx -mavx2 -O3 -funroll-loops -ffast-math'
      MARCHMTUNENAME: 'CPU Build CoreI7 with AVX2'
      DIST_BUILD: 'with Debugging Symbols'
      DEPLOYNAME: CoreI7_mAVX2_Debug
  
    - version: patched
      BUILDFLAGS: 'DEBUG=T USE_ATLAS=YES' 
      MARCHMTUNE: / -march=corei7 -mavx -mavx2 -O3 -funroll-loops -ffast-math
      MARCHMTUNENAME: CPU Build Generic / CPU Build CoreI7 with AVX2
      DIST_BUILD: with Debugging Symbols / without Debugging Symbols
      DEPLOYNAME: Generic_Debug / CoreI7_mAVX2_NoDebug
      
    - version: devel
      BUILDFLAGS: 'DEBUG=T USE_ATLAS=YES' 
      MARCHMTUNE: / -march=corei7 -mavx -mavx2 -O3 -funroll-loops -ffast-math
      MARCHMTUNENAME: CPU Build Generic / CPU Build CoreI7 with AVX2
      DIST_BUILD: with Debugging Symbols / without Debugging Symbols
      DEPLOYNAME: Generic_Debug / CoreI7_mAVX2_NoDebug

Debug and Optimization Description in the Version Nickname

In the NOPB version of R, the version nick name is set in the R mirror file https://github.com/wch/r-source/blob/trunk/VERSION-NICK. In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh added (appended to) the file https://github.com/wch/r-source/blob/trunk/VERSION-NICK contents, are the messages $MARCHMTUNENAME and $DIST_BUILD

sed -i "s/\(.*\)/\1 $MARCHMTUNENAME $DIST_BUILD/" VERSION-NICK

Debugging Symbols for R packages (G_FLAG) and R (DEBUGFLAG)

Because 64-bit Windows does not support dwarf-*, in the file https://github.com/AndreMikulec/r-base/blob/master/MkRules.local.in adding and using

ifdef DEBUG
  G_FLAG =
endif

and in the file https://github.com/AndreMikulec/r-base/blob/master/build.sh adding and using

if ! test "0" = "`grep -c -e "^\s*G_FLAG\s*?\?+\?=\s*" ${srcdir}/MkRules.local.in`"
then
  sed -i "s/^\s*G_FLAG\s*?\?+\?=.*/G_FLAG = -ggdb -Og -g3/" ${srcdir}/MkRules.local.in
else
  echo "G_FLAG = -ggdb -Og -g3" >> ${srcdir}/MkRules.local.in
fi

sets (overrides) is the (self declared) variable G_FLAG in the file https://github.com/AndreMikulec/r-base/blob/master/MkRules.local.in

Because 64-bit Windows does not support dwarf-*, in the file https://github.com/AndreMikulec/r-base/blob/master/build.sh adding and using

if ! test "0" = "`grep -c -e "^\s*DEBUGFLAG\s*?\?+\?=\s*" ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf`"
then
  sed -i -e "s/-gdwarf-2/-ggdb -Og -g3/" ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf
else
  echo -e "\n" >> ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf
  echo "DEBUGFLAG = -ggdb -Og -g3" >> ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf
fi

sets (overrides) is the variable DEBUGFLAG in the file https://github.com/wch/r-source/blob/trunk/src/gnuwin32/fixed/Makeconf

Optimization Flags for R and R packages

Because, of the various custom debug/optimization runs of these AppVeyor build-jobs in the github R mirror file https://github.com/wch/r-source/blob/trunk/src/gnuwin32/MkRules.rules in the NOPB version of R the variable EOPTS

EOPTS ?= -mfpmath=sse -msse2 -mstackrealign

is set (if the value does not already exist in the file https://github.com/AndreMikulec/r-base/blob/master/MkRules.local.in). However, in the file https://github.com/AndreMikulec/r-base/blob/master/build.sh to the file https://github.com/wch/r-source/blob/trunk/src/gnuwin32/MkRules.rules adding to (appended to) and using the previous EOPTS value, if any, is the $MARCHMTUNE value

if ! test "0" = "`grep -c -e "^\s*EOPTS\s*?\?+\?=\s*" ${srcdir}/R-source/src/gnuwin32/MkRules.rules`"
then
  if ! test "-$MARCHMTUNE-" = "--"
  then
    sed -i "s/\(^\s*EOPTS\s*?\?+\?=.*\)/\1 $MARCHMTUNE/" ${srcdir}/R-source/src/gnuwin32/MkRules.rules
  fi
else
  if ! test "-$MARCHMTUNE-" = "--"
  then
    echo -e "\n"                >> ${srcdir}/R-source/src/gnuwin32/MkRules.rules
    echo "EOPTS += $MARCHMTUNE" >> ${srcdir}/R-source/src/gnuwin32/MkRules.rules
  fi
fi

OpenBLAS for Optimization

In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh to make some matrix operations faster, OpenBLAS may be included.

if ! test "0" = `echo $BUILDFLAGS | grep -c -e "\bUSE_ATLAS=YES\b"`
then
  pacman -S --needed --noconfirm mingw-w64-{i686,x86_64}-openblas
fi

In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh the ATLAS flags are begin replaced by the OpenBLAS flag.

if ! test "0" = "`grep -c -e "-lf77blas -latlas\b" ${srcdir}/R-source/src/extra/blas/Makefile.win`"
then
  sed -i "s/-lf77blas -latlas\b/-lopenblas/" ${srcdir}/R-source/src/extra/blas/Makefile.win
fi

Debug Builds and Optimization Builds

In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh changed, is from

make distribution

to

make distribution $BUILDFLAGS

meaning (for example could be) make distribution DEBUG=T or make distribution

R Checks are Not Performed

The checks are not performed. These tests would/may cause any Appveyor build-job to use over one hour of allowed Appveyor build-job allowed time. In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh make check-all is not performed (and not written in build.sh).

#make check-all

QPDF is Installed into R

https://qpdf.readthedocs.io/en/stable/

AppVeyor Build Deployments of R: Generic_Debug and <CPU optimized>_NoDebug

Located near the top of the page https://github.com/AndreMikulec/r-base/releases one may get deployments from one of the top (recent) build-jobs.

The naming format is the following.

r-base_<appveyor build iteration>_<master repository>_<version>_<DEPLOYNAME>
  • version is patched or devel or the version number
  • DEPLOYNAME describes the build: debug xor optimization

Expand the asset drop down arrow: [v}Asset. Next, download the file base_*...*.zip. Using an unzip software program, manually extract the R installer executable: R-x.y.z-win.exe. Finally, install R.

r-base's People

Contributors

andremikulec avatar jeroen avatar bgoodri avatar

Watchers

James Cloos avatar

r-base's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.