From 31ee55514065085c54eebdc1da96a95a6246206c Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 1 May 2019 11:58:52 -0500 Subject: [PATCH] Fix openmp build failures with Cray compiler. The 'lastprivate' clause here causes a build failure with the Cray compiler: CC-1653 craycc: ERROR File = ./SRC/pzgstrs_lsum.c, Line = 1171 The variable "irow" cannot be used in this lastprivate clause because the variable appears in a conflicting clause in an enclosing region. #pragma omp simd lastprivate(irow) ^ Since the `irow` variable is not used later in the enclosing taskloop, its value is irrelevant, so just leave out the 'lastprivate' clause. * SRC/pdgstrs_lsum.c (dlsum_fmod_inv_master): Remove lastprivate clause. * SRC/pzgstrs_lsum.c (zlsum_fmod_inv_master): Ditto. --- SRC/pdgstrs_lsum.c | 2 +- SRC/pzgstrs_lsum.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SRC/pdgstrs_lsum.c b/SRC/pdgstrs_lsum.c index 19889c90a..043ab9079 100644 --- a/SRC/pdgstrs_lsum.c +++ b/SRC/pdgstrs_lsum.c @@ -1139,7 +1139,7 @@ void dlsum_fmod_inv_master RHS_ITERATE(j) #ifdef _OPENMP - #pragma omp simd lastprivate(irow) + #pragma omp simd #endif for (i = 0; i < nbrow1; ++i) { irow = lsub[lptr+i] - rel; /* Relative row. */ diff --git a/SRC/pzgstrs_lsum.c b/SRC/pzgstrs_lsum.c index 696670734..a9fd91619 100644 --- a/SRC/pzgstrs_lsum.c +++ b/SRC/pzgstrs_lsum.c @@ -1168,7 +1168,7 @@ void zlsum_fmod_inv_master RHS_ITERATE(j) #ifdef _OPENMP - #pragma omp simd lastprivate(irow) + #pragma omp simd #endif for (i = 0; i < nbrow1; ++i) { irow = lsub[lptr+i] - rel; /* Relative row. */