[R-pkg-devel] [[openmx-dev]] Re: [[openmx-dev]] Re: openmp

Zhian Kamvar kamvarz at science.oregonstate.edu
Mon Aug 24 18:57:52 CEST 2015


The way several packages have implemented OpenMP is to wrap it in pre-compiler statements i.e.:

// Include openMP if the compiler supports it
#ifdef _OPENMP
#include <omp.h>
#endif

This way, all compilers can build the code and those that have OpenMP (even modified versions of clang: https://clang-omp.github.io/) can do so in a parallel fashion.

> On Aug 24, 2015, at 08:46 , Joshua N Pritikin <jpritikin at pobox.com> wrote:
> 
> On Mon, Aug 24, 2015 at 10:14:10AM -0500, Dirk Eddelbuettel wrote:
>> On 24 August 2015 at 11:02, Joshua N Pritikin wrote:
>> | Currently, we have a configure script for package OpenMx that only 
>> | enables openmp if gcc is the compiler (OS X only). Nice to hear that 
>> | openmp is supported on Windows.
>> 
>> Interesting that you opt to ignore OpenMP support on the platform that
>> probably supports it best ...
> 
> Do you mean Linux? Yeah, we do enable OpenMP on gcc+Linux but CRAN 
> doesn't compile binaries for Linux so it's up to the user to have things 
> set up properly.
> 
> -- 
> Joshua N. Pritikin
> Department of Psychology
> University of Virginia
> 485 McCormick Rd, Gilmer Hall Room 102
> Charlottesville, VA 22904
> http://people.virginia.edu/~jnp3bc
> 
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list