From 032510082342c1e3e7ec90635c439ede978bbefc Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 1 Jul 2015 09:10:49 -0600 Subject: [PATCH] Fix PGI compilation of opal_condition test PGI was failing to build this test due to the {} initializers of some of the global variables. The initializers were added to remove common symbols from the test repository. This commit removes the initializers and makes the variables static which should fix both the compile issue and avoid the common symbols. This commit additionally removes the check for OPAL_ENABLE_MULTI_THREADS since Open MPI requires thread support. Signed-off-by: Nathan Hjelm --- test/threads/opal_condition.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/test/threads/opal_condition.c b/test/threads/opal_condition.c index 1687b8cfc4..e163dcb83e 100644 --- a/test/threads/opal_condition.c +++ b/test/threads/opal_condition.c @@ -29,25 +29,9 @@ #include "opal/threads/condition.h" #include "opal/sys/atomic.h" - -#if !OPAL_ENABLE_MULTI_THREADS - -/* If we don't have thread support, there's no point in running this - test */ - -int main(int argc, char *argv[]) -{ - printf("OMPI was compiled without thread support -- skipping this test\n"); - return 77; -} - -#else - -/* Only have the body of this test if we have thread support */ - -opal_mutex_t mutex = {}; -opal_condition_t thr1_cond = {}; -opal_condition_t thr2_cond = {}; +static opal_mutex_t mutex; +static opal_condition_t thr1_cond; +static opal_condition_t thr2_cond; static volatile int thr1_count = 0; static volatile int thr2_count = 0; @@ -134,5 +118,3 @@ int main(int argc, char** argv) return test_finalize(); } - -#endif /* OPAL_ENABLE_MULTI_THREADS */