On Thu, Jan 29, 2015 at 10:28 PM, Roy Stogner <[email protected]> wrote:
>
> On Thu, 29 Jan 2015, John Peterson wrote:
>
>> I think we have seen this before. The configure test just checks to
>> see if the compiler doesn't barf on -fopenmp? The Apple clang
>> compiler accepts that flag but doesn't actually support openmp IIRC.
>>
>> Daniel, can you send your config.log to me directly (or share as a
>> google doc)? I'd like to see the output of configure for that test.
>
>
> If Mac folks can easily replicate this, and if the fix is as simple as
> "add a header test to the macro", you might submit a patch to the
> autoconf archive; they're pretty good about vetting and merging
> contributions quickly.
I haven't replicated it yet since I use a custom-built clang that
supports OpenMP, but I can confirm that the configure test we're using
doesn't try to include any OpenMP headers... instead it just declares
a function prototype, which seems strange, then again I don't use
OpenMP much:
AC_TRY_LINK([#ifdef __cplusplus
extern "C"
#endif
void omp_set_num_threads(int);], [const int N = 100000;
int i, arr[N];
omp_set_num_threads(2);
#pragma omp parallel for
for (i = 0; i < N; i++) {
arr[i] = i;
}], [ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break])
So even if the autoconf archive doesn't want our fix, I'm still going
to change this test to #include <omp.h>
--
John
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users