I ran into a problem compiling petsc when configured with "--with-openmp=1" on my system. This patch seems to fix it. Comments welcome.
>From 4b25ee606631ba0fe228c3edb678cdd1d70779e3 Mon Sep 17 00:00:00 2001 From: Eric Bavier <bav...@member.fsf.org> Date: Thu, 1 May 2014 14:03:59 -0500 Subject: [PATCH] Threadcomm: Add #include <sched.h> for cpu_set_t --- src/sys/threadcomm/impls/openmp/tcopenmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sys/threadcomm/impls/openmp/tcopenmp.c b/src/sys/threadcomm/impls/openmp/tcopenmp.c index 6c56d9c..b637b95 100644 --- a/src/sys/threadcomm/impls/openmp/tcopenmp.c +++ b/src/sys/threadcomm/impls/openmp/tcopenmp.c @@ -1,6 +1,9 @@ #define PETSC_DESIRE_FEATURE_TEST_MACROS #include <../src/sys/threadcomm/impls/openmp/tcopenmpimpl.h> #include <omp.h> +#if defined(PETSC_HAVE_SCHED_CPU_SET_T) +#include <sched.h> +#endif PetscErrorCode PetscThreadCommGetRank_OpenMP(PetscInt *trank) { -- 1.8.4
-- `~Eric