Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

Commit cc870d6

Browse files
committed
Change ifeq to ifdef for OPENMP, modify make_ncep_libs.sh to only export OPENMP=1, and leave it unset when OPENMP=0
1 parent 62d0ab2 commit cc870d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

make_ncep_libs.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ cp -v ${MACROS_FILE}.${SYSTEM}.${COMPILER} ${MACROS_FILE}
182182
#--------------------------------------------------------------
183183
# Copy library source to BUILD_DIR and build
184184
#--------------------------------------------------------------
185-
export OPENMP=${OPENMP}
185+
if [ "$OPENMP" == "1" ]; then
186+
export OPENMP=${OPENMP}
187+
fi
186188
rsync -a macros.make Makefile src ${BUILD_DIR}
187189
cd ${BUILD_DIR}
188190
if [ "$APP" == "all" ]; then

src/sp/v2.0.2/src/ncpus.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ FUNCTION NCPUS()
2929
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3030
INTEGER NTHREADS, TID, OMP_GET_NUM_THREADS,OMP_GET_THREAD_NUM
3131
C Obtain thread number
32-
#if OPENMP == 1
32+
#ifdef OPENMP
3333
#ifdef LINUX
3434
!$OMP PARALLEL PRIVATE(TID)
3535
TID = OMP_GET_THREAD_NUM()

0 commit comments

Comments
 (0)