Message-ID: <C6F8A747-43F2-4364-A5B8-D91C51CD5493@science.oregonstate.edu>
Date: 2015-08-24T16:57:52Z
From: Zhian Kamvar
Subject: [R-pkg-devel] [[openmx-dev]] Re: [[openmx-dev]] Re: openmp
In-Reply-To: <20150824154600.GC25533@droplet>
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