Skip to content

omp.h before Rincludes.h #5122

@mattdowle

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.

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