From 413805e589571409ca4b0a735740388a489ef3fb Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 14 Nov 2011 14:59:16 +0000 Subject: [PATCH] now aware of ACMLpathinfo --- .../2010.2/Marc_tools/run_h_marc | 2 +- .../2010.2/Marc_tools/run_marc | 2 +- .../2010.2/Marc_tools/run_mp_marc | 2 +- .../2010/Marc_tools/run_h_marc | 2 +- .../2010/Marc_tools/run_marc | 2 +- .../2010/Marc_tools/run_mp_marc | 2 +- .../apply_DAMASK_modifications | 23 +++++++++++++++++-- 7 files changed, 27 insertions(+), 8 deletions(-) diff --git a/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_h_marc b/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_h_marc index 77480110e..6ceaf6085 100644 --- a/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_h_marc +++ b/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_h_marc @@ -1857,7 +1857,7 @@ fi # user subroutine used # # add BLAS options for linking (taken from ACML, AMD CORE MATH LIBRARY) - AMD_BLAS=" -L /opt/acml4.4.0/ifort64_mp/lib -lacml_mp" + AMD_BLAS=" -L %ACMLDIR%/ifort64_mp/lib -lacml_mp" if test "$user" diff --git a/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_marc b/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_marc index 3e334adff..45ae396f5 100644 --- a/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_marc +++ b/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_marc @@ -1857,7 +1857,7 @@ fi # user subroutine used # # add BLAS options for linking (taken from ACML, AMD CORE MATH LIBRARY) - AMD_BLAS=" -L /opt/acml4.4.0/ifort64_mp/lib -lacml_mp" + AMD_BLAS=" -L %ACMLDIR%/ifort64_mp/lib -lacml_mp" if test "$user" diff --git a/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_mp_marc b/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_mp_marc index 5bcf8daff..4933d94f7 100644 --- a/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_mp_marc +++ b/installation/mods_MarcMentat2010/2010.2/Marc_tools/run_mp_marc @@ -1857,7 +1857,7 @@ fi # user subroutine used # # add BLAS options for linking (taken from ACML, AMD CORE MATH LIBRARY) - AMD_BLAS=" -L /opt/acml4.4.0/ifort64_mp/lib -lacml_mp" + AMD_BLAS=" -L %ACMLDIR%/ifort64_mp/lib -lacml_mp" if test "$user" diff --git a/installation/mods_MarcMentat2010/2010/Marc_tools/run_h_marc b/installation/mods_MarcMentat2010/2010/Marc_tools/run_h_marc index 98ce99507..5d8a3ae39 100644 --- a/installation/mods_MarcMentat2010/2010/Marc_tools/run_h_marc +++ b/installation/mods_MarcMentat2010/2010/Marc_tools/run_h_marc @@ -1818,7 +1818,7 @@ fi # user subroutine used # # add BLAS options for linking (taken from ACML, AMD CORE MATH LIBRARY) - AMD_BLAS=" -L /opt/acml4.4.0/ifort64_mp/lib -lacml_mp" + AMD_BLAS=" -L %ACMLDIR%/ifort64_mp/lib -lacml_mp" if test "$user" then diff --git a/installation/mods_MarcMentat2010/2010/Marc_tools/run_marc b/installation/mods_MarcMentat2010/2010/Marc_tools/run_marc index 18bcf9aba..df8263815 100644 --- a/installation/mods_MarcMentat2010/2010/Marc_tools/run_marc +++ b/installation/mods_MarcMentat2010/2010/Marc_tools/run_marc @@ -1818,7 +1818,7 @@ fi # user subroutine used # # add BLAS options for linking (taken from ACML, AMD CORE MATH LIBRARY) - AMD_BLAS=" -L /opt/acml4.4.0/ifort64_mp/lib -lacml_mp" + AMD_BLAS=" -L %ACMLDIR%/ifort64_mp/lib -lacml_mp" if test "$user" diff --git a/installation/mods_MarcMentat2010/2010/Marc_tools/run_mp_marc b/installation/mods_MarcMentat2010/2010/Marc_tools/run_mp_marc index dc3f4a645..2f7551b5e 100644 --- a/installation/mods_MarcMentat2010/2010/Marc_tools/run_mp_marc +++ b/installation/mods_MarcMentat2010/2010/Marc_tools/run_mp_marc @@ -1818,7 +1818,7 @@ fi # user subroutine used # # add BLAS options for linking (taken from ACML, AMD CORE MATH LIBRARY) - AMD_BLAS=" -L /opt/acml4.4.0/ifort64_mp/lib -lacml_mp" + AMD_BLAS=" -L %ACMLDIR%/ifort64_mp/lib -lacml_mp" if test "$user" then diff --git a/installation/mods_MarcMentat2010/apply_DAMASK_modifications b/installation/mods_MarcMentat2010/apply_DAMASK_modifications index f72675023..66fac6196 100755 --- a/installation/mods_MarcMentat2010/apply_DAMASK_modifications +++ b/installation/mods_MarcMentat2010/apply_DAMASK_modifications @@ -1,6 +1,7 @@ #!/bin/bash DEFAULT_INSTALLDIR='/msc' +DEFAULT_ACMLDIR='/opt/acml4.0.0' DEFAULT_VERSION='2010.2' WORKINGDIR=`dirname $0` @@ -16,8 +17,8 @@ done echo "MSC version: $VERSION" INSTALLDIR='' -if [ -f $WORKINGDIR/../../processing/MSCpath ]; then - INSTALLDIR=`head $WORKINGDIR/../../processing/MSCpath` +if [ -f $WORKINGDIR/../../lib/pathinfo ]; then + INSTALLDIR=`grep msc $WORKINGDIR/../../lib/pathinfo | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'` fi while [ ! -d "$INSTALLDIR" ] || [ -z "$INSTALLDIR" ] do @@ -31,6 +32,22 @@ done INSTALLDIR=${INSTALLDIR%/} # remove trailing slash echo "MSC installation path: $INSTALLDIR" +ACMLDIR='' +if [ -f $WORKINGDIR/../../lib/pathinfo ]; then + INSTALLDIR=`grep acml $WORKINGDIR/../../lib/pathinfo | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'` +fi +while [ ! -d "$ACMLDIR" ] || [ -z "$ACMLDIR" ] +do + echo "Input path of ACML installation: [${DEFAULT_ACMLDIR}]" + read ACMLDIR + if [ -z $ACMLDIR ]; then + ACMLDIR=${DEFAULT_ACMLDIR} + fi +done + +ACMLDIR=${ACMLDIR%/} # remove trailing slash +echo "ACML installation path: $ACMLDIR" + # tools echo '' echo 'copying Marc tools...' @@ -44,6 +61,7 @@ for filename in 'comp_user' \ 'include_linux64'; do cp $WORKINGDIR/$VERSION/Marc_tools/$filename $theDIR echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g" + echo $theDIR/$filename | xargs perl -pi -e "s:%ACMLDIR%:${ACMLDIR}:g" echo $theDIR/$filename | xargs perl -pi -e "s:%VERSION%:${VERSION}:g" echo $filename done @@ -58,6 +76,7 @@ for filename in 'edit_window' \ 'submit3'; do cp $WORKINGDIR/$VERSION/Mentat_bin/$filename $theDIR echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g" + echo $theDIR/$filename | xargs perl -pi -e "s:%ACMLDIR%:${ACMLDIR}:g" echo $theDIR/$filename | xargs perl -pi -e "s:%VERSION%:${VERSION}:g" echo $filename done