aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@5c1b1641-b641-47ec-b3d9-0f93d4c445ee>2010-08-09 14:22:55 +0000
committerknarf <knarf@5c1b1641-b641-47ec-b3d9-0f93d4c445ee>2010-08-09 14:22:55 +0000
commit6a86719812c36c075adc88a2cfbafc6ad700d1f5 (patch)
treec815d8de8759eaa609adb1aae50e6c0ef0da950c
parentedb01a1a4f41d47429089281dd235915bc9cbc06 (diff)
add some openmp support to lorene evaluation onto list of points
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/LORENE/trunk@23 5c1b1641-b641-47ec-b3d9-0f93d4c445ee
-rw-r--r--LORENE.sh3
-rw-r--r--dist/openmp.patch11
2 files changed, 13 insertions, 1 deletions
diff --git a/LORENE.sh b/LORENE.sh
index efb9505..2181b0f 100644
--- a/LORENE.sh
+++ b/LORENE.sh
@@ -76,6 +76,7 @@ if [ -z "${LORENE_DIR}" ]; then
${PATCH} -p0 < ${SRCDIR}/dist/des.patch
${PATCH} -p0 < ${SRCDIR}/dist/makesystem.patch
${PATCH} -p0 < ${SRCDIR}/dist/pgplot.patch
+ ${PATCH} -p0 < ${SRCDIR}/dist/openmp.patch
# Some (ancient but still used) versions of patch don't support the
# patch format used here but also don't report an error using the
# exit code. So we use this patch to test for this
@@ -109,7 +110,7 @@ if [ -z "${LORENE_DIR}" ]; then
fi
cat > local_settings <<EOF
CXX = ${CXX}
-CXXFLAGS = ${CXXFLAGS}
+CXXFLAGS = ${CXXFLAGS} ${CPP_OPENMP_FLAGS}
CXXFLAGS_G = ${CXXFLAGS}
F77 = ${F77}
F77FLAGS = ${F77FLAGS} ${FIXEDF77FLAGS}
diff --git a/dist/openmp.patch b/dist/openmp.patch
new file mode 100644
index 0000000..8d1bce2
--- /dev/null
+++ b/dist/openmp.patch
@@ -0,0 +1,11 @@
+diff -ur Lorene.orig/Export/C++/Source/bin_ns_aux.C Lorene/Export/C++/Source/bin_ns_aux.C
+--- Lorene.orig/Export/C++/Source/bin_ns_aux.C 2006-09-12 03:04:07.000000000 -0500
++++ Lorene/Export/C++/Source/bin_ns_aux.C 2010-07-29 12:44:16.000000000 -0500
+@@ -322,6 +322,7 @@
+ vueulerz1.coef() ;
+ vueulerz2.coef() ;
+
++#pragma omp parallel for
+ for (int i=0; i<np; i++) {
+
+ double x0 = xx[i] * km ; // x in Lorene's unit