Skip to content

omp.h before Rincludes.h #5122

Description

@mattdowle

Received from Prof Brian Ripley today :

Subject: Packages including omp.h after Rincludes.h

That is

AMORE BNN BRISC OpenMPController RFCCA RFpredInterval RLT
RandomFields RandomFieldsUtils RandomForestsGLS RhpcBLASctl RxODE
STB TMB brnn coop data.table excursions float glinternet glmmTMB
gmGeostats graphscan hashr hutilscpp influenceR iq kit likeLTD
mRMRe magick meanShiftR meanr mnlogit poismf poppr praznik rFerns
randomForestSRC rasterKernelEstimates rehh simputation spBayes
spNNGP stringdist sylcount unfoldr

Compilation logs can be seen at
https://www.stats.ox.ac.uk/pub/bdr/clang13/ but beware these may only
show the first error.

The imminent clang 13.0.0 has an omp.h including

/* OpenMP 5.1 */
#if defined(_OPENMP) && _OPENMP >= 201811
  #pragma omp begin declare variant match(device={kind(host)})
  static inline int omp_is_initial_device(void) { return 1; }
  #pragma omp end declare variant
  #pragma omp begin declare variant match(device={kind(nohost)})
  static inline int omp_is_initial_device(void) { return 0; }
  #pragma omp end declare variant
#endif

whose use of match causes a compilation error if included after
Rinternals.h. 'Writing R Extensions' presents various workarounds, the
main one being the strong advice to include system headers before R headers.

Please correct before 2021-09-21 to safely retain your package on CRAN.

Activity

  1. added this to the 1.14.1 milestone on Aug 31, 2021
  2. MichaelChirico commented on Aug 31, 2021

    @MichaelChirico
    Member

    I guess it's release time then? unless we plan to just patch this in quickly

  3. mattdowle commented on Aug 31, 2021

    @mattdowle
    MemberAuthor

    yep, release time

  4. mattdowle commented on Sep 22, 2021

    @mattdowle
    MemberAuthor

    Thanks to Prof Ripley he provided a patch :


    I have attached the patch I used to get data.table to install with
    clang-13. Hope it helps.

    If I had compiled code as complicated as yours I would consider using
    R_NO_REMAP and adding Rf_ prefixes in the code.

    data.table.patch.txt

  5. modified the milestones: 1.14.3, 1.14.1 on Sep 22, 2021
  6. mattdowle commented on Sep 23, 2021

    @mattdowle
    MemberAuthor

    From Prof Ripley :


    This is still open for

    AMORE BNN OpenMPController RandomFields RandomFieldsUtils data.table
    graphscan influenceR likeLTD mnlogit spBayes unfoldr

    This is a final reminder: the archival process will start on Sep 25.

  7. mattdowle commented on Sep 27, 2021

    @mattdowle
    MemberAuthor

    Owing to the deadline, v1.14.2 is now on CRAN which is a manual minimal patch of v1.14.0. The change to as.character.hexmode() in R-devel 6 days ago was caught that day (thanks to GitLab CI) and fix included before submitting 5 days ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions