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

Commit

Permalink
Change ifeq to ifdef for OPENMP, modify make_ncep_libs.sh to only exp…
Browse files Browse the repository at this point in the history
…ort OPENMP=1, and leave it unset when OPENMP=0
  • Loading branch information
mkavulich committed Oct 16, 2019
1 parent 62d0ab2 commit cc870d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion make_ncep_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ cp -v ${MACROS_FILE}.${SYSTEM}.${COMPILER} ${MACROS_FILE}
#--------------------------------------------------------------
# Copy library source to BUILD_DIR and build
#--------------------------------------------------------------
export OPENMP=${OPENMP}
if [ "$OPENMP" == "1" ]; then
export OPENMP=${OPENMP}
fi
rsync -a macros.make Makefile src ${BUILD_DIR}
cd ${BUILD_DIR}
if [ "$APP" == "all" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/sp/v2.0.2/src/ncpus.F
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ FUNCTION NCPUS()
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INTEGER NTHREADS, TID, OMP_GET_NUM_THREADS,OMP_GET_THREAD_NUM
C Obtain thread number
#if OPENMP == 1
#ifdef OPENMP
#ifdef LINUX
!$OMP PARALLEL PRIVATE(TID)
TID = OMP_GET_THREAD_NUM()
Expand Down

0 comments on commit cc870d6

Please sign in to comment.