hypela cloning as part of specific Marc modification; Makefile corrections/improvements

This commit is contained in:
Philip Eisenlohr 2017-03-15 18:43:04 -05:00
parent e94f518dc7
commit 4bf11b20c9
3 changed files with 31 additions and 53 deletions

View File

@ -4,26 +4,25 @@ SHELL = /bin/sh
########################################################################################
.PHONY: all
all: spectral FEM marc processing
.PHONY: spectral
spectral: build/spectral
@(cd build/spectral;make --no-print-directory -ws all install VERBOSE=1;)
.PHONY: FEM
FEM: build/FEM
@(cd build/FEM; make --no-print-directory -ws all install;)
build/spectral: build
.PHONY: build/spectral
build/spectral:
@mkdir -p build/spectral
@(cd build/spectral; cmake -Wno-dev -DDAMASK_SOLVER=SPECTRAL -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;)
build/FEM: build
.PHONY: build/FEM
build/FEM:
@mkdir -p build/FEM
@(cd build/FEM; cmake -Wno-dev -DDAMASK_SOLVER=FEM -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;)
build:
@mkdir -p build
.PHONY: marc
marc:
@./installation/symLink_Code.sh
@ -34,6 +33,6 @@ clean:
@rm -rf build
.PHONY: processing
install:
processing:
@./installation/symlink_Processing.py ${MAKEFLAGS}

View File

@ -54,7 +54,7 @@ echo "Editor: $EDITOR"
# tools
echo ''
echo 'copying Marc tools...'
echo 'adapting Marc tools...'
theDIR=$INSTALLDIR/marc$VERSION/tools
for filename in 'comp_damask' \
'comp_damask_l' \
@ -77,7 +77,7 @@ done
# Mentat scripts
echo ''
echo 'copying Mentat scripts...'
echo 'adapting Mentat scripts...'
theDIR=$INSTALLDIR/mentat$VERSION/bin
for filename in 'edit_window' \
'submit4' \
@ -101,7 +101,7 @@ done
# Mentat scripts
echo ''
echo 'copying Mentat menus...'
echo 'adapting Mentat menus...'
theDIR=$INSTALLDIR/mentat$VERSION/menus
for filename in 'job_run.ms'; do
cp $SCRIPTLOCATION/$VERSION/Mentat_menus/$filename $theDIR
@ -112,16 +112,20 @@ done
# compile menus
echo ''
echo 'compiling menus...'
$INSTALLDIR/mentat$VERSION/bin/mentat -compile $INSTALLDIR/mentat$VERSION/menus/linux64/main.msb
echo 'compiling Mentat menu binaries...'
$(which xvfb-run 2>/dev/null) $INSTALLDIR/mentat$VERSION/bin/mentat -compile $INSTALLDIR/mentat$VERSION/menus/linux64/main.msb
[[ $? != 0 ]] && echo '...failed. Try installing xvfb-run on your system.'
# setting access rights
echo ''
echo 'setting file access rights...'
chmod 755 $INSTALLDIR/marc$VERSION/tools/run_damask*
chmod 755 $INSTALLDIR/marc$VERSION/tools/comp_damask*
chmod 755 $INSTALLDIR/mentat$VERSION/bin/submit{4..9}
chmod 755 $INSTALLDIR/mentat$VERSION/bin/kill{4..9}
for filename in marc$VERSION/tools/run_damask* \
marc$VERSION/tools/comp_damask* \
mentat$VERSION/bin/submit{4..9} \
mentat$VERSION/bin/kill{4..9} \
chmod 755 $INSTALLDIR/${filename}
done
#creating symlinks for run_damask_scripts in /usr/local/bin
@ -152,5 +156,15 @@ if [ -d "$BIN_DIR" ]; then
esac
fi
# cloning user subroutine
echo ''
echo 'cloning $VERSION HYPELA2 user subroutine...'
ln -s DAMASK_marc.f90 ${DAMASK_ROOT}/src/DAMASK_marc${VERSION}.f90
# precompiling user subroutine
echo ''
echo 'precompiling $VERSION HYPELA2 user subroutine...'
echo 'not yet implemented..!'
echo ''
echo 'done.'

View File

@ -1,35 +0,0 @@
#!/usr/bin/env python2.7
# -*- coding: UTF-8 no BOM -*-
import os,sys
import damask
MarcReleases =[ \
'2014',
'2014.2',
'2015',
'2016'
]
damaskEnv = damask.Environment()
baseDir = damaskEnv.relPath('code/')
binDir = damaskEnv.options['DAMASK_BIN']
if not os.path.isdir(binDir):
os.mkdir(binDir)
sys.stdout.write('\nMSC.Marc versioning...\n\n')
theMaster = 'DAMASK_marc.f90'
for version in MarcReleases:
src = os.path.abspath(os.path.join(baseDir,theMaster))
if os.path.exists(src):
sym_link = os.path.abspath(os.path.join(baseDir,'DAMASK_marc{}.f90'.format(version)))
if os.path.lexists(sym_link):
os.remove(sym_link)
output = version
else:
output = damask.util.emph(version)
sys.stdout.write(' '+output+'\n')
os.symlink(theMaster,sym_link)