Merge branch 'development' into 42-new-coding-style-for-homogenization-NEW
This commit is contained in:
commit
4caf93a22f
|
@ -7,7 +7,7 @@ stages:
|
||||||
- compilePETScGNU
|
- compilePETScGNU
|
||||||
- prepareSpectral
|
- prepareSpectral
|
||||||
- spectral
|
- spectral
|
||||||
- compileMarc2017
|
- compileMarc2018_1
|
||||||
- marc
|
- marc
|
||||||
- compileAbaqus2017
|
- compileAbaqus2017
|
||||||
- example
|
- example
|
||||||
|
@ -73,10 +73,13 @@ variables:
|
||||||
PETSc_MPICH_GNU: "$PETSc3_10_0MPICH3_2GNU7_3"
|
PETSc_MPICH_GNU: "$PETSc3_10_0MPICH3_2GNU7_3"
|
||||||
# ++++++++++++ FEM +++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++ FEM +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
Abaqus2017: "FEM/Abaqus/2017"
|
Abaqus2017: "FEM/Abaqus/2017"
|
||||||
|
MSC2018_1: "FEM/MSC/2018.1"
|
||||||
MSC2017: "FEM/MSC/2017"
|
MSC2017: "FEM/MSC/2017"
|
||||||
# ------------ Defaults ----------------------------------------------
|
# ------------ Defaults ----------------------------------------------
|
||||||
Abaqus: "$Abaqus2017"
|
Abaqus: "$Abaqus2017"
|
||||||
MSC: "$MSC2017"
|
MSC: "$MSC2018_1"
|
||||||
|
IntelMarc: "$IntelCompiler17_0"
|
||||||
|
IntelAbaqus: "$IntelCompiler16_4"
|
||||||
# ++++++++++++ Documentation +++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++ Documentation +++++++++++++++++++++++++++++++++++++++++
|
||||||
Doxygen1_8_13: "Documentation/Doxygen/1.8.13"
|
Doxygen1_8_13: "Documentation/Doxygen/1.8.13"
|
||||||
# ------------ Defaults ----------------------------------------------
|
# ------------ Defaults ----------------------------------------------
|
||||||
|
@ -148,13 +151,20 @@ Spectral_geometryPacking:
|
||||||
- release
|
- release
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
Post_General:
|
Post_AverageDown:
|
||||||
stage: postprocessing
|
stage: postprocessing
|
||||||
script: PostProcessing/test.py
|
script: averageDown/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
#Post_General:
|
||||||
|
# stage: postprocessing
|
||||||
|
# script: PostProcessing/test.py
|
||||||
|
# except:
|
||||||
|
# - master
|
||||||
|
# - release
|
||||||
|
|
||||||
Post_GeometryReconstruction:
|
Post_GeometryReconstruction:
|
||||||
stage: postprocessing
|
stage: postprocessing
|
||||||
script: Spectral_geometryReconstruction/test.py
|
script: Spectral_geometryReconstruction/test.py
|
||||||
|
@ -190,6 +200,13 @@ Post_ParaviewRelated:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
Post_OrientationConversion:
|
||||||
|
stage: postprocessing
|
||||||
|
script: OrientationConversion/test.py
|
||||||
|
except:
|
||||||
|
- master
|
||||||
|
- release
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
Compile_Spectral_Intel:
|
Compile_Spectral_Intel:
|
||||||
stage: compilePETScIntel
|
stage: compilePETScIntel
|
||||||
|
@ -240,6 +257,13 @@ Compile_Intel_Prepare:
|
||||||
- release
|
- release
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
Thermal:
|
||||||
|
stage: spectral
|
||||||
|
script: Thermal/test.py
|
||||||
|
except:
|
||||||
|
- master
|
||||||
|
- release
|
||||||
|
|
||||||
Spectral_PackedGeometry:
|
Spectral_PackedGeometry:
|
||||||
stage: spectral
|
stage: spectral
|
||||||
script: Spectral_PackedGeometry/test.py
|
script: Spectral_PackedGeometry/test.py
|
||||||
|
@ -340,36 +364,30 @@ Phenopowerlaw_singleSlip:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
|
||||||
HybridIA:
|
#TextureComponents:
|
||||||
stage: spectral
|
# stage: spectral
|
||||||
script: HybridIA/test.py
|
# script: TextureComponents/test.py
|
||||||
except:
|
# except:
|
||||||
- master
|
# - master
|
||||||
- release
|
# - release
|
||||||
|
|
||||||
TextureComponents:
|
|
||||||
stage: spectral
|
|
||||||
script: TextureComponents/test.py
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
Marc_compileIfort2017:
|
Marc_compileIfort2018_1:
|
||||||
stage: compileMarc2017
|
stage: compileMarc2018_1
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler16_4 $MSC2017
|
- module load $IntelCompiler17_0 $MSC2018_1
|
||||||
- Marc_compileIfort/test.py -m 2017
|
- Marc_compileIfort/test.py -m 2018.1
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
Hex_elastic:
|
Hex_elastic:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler16_4 $MSC
|
- module load $IntelMarc $MSC
|
||||||
- Hex_elastic/test.py
|
- Hex_elastic/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -378,7 +396,7 @@ Hex_elastic:
|
||||||
CubicFCC_elastic:
|
CubicFCC_elastic:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler16_4 $MSC
|
- module load $IntelMarc $MSC
|
||||||
- CubicFCC_elastic/test.py
|
- CubicFCC_elastic/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -387,7 +405,7 @@ CubicFCC_elastic:
|
||||||
CubicBCC_elastic:
|
CubicBCC_elastic:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler16_4 $MSC
|
- module load $IntelMarc $MSC
|
||||||
- CubicBCC_elastic/test.py
|
- CubicBCC_elastic/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -396,7 +414,7 @@ CubicBCC_elastic:
|
||||||
J2_plasticBehavior:
|
J2_plasticBehavior:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler16_4 $MSC
|
- module load $IntelMarc $MSC
|
||||||
- J2_plasticBehavior/test.py
|
- J2_plasticBehavior/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -419,14 +437,6 @@ SpectralExample:
|
||||||
only:
|
only:
|
||||||
- development
|
- development
|
||||||
|
|
||||||
AbaqusExample:
|
|
||||||
stage: example
|
|
||||||
script:
|
|
||||||
- module load $IntelCompiler16_4 $Abaqus
|
|
||||||
- Abaqus_example/test.py
|
|
||||||
only:
|
|
||||||
- development
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
SpectralRuntime:
|
SpectralRuntime:
|
||||||
stage: performance
|
stage: performance
|
||||||
|
|
|
@ -47,7 +47,7 @@ linker:
|
||||||
|
|
||||||
# CMake will execute each target in the ${petsc_config_makefile}
|
# CMake will execute each target in the ${petsc_config_makefile}
|
||||||
# to acquire corresponding PETSc Variables.
|
# to acquire corresponding PETSc Variables.
|
||||||
find_program (MAKE_EXECUTABLE NAMES make gmake)
|
find_program (MAKE_EXECUTABLE NAMES gmake make)
|
||||||
# Find the PETSc includes directory settings
|
# Find the PETSc includes directory settings
|
||||||
execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} "includes"
|
execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} "includes"
|
||||||
RESULT_VARIABLE PETSC_INCLUDES_RETURN
|
RESULT_VARIABLE PETSC_INCLUDES_RETURN
|
||||||
|
@ -280,7 +280,7 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
||||||
# ... for uninitialized variables.
|
# ... for uninitialized variables.
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
|
||||||
# ... initializes stack local variables to an unusual value to aid error detection
|
# ... initializes stack local variables to an unusual value to aid error detection
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all0")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0")
|
||||||
# ... capture all floating-point exceptions, sets -ftz automatically
|
# ... capture all floating-point exceptions, sets -ftz automatically
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
|
||||||
|
|
6
CONFIG
6
CONFIG
|
@ -6,6 +6,8 @@ set DAMASK_BIN = ${DAMASK_ROOT}/bin
|
||||||
set DAMASK_NUM_THREADS = 4
|
set DAMASK_NUM_THREADS = 4
|
||||||
|
|
||||||
set MSC_ROOT = /opt/msc
|
set MSC_ROOT = /opt/msc
|
||||||
set MARC_VERSION = 2017
|
set MARC_VERSION = 2018.1
|
||||||
|
|
||||||
set ABAQUS_VERSION = 2018.1
|
set ABAQUS_VERSION = 2017
|
||||||
|
|
||||||
|
set DAMASK_HDF5 = OFF
|
||||||
|
|
|
@ -78,8 +78,8 @@ echo PETSC_DIR: $PETSC_DIR
|
||||||
ls $PETSC_DIR/lib
|
ls $PETSC_DIR/lib
|
||||||
|
|
||||||
firstLevel "Python"
|
firstLevel "Python"
|
||||||
DEFAULT_PYTHON=python2.7
|
DEFAULT_PYTHON=python3
|
||||||
for executable in python python2 python3 python2.7; do
|
for executable in python python3; do
|
||||||
getDetails $executable '--version'
|
getDetails $executable '--version'
|
||||||
done
|
done
|
||||||
secondLevel "Details on $DEFAULT_PYTHON:"
|
secondLevel "Details on $DEFAULT_PYTHON:"
|
||||||
|
@ -119,6 +119,9 @@ for executable in mpirun mpiexec; do
|
||||||
getDetails $executable '--version'
|
getDetails $executable '--version'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
firstLevel "CMake"
|
||||||
|
getDetails cmake --version
|
||||||
|
|
||||||
firstLevel "Abaqus"
|
firstLevel "Abaqus"
|
||||||
cd installation/mods_Abaqus # to have the right environment file
|
cd installation/mods_Abaqus # to have the right environment file
|
||||||
for executable in abaqus abq2017 abq2018; do
|
for executable in abaqus abq2017 abq2018; do
|
||||||
|
|
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit cd714a6a3d36d071d7a4e8676959964d88076dcf
|
Subproject commit 58137906b84b6cf0e273dfdde623a2986d03f98e
|
|
@ -7,6 +7,11 @@ set DAMASK_ROOT=`python -c "import os,sys; print(os.path.realpath(os.path.expand
|
||||||
|
|
||||||
source $DAMASK_ROOT/CONFIG
|
source $DAMASK_ROOT/CONFIG
|
||||||
|
|
||||||
|
# add BRANCH if DAMASK_ROOT is a git repository
|
||||||
|
cd $DAMASK_ROOT >/dev/null
|
||||||
|
set BRANCH = `git branch 2>/dev/null| grep -E '^\* ')`
|
||||||
|
cd - >/dev/null
|
||||||
|
|
||||||
# if DAMASK_BIN is present
|
# if DAMASK_BIN is present
|
||||||
if ( $?DAMASK_BIN) then
|
if ( $?DAMASK_BIN) then
|
||||||
set path = ($DAMASK_BIN $path)
|
set path = ($DAMASK_BIN $path)
|
||||||
|
@ -41,10 +46,9 @@ if ( $?prompt ) then
|
||||||
echo https://damask.mpie.de
|
echo https://damask.mpie.de
|
||||||
echo
|
echo
|
||||||
echo Using environment with ...
|
echo Using environment with ...
|
||||||
echo "DAMASK $DAMASK_ROOT"
|
echo "DAMASK $DAMASK_ROOT $BRANCH"
|
||||||
echo "Spectral Solver $SOLVER"
|
echo "Spectral Solver $SOLVER"
|
||||||
echo "Post Processing $PROCESSING"
|
echo "Post Processing $PROCESSING"
|
||||||
echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
|
|
||||||
if ( $?PETSC_DIR) then
|
if ( $?PETSC_DIR) then
|
||||||
echo "PETSc location $PETSC_DIR"
|
echo "PETSc location $PETSC_DIR"
|
||||||
endif
|
endif
|
||||||
|
@ -52,8 +56,10 @@ if ( $?prompt ) then
|
||||||
echo "MSC.Marc/Mentat $MSC_ROOT"
|
echo "MSC.Marc/Mentat $MSC_ROOT"
|
||||||
endif
|
endif
|
||||||
echo
|
echo
|
||||||
|
echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
|
||||||
echo `limit datasize`
|
echo `limit datasize`
|
||||||
echo `limit stacksize`
|
echo `limit stacksize`
|
||||||
|
echo
|
||||||
endif
|
endif
|
||||||
|
|
||||||
setenv DAMASK_NUM_THREADS $DAMASK_NUM_THREADS
|
setenv DAMASK_NUM_THREADS $DAMASK_NUM_THREADS
|
||||||
|
|
|
@ -30,6 +30,9 @@ set() {
|
||||||
source $DAMASK_ROOT/CONFIG
|
source $DAMASK_ROOT/CONFIG
|
||||||
unset -f set
|
unset -f set
|
||||||
|
|
||||||
|
# add BRANCH if DAMASK_ROOT is a git repository
|
||||||
|
cd $DAMASK_ROOT >/dev/null; BRANCH=$(git branch 2>/dev/null| grep -E '^\* '); cd - >/dev/null
|
||||||
|
|
||||||
# add DAMASK_BIN if present
|
# add DAMASK_BIN if present
|
||||||
[ "x$DAMASK_BIN" != "x" ] && PATH=$DAMASK_BIN:$PATH
|
[ "x$DAMASK_BIN" != "x" ] && PATH=$DAMASK_BIN:$PATH
|
||||||
|
|
||||||
|
@ -59,7 +62,7 @@ if [ ! -z "$PS1" ]; then
|
||||||
echo https://damask.mpie.de
|
echo https://damask.mpie.de
|
||||||
echo
|
echo
|
||||||
echo Using environment with ...
|
echo Using environment with ...
|
||||||
echo "DAMASK $DAMASK_ROOT"
|
echo "DAMASK $DAMASK_ROOT $BRANCH"
|
||||||
echo "Spectral Solver $SOLVER"
|
echo "Spectral Solver $SOLVER"
|
||||||
echo "Post Processing $PROCESSING"
|
echo "Post Processing $PROCESSING"
|
||||||
if [ "x$PETSC_DIR" != "x" ]; then
|
if [ "x$PETSC_DIR" != "x" ]; then
|
||||||
|
@ -88,12 +91,13 @@ if [ ! -z "$PS1" ]; then
|
||||||
size=$(( 1024*$(ulimit -s) )); \
|
size=$(( 1024*$(ulimit -s) )); \
|
||||||
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
||||||
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
|
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export DAMASK_NUM_THREADS
|
export DAMASK_NUM_THREADS
|
||||||
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
|
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
|
||||||
|
|
||||||
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN; do
|
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN BRANCH; do
|
||||||
unset "${var}"
|
unset "${var}"
|
||||||
done
|
done
|
||||||
for var in DAMASK MSC; do
|
for var in DAMASK MSC; do
|
||||||
|
|
|
@ -21,16 +21,19 @@ set() {
|
||||||
source $DAMASK_ROOT/CONFIG
|
source $DAMASK_ROOT/CONFIG
|
||||||
unset -f set
|
unset -f set
|
||||||
|
|
||||||
|
# add BRANCH if DAMASK_ROOT is a git repository
|
||||||
|
cd $DAMASK_ROOT >/dev/null; BRANCH=$(git branch 2>/dev/null| grep -E '^\* '); cd - >/dev/null
|
||||||
|
|
||||||
# add DAMASK_BIN if present
|
# add DAMASK_BIN if present
|
||||||
[ "x$DAMASK_BIN != x" ] && PATH=$DAMASK_BIN:$PATH
|
[[ "x$DAMASK_BIN" != "x" ]] && PATH=$DAMASK_BIN:$PATH
|
||||||
|
|
||||||
SOLVER=$(which DAMASK_spectral || true 2>/dev/null)
|
SOLVER=$(which DAMASK_spectral || true 2>/dev/null)
|
||||||
[ "x$SOLVER" = "x" ] && SOLVER=$(blink 'Not found!')
|
[[ "x$SOLVER" == "x" ]] && SOLVER=$(blink 'Not found!')
|
||||||
|
|
||||||
PROCESSING=$(which postResults || true 2>/dev/null)
|
PROCESSING=$(which postResults || true 2>/dev/null)
|
||||||
[ "x$PROCESSING" = "x" ] && PROCESSING=$(blink 'Not found!')
|
[[ "x$PROCESSING" == "x" ]] && PROCESSING=$(blink 'Not found!')
|
||||||
|
|
||||||
[ "x$DAMASK_NUM_THREADS" = "x" ] && DAMASK_NUM_THREADS=1
|
[[ "x$DAMASK_NUM_THREADS" == "x" ]] && DAMASK_NUM_THREADS=1
|
||||||
|
|
||||||
# currently, there is no information that unlimited causes problems
|
# currently, there is no information that unlimited causes problems
|
||||||
# still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it
|
# still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it
|
||||||
|
@ -50,16 +53,16 @@ if [ ! -z "$PS1" ]; then
|
||||||
echo https://damask.mpie.de
|
echo https://damask.mpie.de
|
||||||
echo
|
echo
|
||||||
echo "Using environment with ..."
|
echo "Using environment with ..."
|
||||||
echo "DAMASK $DAMASK_ROOT"
|
echo "DAMASK $DAMASK_ROOT $BRANCH"
|
||||||
echo "Spectral Solver $SOLVER"
|
echo "Spectral Solver $SOLVER"
|
||||||
echo "Post Processing $PROCESSING"
|
echo "Post Processing $PROCESSING"
|
||||||
if [ "x$PETSC_DIR" != "x" ]; then
|
if [ "x$PETSC_DIR" != "x" ]; then
|
||||||
echo -n "PETSc location "
|
echo -n "PETSc location "
|
||||||
[ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR
|
[ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR
|
||||||
[[ $(canonicalPath "$PETSC_DIR") == $PETSC_DIR ]] \
|
[[ $(canonicalPath "$PETSC_DIR") == $PETSC_DIR ]] \
|
||||||
|| echo " ~~> "$(canonicalPath "$PETSC_DIR")
|
|| echo " ~~> "$(canonicalPath "$PETSC_DIR")
|
||||||
fi
|
fi
|
||||||
[[ "x$PETSC_ARCH" == "x" ]] \
|
[[ "x$PETSC_ARCH" == "x" ]] \
|
||||||
|| echo "PETSc architecture $PETSC_ARCH"
|
|| echo "PETSc architecture $PETSC_ARCH"
|
||||||
echo -n "MSC.Marc/Mentat "
|
echo -n "MSC.Marc/Mentat "
|
||||||
[ -d $MSC_ROOT ] && echo $MSC_ROOT || blink $MSC_ROOT
|
[ -d $MSC_ROOT ] && echo $MSC_ROOT || blink $MSC_ROOT
|
||||||
|
@ -81,12 +84,13 @@ if [ ! -z "$PS1" ]; then
|
||||||
size=$(( 1024*$(ulimit -s) )); \
|
size=$(( 1024*$(ulimit -s) )); \
|
||||||
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
||||||
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
|
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export DAMASK_NUM_THREADS
|
export DAMASK_NUM_THREADS
|
||||||
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
|
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
|
||||||
|
|
||||||
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN; do
|
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN BRANCH; do
|
||||||
unset "${var}"
|
unset "${var}"
|
||||||
done
|
done
|
||||||
for var in DAMASK MSC; do
|
for var in DAMASK MSC; do
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -1,23 +0,0 @@
|
||||||
# Save by m.diehl on 2017_12_06-18.38.26; build 2017 2016_09_27-23.54.59 126836
|
|
||||||
from abaqus import *
|
|
||||||
upgradeMdb(
|
|
||||||
'/nethome/storage/raid4/m.diehl/DAMASK/examples/AbaqusStandard/SX_PX_compression-6.9-1.cae'
|
|
||||||
,
|
|
||||||
'/nethome/storage/raid4/m.diehl/DAMASK/examples/AbaqusStandard/SX_PX_compression.cae')
|
|
||||||
# Save by m.diehl on 2017_12_06-18.38.26; build 2017 2016_09_27-23.54.59 126836
|
|
||||||
from part import *
|
|
||||||
from material import *
|
|
||||||
from section import *
|
|
||||||
from assembly import *
|
|
||||||
from step import *
|
|
||||||
from interaction import *
|
|
||||||
from load import *
|
|
||||||
from mesh import *
|
|
||||||
from optimization import *
|
|
||||||
from job import *
|
|
||||||
from sketch import *
|
|
||||||
from visualization import *
|
|
||||||
from connectorBehavior import *
|
|
||||||
mdb.jobs['Job_sx-px'].setValues(description='compression', userSubroutine=
|
|
||||||
'$HOME/DAMASK/src/DAMASK_abaqus_std.f')
|
|
||||||
# Save by m.diehl on 2017_12_06-18.39.44; build 2017 2016_09_27-23.54.59 126836
|
|
|
@ -1,93 +0,0 @@
|
||||||
#-------------------#
|
|
||||||
<homogenization>
|
|
||||||
#-------------------#
|
|
||||||
|
|
||||||
[dummy]
|
|
||||||
mech none
|
|
||||||
|
|
||||||
[poly]
|
|
||||||
mech isostrain
|
|
||||||
Nconstituents 10
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------#
|
|
||||||
<microstructure>
|
|
||||||
#-------------------#
|
|
||||||
|
|
||||||
|
|
||||||
[Aluminum_001]
|
|
||||||
crystallite 1
|
|
||||||
(constituent) phase 1 texture 1 fraction 1.0
|
|
||||||
|
|
||||||
[Aluminum_10]
|
|
||||||
crystallite 1
|
|
||||||
(constituent) phase 1 texture 2 fraction 1.0
|
|
||||||
|
|
||||||
#-------------------#
|
|
||||||
<crystallite>
|
|
||||||
#-------------------#
|
|
||||||
|
|
||||||
[orientation]
|
|
||||||
(output) eulerangles
|
|
||||||
(output) grainrotation # deviation from initial orientation as axis (1-3) and angle in degree (4)
|
|
||||||
|
|
||||||
#-------------------#
|
|
||||||
<phase>
|
|
||||||
#-------------------#
|
|
||||||
|
|
||||||
|
|
||||||
[Aluminum_phenopowerlaw]
|
|
||||||
# slip only
|
|
||||||
elasticity hooke
|
|
||||||
plasticity phenopowerlaw
|
|
||||||
|
|
||||||
(output) resistance_slip
|
|
||||||
(output) shearrate_slip
|
|
||||||
(output) resolvedstress_slip
|
|
||||||
(output) totalshear
|
|
||||||
(output) resistance_twin
|
|
||||||
(output) shearrate_twin
|
|
||||||
(output) resolvedstress_twin
|
|
||||||
(output) totalvolfrac
|
|
||||||
|
|
||||||
lattice_structure fcc
|
|
||||||
Nslip 12
|
|
||||||
Ntwin 0
|
|
||||||
|
|
||||||
c11 106.75e9
|
|
||||||
c12 60.41e9
|
|
||||||
c44 28.34e9
|
|
||||||
|
|
||||||
gdot0_slip 0.001
|
|
||||||
n_slip 20
|
|
||||||
tau0_slip 31e6 # per family
|
|
||||||
tausat_slip 63e6 # per family
|
|
||||||
a_slip 2.25
|
|
||||||
gdot0_twin 0.001
|
|
||||||
n_twin 20
|
|
||||||
tau0_twin 31e6 # per family
|
|
||||||
s_pr 0 # push-up factor for slip saturation due to twinning
|
|
||||||
twin_b 0
|
|
||||||
twin_c 0
|
|
||||||
twin_d 0
|
|
||||||
twin_e 0
|
|
||||||
h0_slipslip 75e6
|
|
||||||
h0_sliptwin 0
|
|
||||||
h0_twinslip 0
|
|
||||||
h0_twintwin 0
|
|
||||||
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
|
||||||
interaction_sliptwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
|
||||||
interaction_twinslip 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
|
||||||
interaction_twintwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
|
||||||
atol_resistance 1
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------#
|
|
||||||
<texture>
|
|
||||||
#-------------------#
|
|
||||||
|
|
||||||
[001]
|
|
||||||
(gauss) phi1 0.000 Phi 45.000 phi2 0.000 scatter 0.000 fraction 1.000
|
|
||||||
|
|
||||||
[random]
|
|
|
@ -1 +0,0 @@
|
||||||
fixed_seed 1697667030
|
|
|
@ -6,7 +6,6 @@ plasticity phenopowerlaw
|
||||||
(output) shearrate_slip
|
(output) shearrate_slip
|
||||||
(output) resolvedstress_slip
|
(output) resolvedstress_slip
|
||||||
(output) accumulated_shear_slip
|
(output) accumulated_shear_slip
|
||||||
(output) totalshear
|
|
||||||
|
|
||||||
lattice_structure fcc
|
lattice_structure fcc
|
||||||
Nslip 12 # per family
|
Nslip 12 # per family
|
||||||
|
|
|
@ -19,4 +19,3 @@ tausat_slip 222.e6 412.7e6 # per family, optimization long
|
||||||
h0_slipslip 1000.0e6
|
h0_slipslip 1000.0e6
|
||||||
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
||||||
w0_slip 2.0
|
w0_slip 2.0
|
||||||
(output) totalshear
|
|
||||||
|
|
|
@ -19,4 +19,3 @@ tausat_slip 872.9e6 971.2e6 # per family
|
||||||
h0_slipslip 563.0e9
|
h0_slipslip 563.0e9
|
||||||
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
||||||
a_slip 2.0
|
a_slip 2.0
|
||||||
(output) totalshear
|
|
||||||
|
|
|
@ -14,11 +14,9 @@ plasticity phenopowerlaw
|
||||||
(output) resistance_slip
|
(output) resistance_slip
|
||||||
(output) shearrate_slip
|
(output) shearrate_slip
|
||||||
(output) resolvedstress_slip
|
(output) resolvedstress_slip
|
||||||
(output) totalshear
|
|
||||||
(output) resistance_twin
|
(output) resistance_twin
|
||||||
(output) shearrate_twin
|
(output) shearrate_twin
|
||||||
(output) resolvedstress_twin
|
(output) resolvedstress_twin
|
||||||
(output) totalvolfrac_twin
|
|
||||||
|
|
||||||
lattice_structure fcc
|
lattice_structure fcc
|
||||||
Nslip 12 # per family
|
Nslip 12 # per family
|
||||||
|
|
|
@ -9,11 +9,9 @@ elasticity hooke
|
||||||
(output) resistance_slip
|
(output) resistance_slip
|
||||||
(output) shearrate_slip
|
(output) shearrate_slip
|
||||||
(output) resolvedstress_slip
|
(output) resolvedstress_slip
|
||||||
(output) totalshear
|
|
||||||
(output) resistance_twin
|
(output) resistance_twin
|
||||||
(output) shearrate_twin
|
(output) shearrate_twin
|
||||||
(output) resolvedstress_twin
|
(output) resolvedstress_twin
|
||||||
(output) totalvolfrac_twin
|
|
||||||
|
|
||||||
lattice_structure hex
|
lattice_structure hex
|
||||||
covera_ratio 1.62350 # from Tromans 2011, Elastic Anisotropy of HCP Metal Crystals and Polycrystals
|
covera_ratio 1.62350 # from Tromans 2011, Elastic Anisotropy of HCP Metal Crystals and Polycrystals
|
||||||
|
|
|
@ -5,11 +5,9 @@ elasticity hooke
|
||||||
# (output) resistance_slip
|
# (output) resistance_slip
|
||||||
# (output) shearrate_slip
|
# (output) shearrate_slip
|
||||||
# (output) resolvedstress_slip
|
# (output) resolvedstress_slip
|
||||||
# (output) totalshear
|
|
||||||
# (output) resistance_twin
|
# (output) resistance_twin
|
||||||
# (output) shearrate_twin
|
# (output) shearrate_twin
|
||||||
# (output) resolvedstress_twin
|
# (output) resolvedstress_twin
|
||||||
# (output) totalvolfrac_twin
|
|
||||||
|
|
||||||
lattice_structure hex
|
lattice_structure hex
|
||||||
covera_ratio 1.587
|
covera_ratio 1.587
|
||||||
|
|
|
@ -6,12 +6,10 @@ plasticity phenopowerlaw
|
||||||
(output) shearrate_slip
|
(output) shearrate_slip
|
||||||
(output) resolvedstress_slip
|
(output) resolvedstress_slip
|
||||||
(output) accumulated_shear_slip
|
(output) accumulated_shear_slip
|
||||||
(output) totalshear
|
|
||||||
(output) resistance_twin
|
(output) resistance_twin
|
||||||
(output) shearrate_twin
|
(output) shearrate_twin
|
||||||
(output) resolvedstress_twin
|
(output) resolvedstress_twin
|
||||||
(output) accumulated_shear_twin
|
(output) accumulated_shear_twin
|
||||||
(output) totalvolfrac_twin
|
|
||||||
|
|
||||||
lattice_structure fcc
|
lattice_structure fcc
|
||||||
Nslip 12 # per family
|
Nslip 12 # per family
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTHIGHMP $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRANLOWMP $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRANMP $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$FORTRAN $user.f || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user.f"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$user.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $user.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
|
@ -1,752 +0,0 @@
|
||||||
#
|
|
||||||
# General definitions for the Marc 2016 version
|
|
||||||
#
|
|
||||||
# EM64T
|
|
||||||
#
|
|
||||||
# Linux RedHat 6.3 / SuSE 11
|
|
||||||
#
|
|
||||||
# 64 bit MPI version
|
|
||||||
#
|
|
||||||
# Intel(R) Fortran Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 15.0.0.090 Build 20140723
|
|
||||||
#
|
|
||||||
# Intel(R) C Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 15.0.0.090 Build 20140723
|
|
||||||
#
|
|
||||||
# To check the O/S level, type:
|
|
||||||
# uname -a
|
|
||||||
#
|
|
||||||
# Distributed parallel MPI libraries:
|
|
||||||
# 1) HP MPI 2.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpirun -version
|
|
||||||
# 2) Intel MPI 5.1.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpiexec.hydra -version
|
|
||||||
#
|
|
||||||
# To check the Compiler level, type using the compiler
|
|
||||||
# installation path:
|
|
||||||
# ifort -V
|
|
||||||
# icc -V
|
|
||||||
#
|
|
||||||
# REMARKS : This file contains the definitions of variables used during
|
|
||||||
# compilation loading and use of the MARC programmes . The
|
|
||||||
# current machine type is identified by means of the variable
|
|
||||||
# MACHINE , defined below.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# MPI_ROOT: root directory in which mpi shared libraries, etc. are located
|
|
||||||
# DIRJOB : directory in which spawned jobs should look for Marc input
|
|
||||||
# MPI_ARCH: system architecture
|
|
||||||
# MPI_EPATH: path where executable resides
|
|
||||||
#
|
|
||||||
REVISION="VERSION, BUILD"
|
|
||||||
HOSTNAME=`hostname`
|
|
||||||
|
|
||||||
# find available memory in Mbyte on the machine
|
|
||||||
# can be set explicitly
|
|
||||||
MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'`
|
|
||||||
|
|
||||||
# set _OEM_NASTRAN to 1 for MD Nastran build
|
|
||||||
# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable
|
|
||||||
_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}"
|
|
||||||
|
|
||||||
# uncomment the following line for an autoforge build
|
|
||||||
#AUTOFORGE=1
|
|
||||||
AUTOFORGE=0
|
|
||||||
export AUTOFORGE
|
|
||||||
|
|
||||||
# integer size
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "" ; then
|
|
||||||
INTEGER_PATH=
|
|
||||||
else
|
|
||||||
INTEGER_PATH=/$MARC_INTEGER_SIZE
|
|
||||||
fi
|
|
||||||
|
|
||||||
FCOMP=ifort
|
|
||||||
INTELPATH="/opt/intel/composer_xe_2015.0.090"
|
|
||||||
|
|
||||||
# find the root directory of the compiler installation:
|
|
||||||
# - if ifort is found in $PATH, then the root directory is derived
|
|
||||||
# from the path to ifort
|
|
||||||
# - if ifort is not found in $PATH, the root directory is assumed
|
|
||||||
# to be $INTELPATH and the directory in which ifort is found is
|
|
||||||
# added to $PATH
|
|
||||||
FCOMPPATH=`which "$FCOMP" 2>/dev/null`
|
|
||||||
if test -n "$FCOMPPATH"; then
|
|
||||||
# derive the root directory from $FCOMPPATH
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/intel64/$FCOMP}"
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/$FCOMP}"
|
|
||||||
fi
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
elif test -d "$INTELPATH"; then
|
|
||||||
# check for compiler in $INTELPATH
|
|
||||||
if test -d "$INTELPATH/bin/intel64" -a \
|
|
||||||
-x "$INTELPATH/bin/intel64/$FCOMP" ; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin/intel64:$PATH"
|
|
||||||
elif test -d "$INTELPATH/bin" -a \
|
|
||||||
-x "$INTELPATH/bin/$FCOMP"; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin:$PATH"
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
|
|
||||||
# settings for MKL
|
|
||||||
MARC_MKL="$FCOMPROOT/mkl/lib/intel64"
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for Metis
|
|
||||||
#
|
|
||||||
METIS="-I$METIS_SOURCE/include"
|
|
||||||
METISLIBS="$MARC_LIB/metis.a "
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
# RCP and RSH are used for parallel network runs
|
|
||||||
# replace with similar commands like rsh if needed
|
|
||||||
RCP=/usr/bin/scp
|
|
||||||
RSH=/usr/bin/ssh
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
MPI_DEFAULT=intelmpi
|
|
||||||
MPI_OTHER=hpmpi
|
|
||||||
|
|
||||||
MPITYPE=$MPI_DEFAULT
|
|
||||||
|
|
||||||
if test $AUTOFORGE
|
|
||||||
then
|
|
||||||
if test $AUTOFORGE = 1
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# overrule MPITYPE setting with environmental variable MARC_MPITYPE
|
|
||||||
if test $MARC_MPITYPE
|
|
||||||
then
|
|
||||||
MPITYPE=$MARC_MPITYPE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# always set MPITYPE to none for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following lines to build with GPGPU version of BCS Solver for
|
|
||||||
# NVIDIA platforms
|
|
||||||
#BCSGPUSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=BCSGPU
|
|
||||||
|
|
||||||
SOLVERFLAGS=
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA"
|
|
||||||
BCS_DIR=bcsgpusolver
|
|
||||||
export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH
|
|
||||||
export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH
|
|
||||||
else
|
|
||||||
BCS_DIR=bcssolver
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
DDM=
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
FCOMPMPI=mpif90
|
|
||||||
export MPI_ROOT=$MARC_HPMPI
|
|
||||||
export MPI_REMSH=$RSH
|
|
||||||
export MPI_F77=$FCOMP
|
|
||||||
ARCHITECTURE=linux_amd64
|
|
||||||
DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI"
|
|
||||||
MPI_CLEAN=
|
|
||||||
export MPI_EPATH=$MARC_BIN
|
|
||||||
export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH
|
|
||||||
export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1"
|
|
||||||
# Below line is moved in run_marc file
|
|
||||||
# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN"
|
|
||||||
if test -n "$MSC_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
if test -n "$LM_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x"
|
|
||||||
RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f "
|
|
||||||
RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np "
|
|
||||||
RUN_JOB0=
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
INTELMPI_VERSION=HYDRA
|
|
||||||
FCOMPMPI=mpiifort
|
|
||||||
MPI_ROOT=$MARC_INTELMPI
|
|
||||||
DDM="-I${MPI_ROOT}/include64 -DDDM"
|
|
||||||
PATH=$MPI_ROOT/bin64:$PATH
|
|
||||||
export PATH
|
|
||||||
LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH
|
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
if test $INTELMPI_VERSION = HYDRA
|
|
||||||
then
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall"
|
|
||||||
else
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile "
|
|
||||||
fi
|
|
||||||
RUN_JOB0=
|
|
||||||
MPI_CLEAN=
|
|
||||||
MPI_EPATH=$MARC_BIN
|
|
||||||
MPIR_HOME=$MPI_ROOT
|
|
||||||
MPICH_F77=$FCOMP
|
|
||||||
MPICH_F77LINKER=$FCOMP
|
|
||||||
export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER
|
|
||||||
I_MPI_PIN_DOMAIN=node
|
|
||||||
export I_MPI_PIN_DOMAIN
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
export MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
DDM="-I$MPI_ROOT/include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# variables for the "maintain" script
|
|
||||||
#
|
|
||||||
|
|
||||||
MACHINENAME=LINUX
|
|
||||||
MACHINE64BIT=yes
|
|
||||||
MACHINE=Linux_EM64T
|
|
||||||
DEV=/dev/tape
|
|
||||||
GETLOG="whoami"
|
|
||||||
CLEAR="clear"
|
|
||||||
MY_UNAME=`uname -a`
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with VKI Solver
|
|
||||||
#VKISOLVER=VKI
|
|
||||||
VKISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with CASI Solver
|
|
||||||
CASISOLVER=CASI
|
|
||||||
if test "$MARC_CASISOLVER" = "NONE" ; then
|
|
||||||
CASISOLVER=NONE
|
|
||||||
fi
|
|
||||||
#CASISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with MF2 Solver
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
#MF2SOLVER=SERIAL
|
|
||||||
#MF2SOLVER=MF2PARALLEL
|
|
||||||
|
|
||||||
# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO)
|
|
||||||
#INTELSOLVER=NONE
|
|
||||||
INTELSOLVER=PARDISO
|
|
||||||
|
|
||||||
# Edit following lines to build with MUMPS
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
else
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following 2 lines to build MARC dynamic shared library
|
|
||||||
MARC_DLL=MARC_DLL
|
|
||||||
MARC_DLL=NONE
|
|
||||||
|
|
||||||
# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
VKISOLVER=NONE
|
|
||||||
CASISOLVER=NONE
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
INTELSOLVER=NONE
|
|
||||||
MUMPSSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=NONE
|
|
||||||
MARC_DLL=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# define Fortran and C compile syntax
|
|
||||||
#
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DVKI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DCASI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL"
|
|
||||||
fi
|
|
||||||
if test "$MF2SOLVER" = MF2SERIAL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$INTELSOLVER" = PARDISO
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DPARDISO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMUMPS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LINK_OPT=
|
|
||||||
DEBUG_OPT=
|
|
||||||
C_DEBUG_OPT=
|
|
||||||
|
|
||||||
#Uncomment following line to build Marc in debuggable mode
|
|
||||||
MARCDEBUG=
|
|
||||||
#MARCDEBUG="ON"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
LINK_OPT="-debug -traceback"
|
|
||||||
DEBUG_OPT="-debug -traceback"
|
|
||||||
C_DEBUG_OPT="-debug -traceback"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
MARCCHECK=
|
|
||||||
#MARCCHECK="ON"
|
|
||||||
if test "$MARCCHECK" = "ON"
|
|
||||||
then
|
|
||||||
DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv "
|
|
||||||
C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv "
|
|
||||||
fi
|
|
||||||
|
|
||||||
MARCCODECOV=
|
|
||||||
#MARCCODECOV="ON"
|
|
||||||
|
|
||||||
MARCCODEPROF=
|
|
||||||
#MARCCODEPROF="ON"
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
I8FFLAGS="-real-size 64 -integer-size 32"
|
|
||||||
I8DEFINES="-DFLOAT=8 -DINT=4"
|
|
||||||
I8CDEFINES=
|
|
||||||
I8CASIDEFS=
|
|
||||||
else
|
|
||||||
I8FFLAGS="-i8 -real-size 64 -integer-size 64"
|
|
||||||
I8DEFINES="-DI64 -DFLOAT=8 -DINT=8"
|
|
||||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
|
||||||
I8CASIDEFS="-DCASI_64BIT_INT=1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
MTHREAD=OPENMP
|
|
||||||
if test "$MARC_OPENMP" = "NONE" ; then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
#MTHREAD=NONE
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
OMP_COMPAT=YES
|
|
||||||
if test "$MTHREAD" = "NONE"
|
|
||||||
then
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
fi
|
|
||||||
|
|
||||||
CDEFINES=
|
|
||||||
FDEFINES=
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CDEFINES="$CDEFINES -D_OEM_NASTRAN"
|
|
||||||
FDEFINES="$FDEFINES -D_OEM_NASTRAN"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FDEFINES="$FDEFINES -D_IMPLICITNONE"
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -eq 0
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DMKL -DOPENMP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DOMP_COMPAT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -D_MSCMARC
|
|
||||||
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT $MARC_SIMUFACT"
|
|
||||||
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
|
|
||||||
|
|
||||||
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CINCL="$CINCL -I../../include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel"
|
|
||||||
CCT="$CC"
|
|
||||||
CCTLOW="$CCLOW"
|
|
||||||
CCTHIGH="$CCHIGH"
|
|
||||||
|
|
||||||
CC_CASI="$CC -std=c99 $I8CASIDEFS"
|
|
||||||
CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
CCT_CASI="$CCT -std=c99 $I8CASIDEFS"
|
|
||||||
CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
#PROFILE="-Mprof=func"
|
|
||||||
#PROFILE="-Mprof=lines"
|
|
||||||
#PROFILE="-Mprof=func,mpi"
|
|
||||||
PROFILE=
|
|
||||||
if test "$MARCCODECOV" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE="-prof-gen=srcpos"
|
|
||||||
fi
|
|
||||||
if test "$MARCCODEPROF" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE=" $PROFILE -pg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORT_OPT="-c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB -fp-model source"
|
|
||||||
if test "$MTHREAD" = "OPENMP"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -qopenmp"
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -qopenmp-threadprivate=compat"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# FORT_OPT=" $FORT_OPT -auto "
|
|
||||||
FORT_OPT=" $FORT_OPT -save -zero"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
|
|
||||||
# determine DAMASK version
|
|
||||||
if test -n "$DAMASK_USER"; then
|
|
||||||
DAMASKROOT=`dirname $DAMASK_USER`/..
|
|
||||||
read DAMASKVERSION < $DAMASKROOT/VERSION
|
|
||||||
DAMASKVERSION="'"$DAMASKVERSION"'"
|
|
||||||
else
|
|
||||||
DAMASKVERSION="'N/A'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
|
||||||
DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2016 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2016 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2016 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
|
|
||||||
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
|
||||||
DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2016 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2016 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2016 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOWT="$FORTLOW"
|
|
||||||
FORTRANT="$FORTRAN"
|
|
||||||
FORTHIGHT="$FORTHIGH"
|
|
||||||
|
|
||||||
FORTRANMNF="$FCOMP -c $FDEFINES "
|
|
||||||
CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE"
|
|
||||||
|
|
||||||
FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main"
|
|
||||||
CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include"
|
|
||||||
|
|
||||||
|
|
||||||
BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL"
|
|
||||||
NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES "
|
|
||||||
NVCCLIB="ar rvl"
|
|
||||||
NVCCLD=icc
|
|
||||||
BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORT90HIGH="$BCSFORTHIGH"
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
BCSFORTRAN=$BCSFORTLOW
|
|
||||||
BCSFORTHIGH=$BCSFORTLOW
|
|
||||||
BCSFORT90HIGH=$BCSFORTLOW
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include"
|
|
||||||
# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
LOAD="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
LOAD="$FCOMP $LINK_OPT -o "
|
|
||||||
LOADT="$FCOMP $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
|
||||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
|
||||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
|
||||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
|
||||||
CC="$CC -fPIC"
|
|
||||||
CCMNF="$CCMNF -fPIC"
|
|
||||||
CC_CASI="$CC_CASI -fPIC"
|
|
||||||
CCLOW_CASI="$CCLOW_CASI -fPIC"
|
|
||||||
CCHIGH_CASI="$CCHIGH_CASI -fPIC"
|
|
||||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread"
|
|
||||||
LINK_MARC_DLL="-shared -fPIC"
|
|
||||||
LOAD_DLL=$LOAD
|
|
||||||
LOADT_DLL=$LOADT
|
|
||||||
EXT_DLL="so"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
XLIBS="-L/usr/X11/lib -lX11 "
|
|
||||||
|
|
||||||
#
|
|
||||||
# define archive and ranlib syntax
|
|
||||||
#
|
|
||||||
|
|
||||||
ARC="ar rvl"
|
|
||||||
ARD="ar dvl"
|
|
||||||
ARX="ar xl"
|
|
||||||
RAN=""
|
|
||||||
|
|
||||||
#
|
|
||||||
# choose which libraries you want to use ( e.g. blas )
|
|
||||||
#
|
|
||||||
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
VKISOLVERLIBS="$MARC_LIB/vkisolver.a"
|
|
||||||
else
|
|
||||||
VKISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
CASISOLVERLIBS="$MARC_CASI/casilib.a"
|
|
||||||
else
|
|
||||||
CASISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
MF2SOLVERLIBS=
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \
|
|
||||||
$MARC_LIB/mf2parallel/libsym.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmet.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libnum.a \
|
|
||||||
$MARC_LIB/mf2parallel/libutl.a \
|
|
||||||
$MARC_LIB/mf2parallel/libr8.a \
|
|
||||||
$MARC_LIB/mf2parallel/libz.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a"
|
|
||||||
if test $MPITYPE = none
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
echo hello > /dev/null
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a "
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a"
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS=
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a "
|
|
||||||
MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda "
|
|
||||||
MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda "
|
|
||||||
MARCCUDALIBS=$MARCCUDALIBS1
|
|
||||||
CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda "
|
|
||||||
else
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group"
|
|
||||||
else
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SECLIBS="-L$MARC_LIB -llapi"
|
|
||||||
|
|
||||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} ${MUMPSSOLVERLIBS2} \
|
|
||||||
$MKLLIB -L$MARC_MKL -liomp5 \
|
|
||||||
$MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a "
|
|
||||||
|
|
||||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
|
||||||
|
|
||||||
MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}"
|
|
||||||
MRCLIBSPAR="$MARC_LIB/clib.a"
|
|
||||||
STUBS="$MARC_LIB/stubs.a "
|
|
||||||
MNFLIBS="$MARC_LIB/libmnf.a"
|
|
||||||
MDUSER="$MARC_LIB/md_user.a"
|
|
||||||
if test "X$MARC_SIMUFACT" != "X"
|
|
||||||
then
|
|
||||||
SFLIB="-L$SFMATDIR -lMBA_Grain $SFMATDIR/sfclib.a "
|
|
||||||
else
|
|
||||||
SFLIB=" "
|
|
||||||
fi
|
|
||||||
|
|
||||||
OPENMP="-qopenmp"
|
|
||||||
|
|
||||||
SYSLIBS=" $OPENMP -lpthread "
|
|
||||||
|
|
||||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \
|
|
||||||
# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt"
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi_mt -lmpifort -lrt $OPENMP -threads -lpthread "
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
SYSLIBSPAR=" "
|
|
||||||
|
|
||||||
MARC_DLL_CODES="runmarc.f"
|
|
||||||
|
|
||||||
|
|
||||||
BLAS_SRC="dzero.f icopy.f izero.f"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f"
|
|
||||||
else
|
|
||||||
BLAS_SRC="ALL"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \
|
|
||||||
omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \
|
|
||||||
elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \
|
|
||||||
cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \
|
|
||||||
inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f"
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
|
||||||
LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f"
|
|
||||||
fi
|
|
||||||
LOW_OPT_CODES_CASI=""
|
|
||||||
|
|
||||||
HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \
|
|
||||||
dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \
|
|
||||||
dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f "
|
|
||||||
|
|
||||||
|
|
||||||
HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c"
|
|
||||||
|
|
||||||
MAXNUM=1000000
|
|
|
@ -1,714 +0,0 @@
|
||||||
#
|
|
||||||
# General definitions for the Marc 2016 version
|
|
||||||
#
|
|
||||||
# EM64T
|
|
||||||
#
|
|
||||||
# Linux RedHat 6.3 / SuSE 11
|
|
||||||
#
|
|
||||||
# 64 bit MPI version
|
|
||||||
#
|
|
||||||
# Intel(R) Fortran Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 15.0.0.090 Build 20140723
|
|
||||||
#
|
|
||||||
# Intel(R) C Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 15.0.0.090 Build 20140723
|
|
||||||
#
|
|
||||||
# To check the O/S level, type:
|
|
||||||
# uname -a
|
|
||||||
#
|
|
||||||
# Distributed parallel MPI libraries:
|
|
||||||
# 1) HP MPI 2.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpirun -version
|
|
||||||
# 2) Intel MPI 5.1.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpiexec.hydra -version
|
|
||||||
#
|
|
||||||
# To check the Compiler level, type using the compiler
|
|
||||||
# installation path:
|
|
||||||
# ifort -V
|
|
||||||
# icc -V
|
|
||||||
#
|
|
||||||
# REMARKS : This file contains the definitions of variables used during
|
|
||||||
# compilation loading and use of the MARC programmes . The
|
|
||||||
# current machine type is identified by means of the variable
|
|
||||||
# MACHINE , defined below.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# MPI_ROOT: root directory in which mpi shared libraries, etc. are located
|
|
||||||
# DIRJOB : directory in which spawned jobs should look for Marc input
|
|
||||||
# MPI_ARCH: system architecture
|
|
||||||
# MPI_EPATH: path where executable resides
|
|
||||||
#
|
|
||||||
REVISION="VERSION, BUILD"
|
|
||||||
HOSTNAME=`hostname`
|
|
||||||
|
|
||||||
# find available memory in Mbyte on the machine
|
|
||||||
# can be set explicitly
|
|
||||||
MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'`
|
|
||||||
|
|
||||||
# set _OEM_NASTRAN to 1 for MD Nastran build
|
|
||||||
# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable
|
|
||||||
_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}"
|
|
||||||
|
|
||||||
# uncomment the following line for an autoforge build
|
|
||||||
#AUTOFORGE=1
|
|
||||||
AUTOFORGE=0
|
|
||||||
export AUTOFORGE
|
|
||||||
|
|
||||||
# integer size
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "" ; then
|
|
||||||
INTEGER_PATH=
|
|
||||||
else
|
|
||||||
INTEGER_PATH=/$MARC_INTEGER_SIZE
|
|
||||||
fi
|
|
||||||
|
|
||||||
FCOMP=ifort
|
|
||||||
INTELPATH="/opt/intel/composer_xe_2015.0.090"
|
|
||||||
|
|
||||||
# find the root directory of the compiler installation:
|
|
||||||
# - if ifort is found in $PATH, then the root directory is derived
|
|
||||||
# from the path to ifort
|
|
||||||
# - if ifort is not found in $PATH, the root directory is assumed
|
|
||||||
# to be $INTELPATH and the directory in which ifort is found is
|
|
||||||
# added to $PATH
|
|
||||||
FCOMPPATH=`which "$FCOMP" 2>/dev/null`
|
|
||||||
if test -n "$FCOMPPATH"; then
|
|
||||||
# derive the root directory from $FCOMPPATH
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/intel64/$FCOMP}"
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/$FCOMP}"
|
|
||||||
fi
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
elif test -d "$INTELPATH"; then
|
|
||||||
# check for compiler in $INTELPATH
|
|
||||||
if test -d "$INTELPATH/bin/intel64" -a \
|
|
||||||
-x "$INTELPATH/bin/intel64/$FCOMP" ; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin/intel64:$PATH"
|
|
||||||
elif test -d "$INTELPATH/bin" -a \
|
|
||||||
-x "$INTELPATH/bin/$FCOMP"; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin:$PATH"
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
|
|
||||||
# settings for MKL
|
|
||||||
MARC_MKL="$FCOMPROOT/mkl/lib/intel64"
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for Metis
|
|
||||||
#
|
|
||||||
METIS="-I$METIS_SOURCE/include"
|
|
||||||
METISLIBS="$MARC_LIB/metis.a "
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
# RCP and RSH are used for parallel network runs
|
|
||||||
# replace with similar commands like rsh if needed
|
|
||||||
RCP=/usr/bin/scp
|
|
||||||
RSH=/usr/bin/ssh
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
MPI_DEFAULT=intelmpi
|
|
||||||
MPI_OTHER=hpmpi
|
|
||||||
|
|
||||||
MPITYPE=$MPI_DEFAULT
|
|
||||||
|
|
||||||
if test $AUTOFORGE
|
|
||||||
then
|
|
||||||
if test $AUTOFORGE = 1
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# overrule MPITYPE setting with environmental variable MARC_MPITYPE
|
|
||||||
if test $MARC_MPITYPE
|
|
||||||
then
|
|
||||||
MPITYPE=$MARC_MPITYPE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# always set MPITYPE to none for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following lines to build with GPGPU version of BCS Solver for
|
|
||||||
# NVIDIA platforms
|
|
||||||
#BCSGPUSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=BCSGPU
|
|
||||||
|
|
||||||
SOLVERFLAGS=
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA"
|
|
||||||
BCS_DIR=bcsgpusolver
|
|
||||||
export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH
|
|
||||||
export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH
|
|
||||||
else
|
|
||||||
BCS_DIR=bcssolver
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
DDM=
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
FCOMPMPI=mpif90
|
|
||||||
export MPI_ROOT=$MARC_HPMPI
|
|
||||||
export MPI_REMSH=$RSH
|
|
||||||
export MPI_F77=$FCOMP
|
|
||||||
ARCHITECTURE=linux_amd64
|
|
||||||
DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI"
|
|
||||||
MPI_CLEAN=
|
|
||||||
export MPI_EPATH=$MARC_BIN
|
|
||||||
export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH
|
|
||||||
export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1"
|
|
||||||
# Below line is moved in run_marc file
|
|
||||||
# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN"
|
|
||||||
if test -n "$MSC_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
if test -n "$LM_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x"
|
|
||||||
RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f "
|
|
||||||
RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np "
|
|
||||||
RUN_JOB0=
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
INTELMPI_VERSION=HYDRA
|
|
||||||
FCOMPMPI=mpiifort
|
|
||||||
MPI_ROOT=$MARC_INTELMPI
|
|
||||||
DDM="-I${MPI_ROOT}/include64 -DDDM"
|
|
||||||
PATH=$MPI_ROOT/bin64:$PATH
|
|
||||||
export PATH
|
|
||||||
LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH
|
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
if test $INTELMPI_VERSION = HYDRA
|
|
||||||
then
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall"
|
|
||||||
else
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile "
|
|
||||||
fi
|
|
||||||
RUN_JOB0=
|
|
||||||
MPI_CLEAN=
|
|
||||||
MPI_EPATH=$MARC_BIN
|
|
||||||
MPIR_HOME=$MPI_ROOT
|
|
||||||
MPICH_F77=$FCOMP
|
|
||||||
MPICH_F77LINKER=$FCOMP
|
|
||||||
export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER
|
|
||||||
I_MPI_PIN_DOMAIN=node
|
|
||||||
export I_MPI_PIN_DOMAIN
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
export MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
DDM="-I$MPI_ROOT/include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# variables for the "maintain" script
|
|
||||||
#
|
|
||||||
|
|
||||||
MACHINENAME=LINUX
|
|
||||||
MACHINE64BIT=yes
|
|
||||||
MACHINE=Linux_EM64T
|
|
||||||
DEV=/dev/tape
|
|
||||||
GETLOG="whoami"
|
|
||||||
CLEAR="clear"
|
|
||||||
MY_UNAME=`uname -a`
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with VKI Solver
|
|
||||||
#VKISOLVER=VKI
|
|
||||||
VKISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with CASI Solver
|
|
||||||
CASISOLVER=CASI
|
|
||||||
if test "$MARC_CASISOLVER" = "NONE" ; then
|
|
||||||
CASISOLVER=NONE
|
|
||||||
fi
|
|
||||||
#CASISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with MF2 Solver
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
#MF2SOLVER=SERIAL
|
|
||||||
#MF2SOLVER=MF2PARALLEL
|
|
||||||
|
|
||||||
# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO)
|
|
||||||
#INTELSOLVER=NONE
|
|
||||||
INTELSOLVER=PARDISO
|
|
||||||
|
|
||||||
# Edit following lines to build with MUMPS
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
else
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following 2 lines to build MARC dynamic shared library
|
|
||||||
MARC_DLL=MARC_DLL
|
|
||||||
MARC_DLL=NONE
|
|
||||||
|
|
||||||
# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
VKISOLVER=NONE
|
|
||||||
CASISOLVER=NONE
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
INTELSOLVER=NONE
|
|
||||||
MUMPSSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=NONE
|
|
||||||
MARC_DLL=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# define Fortran and C compile syntax
|
|
||||||
#
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DVKI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DCASI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL"
|
|
||||||
fi
|
|
||||||
if test "$MF2SOLVER" = MF2SERIAL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$INTELSOLVER" = PARDISO
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DPARDISO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMUMPS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LINK_OPT=
|
|
||||||
DEBUG_OPT=
|
|
||||||
C_DEBUG_OPT=
|
|
||||||
|
|
||||||
#Uncomment following line to build Marc in debuggable mode
|
|
||||||
MARCDEBUG=
|
|
||||||
#MARCDEBUG="ON"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
LINK_OPT="-debug -traceback"
|
|
||||||
DEBUG_OPT="-debug -traceback"
|
|
||||||
C_DEBUG_OPT="-debug -traceback"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
MARCCHECK=
|
|
||||||
#MARCCHECK="ON"
|
|
||||||
if test "$MARCCHECK" = "ON"
|
|
||||||
then
|
|
||||||
DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv "
|
|
||||||
C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv "
|
|
||||||
fi
|
|
||||||
|
|
||||||
MARCCODECOV=
|
|
||||||
#MARCCODECOV="ON"
|
|
||||||
|
|
||||||
MARCCODEPROF=
|
|
||||||
#MARCCODEPROF="ON"
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
I8FFLAGS=
|
|
||||||
I8DEFINES=
|
|
||||||
I8CDEFINES=
|
|
||||||
I8CASIDEFS=
|
|
||||||
else
|
|
||||||
I8FFLAGS="-i8"
|
|
||||||
I8DEFINES="-DI64"
|
|
||||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
|
||||||
I8CASIDEFS="-DCASI_64BIT_INT=1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
MTHREAD=OPENMP
|
|
||||||
if test "$MARC_OPENMP" = "NONE" ; then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
#MTHREAD=NONE
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
OMP_COMPAT=YES
|
|
||||||
if test "$MTHREAD" = "NONE"
|
|
||||||
then
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
fi
|
|
||||||
|
|
||||||
CDEFINES=
|
|
||||||
FDEFINES=
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CDEFINES="$CDEFINES -D_OEM_NASTRAN"
|
|
||||||
FDEFINES="$FDEFINES -D_OEM_NASTRAN"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FDEFINES="$FDEFINES -D_IMPLICITNONE"
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -eq 0
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DMKL -DOPENMP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DOMP_COMPAT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -D_MSCMARC
|
|
||||||
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT $MARC_SIMUFACT"
|
|
||||||
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
|
|
||||||
|
|
||||||
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CINCL="$CINCL -I../../include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS "
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel"
|
|
||||||
CCT="$CC"
|
|
||||||
CCTLOW="$CCLOW"
|
|
||||||
CCTHIGH="$CCHIGH"
|
|
||||||
|
|
||||||
CC_CASI="$CC -std=c99 $I8CASIDEFS"
|
|
||||||
CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
CCT_CASI="$CCT -std=c99 $I8CASIDEFS"
|
|
||||||
CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
#PROFILE="-Mprof=func"
|
|
||||||
#PROFILE="-Mprof=lines"
|
|
||||||
#PROFILE="-Mprof=func,mpi"
|
|
||||||
PROFILE=
|
|
||||||
if test "$MARCCODECOV" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE="-prof-gen=srcpos"
|
|
||||||
fi
|
|
||||||
if test "$MARCCODEPROF" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE=" $PROFILE -pg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB -fp-model source"
|
|
||||||
if test "$MTHREAD" = "OPENMP"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -openmp"
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -openmp-threadprivate=compat"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# FORT_OPT=" $FORT_OPT -auto "
|
|
||||||
FORT_OPT=" $FORT_OPT -save -zero"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOWT="$FORTLOW"
|
|
||||||
FORTRANT="$FORTRAN"
|
|
||||||
FORTHIGHT="$FORTHIGH"
|
|
||||||
|
|
||||||
FORTRANMNF="$FCOMP -c $FDEFINES "
|
|
||||||
CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE"
|
|
||||||
|
|
||||||
FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main"
|
|
||||||
CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include"
|
|
||||||
|
|
||||||
|
|
||||||
BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL"
|
|
||||||
NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES "
|
|
||||||
NVCCLIB="ar rvl"
|
|
||||||
NVCCLD=icc
|
|
||||||
BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORT90HIGH="$BCSFORTHIGH"
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
BCSFORTRAN=$BCSFORTLOW
|
|
||||||
BCSFORTHIGH=$BCSFORTLOW
|
|
||||||
BCSFORT90HIGH=$BCSFORTLOW
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include"
|
|
||||||
# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
LOAD="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
LOAD="$FCOMP $LINK_OPT -o "
|
|
||||||
LOADT="$FCOMP $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
|
||||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
|
||||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
|
||||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
|
||||||
CC="$CC -fPIC"
|
|
||||||
CCMNF="$CCMNF -fPIC"
|
|
||||||
CC_CASI="$CC_CASI -fPIC"
|
|
||||||
CCLOW_CASI="$CCLOW_CASI -fPIC"
|
|
||||||
CCHIGH_CASI="$CCHIGH_CASI -fPIC"
|
|
||||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread"
|
|
||||||
LINK_MARC_DLL="-shared -fPIC"
|
|
||||||
LOAD_DLL=$LOAD
|
|
||||||
LOADT_DLL=$LOADT
|
|
||||||
EXT_DLL="so"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
XLIBS="-L/usr/X11/lib -lX11 "
|
|
||||||
|
|
||||||
#
|
|
||||||
# define archive and ranlib syntax
|
|
||||||
#
|
|
||||||
|
|
||||||
ARC="ar rvl"
|
|
||||||
ARD="ar dvl"
|
|
||||||
ARX="ar xl"
|
|
||||||
RAN=""
|
|
||||||
|
|
||||||
#
|
|
||||||
# choose which libraries you want to use ( e.g. blas )
|
|
||||||
#
|
|
||||||
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
VKISOLVERLIBS="$MARC_LIB/vkisolver.a"
|
|
||||||
else
|
|
||||||
VKISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
CASISOLVERLIBS="$MARC_CASI/casilib.a"
|
|
||||||
else
|
|
||||||
CASISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
MF2SOLVERLIBS=
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \
|
|
||||||
$MARC_LIB/mf2parallel/libsym.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmet.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libnum.a \
|
|
||||||
$MARC_LIB/mf2parallel/libutl.a \
|
|
||||||
$MARC_LIB/mf2parallel/libr8.a \
|
|
||||||
$MARC_LIB/mf2parallel/libz.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a"
|
|
||||||
if test $MPITYPE = none
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
echo hello > /dev/null
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a "
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a"
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS=
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a "
|
|
||||||
MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda "
|
|
||||||
MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda "
|
|
||||||
MARCCUDALIBS=$MARCCUDALIBS1
|
|
||||||
CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda "
|
|
||||||
else
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group"
|
|
||||||
else
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a $MARC_MKL/libmkl_blacs_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SECLIBS="-L$MARC_LIB -llapi"
|
|
||||||
|
|
||||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} ${MUMPSSOLVERLIBS2} \
|
|
||||||
$MKLLIB -L$MARC_MKL -liomp5 \
|
|
||||||
$MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a "
|
|
||||||
|
|
||||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
|
||||||
|
|
||||||
MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}"
|
|
||||||
MRCLIBSPAR="$MARC_LIB/clib.a"
|
|
||||||
STUBS="$MARC_LIB/stubs.a "
|
|
||||||
MNFLIBS="$MARC_LIB/libmnf.a"
|
|
||||||
MDUSER="$MARC_LIB/md_user.a"
|
|
||||||
if test "X$MARC_SIMUFACT" != "X"
|
|
||||||
then
|
|
||||||
SFLIB="-L$SFMATDIR -lMBA_Grain $SFMATDIR/sfclib.a "
|
|
||||||
else
|
|
||||||
SFLIB=" "
|
|
||||||
fi
|
|
||||||
|
|
||||||
OPENMP="-openmp"
|
|
||||||
|
|
||||||
SYSLIBS=" $OPENMP -lpthread -shared-intel "
|
|
||||||
|
|
||||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \
|
|
||||||
# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt"
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi_mt -lmpifort -lrt $OPENMP -threads -lpthread -shared-intel "
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
SYSLIBSPAR=" "
|
|
||||||
|
|
||||||
MARC_DLL_CODES="runmarc.f"
|
|
||||||
|
|
||||||
|
|
||||||
BLAS_SRC="dzero.f icopy.f izero.f"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f"
|
|
||||||
else
|
|
||||||
BLAS_SRC="ALL"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \
|
|
||||||
omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \
|
|
||||||
elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \
|
|
||||||
cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \
|
|
||||||
inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f"
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
|
||||||
LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f"
|
|
||||||
fi
|
|
||||||
LOW_OPT_CODES_CASI=""
|
|
||||||
|
|
||||||
HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \
|
|
||||||
dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \
|
|
||||||
dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f "
|
|
||||||
|
|
||||||
|
|
||||||
HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c"
|
|
||||||
|
|
||||||
MAXNUM=1000000
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# This script opens a window running an editor.
|
|
||||||
# The command to invoke the editor is specified during DAMASK installation
|
|
||||||
|
|
||||||
%EDITOR% $*
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# This script opens a window running an editor. The default window is an
|
|
||||||
# xterm, and the default editor is vi. These may be customized.
|
|
||||||
|
|
||||||
dir=
|
|
||||||
for d in /usr/bin /usr/bin/X11; do
|
|
||||||
if test -x "$d/xterm"; then
|
|
||||||
dir="$d"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -z "$dir"; then
|
|
||||||
echo "$0: Could not find xterm"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $*
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,186 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=/msc/marc2016
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTHIGHMP $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRANLOWMP $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRANMP $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$FORTRAN $user.f || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user.f"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$user.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $user.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
|
@ -1,765 +0,0 @@
|
||||||
#
|
|
||||||
# General definitions for the Marc 2017 version
|
|
||||||
#
|
|
||||||
# EM64T
|
|
||||||
#
|
|
||||||
# Linux RedHat 6.7 / RedHat 7.1 / SuSE 11 SP3
|
|
||||||
#
|
|
||||||
# 64 bit MPI version
|
|
||||||
#
|
|
||||||
# Intel(R) Fortran Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 16.0.2.181 Build 20160204
|
|
||||||
#
|
|
||||||
# Intel(R) C Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 16.0.2.181 Build 20160204
|
|
||||||
#
|
|
||||||
# To check the O/S level, type:
|
|
||||||
# uname -a
|
|
||||||
#
|
|
||||||
# Distributed parallel MPI libraries:
|
|
||||||
# 1) HP MPI 2.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpirun -version
|
|
||||||
# 2) Intel MPI 5.1.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpiexec.hydra -version
|
|
||||||
#
|
|
||||||
# To check the Compiler level, type using the compiler
|
|
||||||
# installation path:
|
|
||||||
# ifort -V
|
|
||||||
# icc -V
|
|
||||||
#
|
|
||||||
# REMARKS : This file contains the definitions of variables used during
|
|
||||||
# compilation loading and use of the MARC programmes . The
|
|
||||||
# current machine type is identified by means of the variable
|
|
||||||
# MACHINE , defined below.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# MPI_ROOT: root directory in which mpi shared libraries, etc. are located
|
|
||||||
# DIRJOB : directory in which spawned jobs should look for Marc input
|
|
||||||
# MPI_ARCH: system architecture
|
|
||||||
# MPI_EPATH: path where executable resides
|
|
||||||
#
|
|
||||||
REVISION="VERSION, BUILD"
|
|
||||||
HOSTNAME=`hostname`
|
|
||||||
|
|
||||||
# find available memory in Mbyte on the machine
|
|
||||||
# can be set explicitly
|
|
||||||
MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'`
|
|
||||||
|
|
||||||
# set _OEM_NASTRAN to 1 for MD Nastran build
|
|
||||||
# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable
|
|
||||||
_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}"
|
|
||||||
|
|
||||||
# uncomment the following line for an autoforge build
|
|
||||||
#AUTOFORGE=1
|
|
||||||
AUTOFORGE=0
|
|
||||||
export AUTOFORGE
|
|
||||||
|
|
||||||
# integer size
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "" ; then
|
|
||||||
INTEGER_PATH=
|
|
||||||
else
|
|
||||||
INTEGER_PATH=/$MARC_INTEGER_SIZE
|
|
||||||
fi
|
|
||||||
|
|
||||||
FCOMP=ifort
|
|
||||||
INTELPATH="/opt/intel/compilers_and_libraries_2016/linux"
|
|
||||||
|
|
||||||
# find the root directory of the compiler installation:
|
|
||||||
# - if ifort is found in $PATH, then the root directory is derived
|
|
||||||
# from the path to ifort
|
|
||||||
# - if ifort is not found in $PATH, the root directory is assumed
|
|
||||||
# to be $INTELPATH and the directory in which ifort is found is
|
|
||||||
# added to $PATH
|
|
||||||
FCOMPPATH=`which "$FCOMP" 2>/dev/null`
|
|
||||||
if test -n "$FCOMPPATH"; then
|
|
||||||
# derive the root directory from $FCOMPPATH
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/intel64/$FCOMP}"
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/$FCOMP}"
|
|
||||||
fi
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
elif test -d "$INTELPATH"; then
|
|
||||||
# check for compiler in $INTELPATH
|
|
||||||
if test -d "$INTELPATH/bin/intel64" -a \
|
|
||||||
-x "$INTELPATH/bin/intel64/$FCOMP" ; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin/intel64:$PATH"
|
|
||||||
elif test -d "$INTELPATH/bin" -a \
|
|
||||||
-x "$INTELPATH/bin/$FCOMP"; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin:$PATH"
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
|
|
||||||
# settings for MKL
|
|
||||||
MARC_MKL="$FCOMPROOT/mkl/lib/intel64"
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for Metis
|
|
||||||
#
|
|
||||||
METIS="-I$METIS_SOURCE/include"
|
|
||||||
METISLIBS="$MARC_LIB/metis.a "
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
# RCP and RSH are used for parallel network runs
|
|
||||||
# replace with similar commands like rsh if needed
|
|
||||||
RCP=/usr/bin/scp
|
|
||||||
RSH=/usr/bin/ssh
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
MPI_DEFAULT=intelmpi
|
|
||||||
MPI_OTHER=hpmpi
|
|
||||||
|
|
||||||
MPITYPE=$MPI_DEFAULT
|
|
||||||
|
|
||||||
if test $AUTOFORGE
|
|
||||||
then
|
|
||||||
if test $AUTOFORGE = 1
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# overrule MPITYPE setting with environmental variable MARC_MPITYPE
|
|
||||||
if test $MARC_MPITYPE
|
|
||||||
then
|
|
||||||
MPITYPE=$MARC_MPITYPE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# always set MPITYPE to none for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following lines to build with GPGPU version of BCS Solver for
|
|
||||||
# NVIDIA platforms
|
|
||||||
#BCSGPUSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=BCSGPU
|
|
||||||
|
|
||||||
# Edit following lines to set the openssl library
|
|
||||||
if test "$OPENSSL" != "NONE"
|
|
||||||
then
|
|
||||||
OPENSSL_LIB="$MARC_LIB/libcrypto.a"
|
|
||||||
fi
|
|
||||||
OPENSSL_INCLUDE=-I"$MARC_OPENSSL/include/"
|
|
||||||
|
|
||||||
|
|
||||||
SOLVERFLAGS=
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA"
|
|
||||||
BCS_DIR=bcsgpusolver
|
|
||||||
export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH
|
|
||||||
export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH
|
|
||||||
else
|
|
||||||
BCS_DIR=bcssolver
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
DDM=
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
FCOMPMPI=mpif90
|
|
||||||
export MPI_ROOT=$MARC_HPMPI
|
|
||||||
export MPI_REMSH=$RSH
|
|
||||||
export MPI_F77=$FCOMP
|
|
||||||
ARCHITECTURE=linux_amd64
|
|
||||||
DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI"
|
|
||||||
MPI_CLEAN=
|
|
||||||
export MPI_EPATH=$MARC_BIN
|
|
||||||
export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH
|
|
||||||
export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1"
|
|
||||||
# Below line is moved in run_marc file
|
|
||||||
# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN"
|
|
||||||
if test -n "$MSC_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
if test -n "$LM_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x"
|
|
||||||
RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f "
|
|
||||||
RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np "
|
|
||||||
RUN_JOB0=
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
INTELMPI_VERSION=HYDRA
|
|
||||||
FCOMPMPI=mpiifort
|
|
||||||
MPI_ROOT=$MARC_INTELMPI
|
|
||||||
DDM="-I${MPI_ROOT}/include64 -DDDM"
|
|
||||||
PATH=$MPI_ROOT/bin64:$PATH
|
|
||||||
export PATH
|
|
||||||
LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH
|
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
if test $INTELMPI_VERSION = HYDRA
|
|
||||||
then
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall"
|
|
||||||
else
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile "
|
|
||||||
fi
|
|
||||||
RUN_JOB0=
|
|
||||||
MPI_CLEAN=
|
|
||||||
MPI_EPATH=$MARC_BIN
|
|
||||||
MPIR_HOME=$MPI_ROOT
|
|
||||||
MPICH_F77=$FCOMP
|
|
||||||
MPICH_F77LINKER=$FCOMP
|
|
||||||
export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER
|
|
||||||
I_MPI_PIN_DOMAIN=node
|
|
||||||
export I_MPI_PIN_DOMAIN
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
export MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
DDM="-I$MPI_ROOT/include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# variables for the "maintain" script
|
|
||||||
#
|
|
||||||
|
|
||||||
MACHINENAME=LINUX
|
|
||||||
MACHINE64BIT=yes
|
|
||||||
MACHINE=Linux_EM64T
|
|
||||||
DEV=/dev/tape
|
|
||||||
GETLOG="whoami"
|
|
||||||
CLEAR="clear"
|
|
||||||
MY_UNAME=`uname -a`
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with VKI Solver
|
|
||||||
#VKISOLVER=VKI
|
|
||||||
VKISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with CASI Solver
|
|
||||||
CASISOLVER=CASI
|
|
||||||
if test "$MARC_CASISOLVER" = "NONE" ; then
|
|
||||||
CASISOLVER=NONE
|
|
||||||
fi
|
|
||||||
#CASISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with MF2 Solver
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
#MF2SOLVER=SERIAL
|
|
||||||
#MF2SOLVER=MF2PARALLEL
|
|
||||||
|
|
||||||
# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO)
|
|
||||||
#INTELSOLVER=NONE
|
|
||||||
INTELSOLVER=PARDISO
|
|
||||||
|
|
||||||
# Edit following lines to build with MUMPS
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
else
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following 2 lines to build MARC dynamic shared library
|
|
||||||
MARC_DLL=MARC_DLL
|
|
||||||
MARC_DLL=NONE
|
|
||||||
|
|
||||||
# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
VKISOLVER=NONE
|
|
||||||
CASISOLVER=NONE
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
INTELSOLVER=NONE
|
|
||||||
MUMPSSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=NONE
|
|
||||||
MARC_DLL=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# define Fortran and C compile syntax
|
|
||||||
#
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DVKI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DCASI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL"
|
|
||||||
fi
|
|
||||||
if test "$MF2SOLVER" = MF2SERIAL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$INTELSOLVER" = PARDISO
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DPARDISO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMUMPS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LINK_OPT=
|
|
||||||
DEBUG_OPT=
|
|
||||||
C_DEBUG_OPT=
|
|
||||||
|
|
||||||
#Uncomment following line to build Marc in debuggable mode
|
|
||||||
MARCDEBUG=
|
|
||||||
#MARCDEBUG="ON"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
LINK_OPT="-debug -traceback"
|
|
||||||
DEBUG_OPT="-debug -traceback"
|
|
||||||
C_DEBUG_OPT="-debug -traceback"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
MARCCHECK=
|
|
||||||
#MARCCHECK="ON"
|
|
||||||
if test "$MARCCHECK" = "ON"
|
|
||||||
then
|
|
||||||
DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv "
|
|
||||||
C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv "
|
|
||||||
fi
|
|
||||||
|
|
||||||
MARCCODECOV=
|
|
||||||
#MARCCODECOV="ON"
|
|
||||||
|
|
||||||
MARCCODEPROF=
|
|
||||||
#MARCCODEPROF="ON"
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
I8FFLAGS="-real-size 64 -integer-size 32"
|
|
||||||
I8DEFINES="-DFLOAT=8 -DINT=4"
|
|
||||||
I8CDEFINES=
|
|
||||||
I8CASIDEFS=
|
|
||||||
else
|
|
||||||
I8FFLAGS="-i8 -real-size 64 -integer-size 64"
|
|
||||||
I8DEFINES="-DI64 -DFLOAT=8 -DINT=8"
|
|
||||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
|
||||||
I8CASIDEFS="-DCASI_64BIT_INT=1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
MTHREAD=OPENMP
|
|
||||||
if test "$MARC_OPENMP" = "NONE" ; then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
#MTHREAD=NONE
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
OMP_COMPAT=YES
|
|
||||||
if test "$MTHREAD" = "NONE"
|
|
||||||
then
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
fi
|
|
||||||
|
|
||||||
CDEFINES=
|
|
||||||
FDEFINES=
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CDEFINES="$CDEFINES -D_OEM_NASTRAN"
|
|
||||||
FDEFINES="$FDEFINES -D_OEM_NASTRAN"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FDEFINES="$FDEFINES -D_IMPLICITNONE"
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -eq 0
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DMKL -DOPENMP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DOMP_COMPAT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -D_MSCMARC
|
|
||||||
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT $MARC_SIMUFACT"
|
|
||||||
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
|
|
||||||
|
|
||||||
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CINCL="$CINCL -I../../include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel"
|
|
||||||
CCT="$CC"
|
|
||||||
CCTLOW="$CCLOW"
|
|
||||||
CCTHIGH="$CCHIGH"
|
|
||||||
|
|
||||||
CC_CASI="$CC -std=c99 $I8CASIDEFS"
|
|
||||||
CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
CCT_CASI="$CCT -std=c99 $I8CASIDEFS"
|
|
||||||
CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
#PROFILE="-Mprof=func"
|
|
||||||
#PROFILE="-Mprof=lines"
|
|
||||||
#PROFILE="-Mprof=func,mpi"
|
|
||||||
PROFILE=
|
|
||||||
if test "$MARCCODECOV" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE="-prof-gen=srcpos"
|
|
||||||
fi
|
|
||||||
if test "$MARCCODEPROF" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE=" $PROFILE -pg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORT_OPT="-c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB -fp-model source"
|
|
||||||
if test "$MTHREAD" = "OPENMP"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -qopenmp"
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -qopenmp-threadprivate=compat"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# FORT_OPT=" $FORT_OPT -auto "
|
|
||||||
FORT_OPT=" $FORT_OPT -save -zero"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
# for compiling free form f90 files. high opt, integer(4)
|
|
||||||
FORTF90="$FCOMP -c -O3"
|
|
||||||
|
|
||||||
# determine DAMASK version
|
|
||||||
if test -n "$DAMASK_USER"; then
|
|
||||||
DAMASKROOT=`dirname $DAMASK_USER`/..
|
|
||||||
read DAMASKVERSION < $DAMASKROOT/VERSION
|
|
||||||
DAMASKVERSION="'"$DAMASKVERSION"'"
|
|
||||||
else
|
|
||||||
DAMASKVERSION="'N/A'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
|
||||||
DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2017 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2017 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2017 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
|
|
||||||
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
|
||||||
DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2017 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2017 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2017 -DDAMASKVERSION=$DAMASKVERSION \
|
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOWT="$FORTLOW"
|
|
||||||
FORTRANT="$FORTRAN"
|
|
||||||
FORTHIGHT="$FORTHIGH"
|
|
||||||
|
|
||||||
FORTRANMNF="$FCOMP -c $FDEFINES "
|
|
||||||
CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE"
|
|
||||||
|
|
||||||
FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -DMPI_I8 -nofor_main"
|
|
||||||
CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include"
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
|
||||||
CCMUMPS="$CCMUMPS -DINTSIZE64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL"
|
|
||||||
NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES "
|
|
||||||
NVCCLIB="ar rvl"
|
|
||||||
NVCCLD=icc
|
|
||||||
BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORT90HIGH="$BCSFORTHIGH"
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
BCSFORTRAN=$BCSFORTLOW
|
|
||||||
BCSFORTHIGH=$BCSFORTLOW
|
|
||||||
BCSFORT90HIGH=$BCSFORTLOW
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include"
|
|
||||||
# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
LOAD="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
LOAD="$FCOMP $LINK_OPT -o "
|
|
||||||
LOADT="$FCOMP $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
|
||||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
|
||||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
|
||||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
|
||||||
CC="$CC -fPIC"
|
|
||||||
CCMNF="$CCMNF -fPIC"
|
|
||||||
CC_CASI="$CC_CASI -fPIC"
|
|
||||||
CCLOW_CASI="$CCLOW_CASI -fPIC"
|
|
||||||
CCHIGH_CASI="$CCHIGH_CASI -fPIC"
|
|
||||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread"
|
|
||||||
LINK_MARC_DLL="-shared -fPIC"
|
|
||||||
LOAD_DLL=$LOAD
|
|
||||||
LOADT_DLL=$LOADT
|
|
||||||
EXT_DLL="so"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
XLIBS="-L/usr/X11/lib -lX11 "
|
|
||||||
|
|
||||||
#
|
|
||||||
# define archive and ranlib syntax
|
|
||||||
#
|
|
||||||
|
|
||||||
ARC="ar rvl"
|
|
||||||
ARD="ar dvl"
|
|
||||||
ARX="ar xl"
|
|
||||||
RAN=""
|
|
||||||
|
|
||||||
#
|
|
||||||
# choose which libraries you want to use ( e.g. blas )
|
|
||||||
#
|
|
||||||
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
VKISOLVERLIBS="$MARC_LIB/vkisolver.a"
|
|
||||||
else
|
|
||||||
VKISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
CASISOLVERLIBS="$MARC_CASI/casilib.a"
|
|
||||||
else
|
|
||||||
CASISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
MF2SOLVERLIBS=
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \
|
|
||||||
$MARC_LIB/mf2parallel/libsym.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmet.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libnum.a \
|
|
||||||
$MARC_LIB/mf2parallel/libutl.a \
|
|
||||||
$MARC_LIB/mf2parallel/libr8.a \
|
|
||||||
$MARC_LIB/mf2parallel/libz.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a"
|
|
||||||
if test $MPITYPE = none
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
echo hello > /dev/null
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a "
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a"
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS=
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a "
|
|
||||||
MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda "
|
|
||||||
MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda "
|
|
||||||
MARCCUDALIBS=$MARCCUDALIBS1
|
|
||||||
CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda "
|
|
||||||
else
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
|
||||||
else
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SECLIBS="-L$MARC_LIB -llapi"
|
|
||||||
|
|
||||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
|
|
||||||
$MKLLIB -L$MARC_MKL -liomp5 \
|
|
||||||
$MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/kdtree2.a "
|
|
||||||
|
|
||||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
|
||||||
|
|
||||||
MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}"
|
|
||||||
MRCLIBSPAR="$MARC_LIB/clib.a"
|
|
||||||
STUBS="$MARC_LIB/stubs.a "
|
|
||||||
MNFLIBS="$MARC_LIB/libmnf.a"
|
|
||||||
MDUSER="$MARC_LIB/md_user.a"
|
|
||||||
if test "X$MARC_SIMUFACT" != "X"
|
|
||||||
then
|
|
||||||
SFLIB="-L$SFMATDIR -lMBA_Grain $SFMATDIR/sfclib.a "
|
|
||||||
else
|
|
||||||
SFLIB=" "
|
|
||||||
fi
|
|
||||||
|
|
||||||
OPENMP="-qopenmp"
|
|
||||||
|
|
||||||
SYSLIBS=" $OPENMP -lpthread -cxxlib"
|
|
||||||
|
|
||||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \
|
|
||||||
# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt"
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi_mt -lmpifort -lrt $OPENMP -threads -lpthread -cxxlib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
SYSLIBSPAR=" "
|
|
||||||
|
|
||||||
MARC_DLL_CODES="runmarc.f"
|
|
||||||
|
|
||||||
|
|
||||||
BLAS_SRC="dzero.f icopy.f izero.f"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f"
|
|
||||||
else
|
|
||||||
BLAS_SRC="ALL"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \
|
|
||||||
omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \
|
|
||||||
elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \
|
|
||||||
cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \
|
|
||||||
inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f"
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
|
||||||
LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f"
|
|
||||||
fi
|
|
||||||
LOW_OPT_CODES_CASI=""
|
|
||||||
|
|
||||||
HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \
|
|
||||||
dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \
|
|
||||||
dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f "
|
|
||||||
|
|
||||||
|
|
||||||
HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c"
|
|
||||||
|
|
||||||
MAXNUM=1000000
|
|
|
@ -1,726 +0,0 @@
|
||||||
#
|
|
||||||
# General definitions for the Marc 2017 version
|
|
||||||
#
|
|
||||||
# EM64T
|
|
||||||
#
|
|
||||||
# Linux RedHat 6.7 / RedHat 7.1 / SuSE 11 SP3
|
|
||||||
#
|
|
||||||
# 64 bit MPI version
|
|
||||||
#
|
|
||||||
# Intel(R) Fortran Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 16.0.2.181 Build 20160204
|
|
||||||
#
|
|
||||||
# Intel(R) C Intel(R) 64 Compiler XE for applications
|
|
||||||
# running on Intel(R) 64, Version 16.0.2.181 Build 20160204
|
|
||||||
#
|
|
||||||
# To check the O/S level, type:
|
|
||||||
# uname -a
|
|
||||||
#
|
|
||||||
# Distributed parallel MPI libraries:
|
|
||||||
# 1) HP MPI 2.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpirun -version
|
|
||||||
# 2) Intel MPI 5.1.3
|
|
||||||
# To check the mpi version, type:
|
|
||||||
# mpiexec.hydra -version
|
|
||||||
#
|
|
||||||
# To check the Compiler level, type using the compiler
|
|
||||||
# installation path:
|
|
||||||
# ifort -V
|
|
||||||
# icc -V
|
|
||||||
#
|
|
||||||
# REMARKS : This file contains the definitions of variables used during
|
|
||||||
# compilation loading and use of the MARC programmes . The
|
|
||||||
# current machine type is identified by means of the variable
|
|
||||||
# MACHINE , defined below.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# MPI_ROOT: root directory in which mpi shared libraries, etc. are located
|
|
||||||
# DIRJOB : directory in which spawned jobs should look for Marc input
|
|
||||||
# MPI_ARCH: system architecture
|
|
||||||
# MPI_EPATH: path where executable resides
|
|
||||||
#
|
|
||||||
REVISION="VERSION, BUILD"
|
|
||||||
HOSTNAME=`hostname`
|
|
||||||
|
|
||||||
# find available memory in Mbyte on the machine
|
|
||||||
# can be set explicitly
|
|
||||||
MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'`
|
|
||||||
|
|
||||||
# set _OEM_NASTRAN to 1 for MD Nastran build
|
|
||||||
# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable
|
|
||||||
_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}"
|
|
||||||
|
|
||||||
# uncomment the following line for an autoforge build
|
|
||||||
#AUTOFORGE=1
|
|
||||||
AUTOFORGE=0
|
|
||||||
export AUTOFORGE
|
|
||||||
|
|
||||||
# integer size
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "" ; then
|
|
||||||
INTEGER_PATH=
|
|
||||||
else
|
|
||||||
INTEGER_PATH=/$MARC_INTEGER_SIZE
|
|
||||||
fi
|
|
||||||
|
|
||||||
FCOMP=ifort
|
|
||||||
INTELPATH="/opt/intel/compilers_and_libraries_2016/linux"
|
|
||||||
|
|
||||||
# find the root directory of the compiler installation:
|
|
||||||
# - if ifort is found in $PATH, then the root directory is derived
|
|
||||||
# from the path to ifort
|
|
||||||
# - if ifort is not found in $PATH, the root directory is assumed
|
|
||||||
# to be $INTELPATH and the directory in which ifort is found is
|
|
||||||
# added to $PATH
|
|
||||||
FCOMPPATH=`which "$FCOMP" 2>/dev/null`
|
|
||||||
if test -n "$FCOMPPATH"; then
|
|
||||||
# derive the root directory from $FCOMPPATH
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/intel64/$FCOMP}"
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT="${FCOMPPATH%/bin/$FCOMP}"
|
|
||||||
fi
|
|
||||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
elif test -d "$INTELPATH"; then
|
|
||||||
# check for compiler in $INTELPATH
|
|
||||||
if test -d "$INTELPATH/bin/intel64" -a \
|
|
||||||
-x "$INTELPATH/bin/intel64/$FCOMP" ; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin/intel64:$PATH"
|
|
||||||
elif test -d "$INTELPATH/bin" -a \
|
|
||||||
-x "$INTELPATH/bin/$FCOMP"; then
|
|
||||||
FCOMPROOT="$INTELPATH"
|
|
||||||
PATH="$INTELPATH/bin:$PATH"
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
FCOMPROOT=
|
|
||||||
fi
|
|
||||||
|
|
||||||
# settings for MKL
|
|
||||||
MARC_MKL="$FCOMPROOT/mkl/lib/intel64"
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for Metis
|
|
||||||
#
|
|
||||||
METIS="-I$METIS_SOURCE/include"
|
|
||||||
METISLIBS="$MARC_LIB/metis.a "
|
|
||||||
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
# RCP and RSH are used for parallel network runs
|
|
||||||
# replace with similar commands like rsh if needed
|
|
||||||
RCP=/usr/bin/scp
|
|
||||||
RSH=/usr/bin/ssh
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
MPI_DEFAULT=intelmpi
|
|
||||||
MPI_OTHER=hpmpi
|
|
||||||
|
|
||||||
MPITYPE=$MPI_DEFAULT
|
|
||||||
|
|
||||||
if test $AUTOFORGE
|
|
||||||
then
|
|
||||||
if test $AUTOFORGE = 1
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# overrule MPITYPE setting with environmental variable MARC_MPITYPE
|
|
||||||
if test $MARC_MPITYPE
|
|
||||||
then
|
|
||||||
MPITYPE=$MARC_MPITYPE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# always set MPITYPE to none for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MPITYPE=none
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following lines to build with GPGPU version of BCS Solver for
|
|
||||||
# NVIDIA platforms
|
|
||||||
#BCSGPUSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=BCSGPU
|
|
||||||
|
|
||||||
# Edit following lines to set the openssl library
|
|
||||||
if test "$OPENSSL" != "NONE"
|
|
||||||
then
|
|
||||||
OPENSSL_LIB="$MARC_LIB/libcrypto.a"
|
|
||||||
fi
|
|
||||||
OPENSSL_INCLUDE=-I"$MARC_OPENSSL/include/"
|
|
||||||
|
|
||||||
|
|
||||||
SOLVERFLAGS=
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA"
|
|
||||||
BCS_DIR=bcsgpusolver
|
|
||||||
export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH
|
|
||||||
export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH
|
|
||||||
else
|
|
||||||
BCS_DIR=bcssolver
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# settings for MPI
|
|
||||||
#
|
|
||||||
DDM=
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
FCOMPMPI=mpif90
|
|
||||||
export MPI_ROOT=$MARC_HPMPI
|
|
||||||
export MPI_REMSH=$RSH
|
|
||||||
export MPI_F77=$FCOMP
|
|
||||||
ARCHITECTURE=linux_amd64
|
|
||||||
DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI"
|
|
||||||
MPI_CLEAN=
|
|
||||||
export MPI_EPATH=$MARC_BIN
|
|
||||||
export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH
|
|
||||||
export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1"
|
|
||||||
# Below line is moved in run_marc file
|
|
||||||
# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN"
|
|
||||||
if test -n "$MSC_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
if test -n "$LM_LICENSE_FILE"
|
|
||||||
then
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE"
|
|
||||||
fi
|
|
||||||
export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x"
|
|
||||||
RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f "
|
|
||||||
RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np "
|
|
||||||
RUN_JOB0=
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
INTELMPI_VERSION=HYDRA
|
|
||||||
FCOMPMPI=mpiifort
|
|
||||||
MPI_ROOT=$MARC_INTELMPI
|
|
||||||
DDM="-I${MPI_ROOT}/include64 -DDDM"
|
|
||||||
PATH=$MPI_ROOT/bin64:$PATH
|
|
||||||
export PATH
|
|
||||||
LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH
|
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
if test $INTELMPI_VERSION = HYDRA
|
|
||||||
then
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall"
|
|
||||||
else
|
|
||||||
RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n "
|
|
||||||
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile "
|
|
||||||
fi
|
|
||||||
RUN_JOB0=
|
|
||||||
MPI_CLEAN=
|
|
||||||
MPI_EPATH=$MARC_BIN
|
|
||||||
MPIR_HOME=$MPI_ROOT
|
|
||||||
MPICH_F77=$FCOMP
|
|
||||||
MPICH_F77LINKER=$FCOMP
|
|
||||||
export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER
|
|
||||||
I_MPI_PIN_DOMAIN=node
|
|
||||||
export I_MPI_PIN_DOMAIN
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
export MPI_ROOT=$MARC_DUMMYMPI
|
|
||||||
DDM="-I$MPI_ROOT/include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# variables for the "maintain" script
|
|
||||||
#
|
|
||||||
|
|
||||||
MACHINENAME=LINUX
|
|
||||||
MACHINE64BIT=yes
|
|
||||||
MACHINE=Linux_EM64T
|
|
||||||
DEV=/dev/tape
|
|
||||||
GETLOG="whoami"
|
|
||||||
CLEAR="clear"
|
|
||||||
MY_UNAME=`uname -a`
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with VKI Solver
|
|
||||||
#VKISOLVER=VKI
|
|
||||||
VKISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with CASI Solver
|
|
||||||
CASISOLVER=CASI
|
|
||||||
if test "$MARC_CASISOLVER" = "NONE" ; then
|
|
||||||
CASISOLVER=NONE
|
|
||||||
fi
|
|
||||||
#CASISOLVER=NONE
|
|
||||||
|
|
||||||
# Edit following 2 lines to build with MF2 Solver
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
#MF2SOLVER=SERIAL
|
|
||||||
#MF2SOLVER=MF2PARALLEL
|
|
||||||
|
|
||||||
# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO)
|
|
||||||
#INTELSOLVER=NONE
|
|
||||||
INTELSOLVER=PARDISO
|
|
||||||
|
|
||||||
# Edit following lines to build with MUMPS
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
else
|
|
||||||
#MUMPSSOLVER=NONE
|
|
||||||
MUMPSSOLVER=MUMPS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Edit following 2 lines to build MARC dynamic shared library
|
|
||||||
MARC_DLL=MARC_DLL
|
|
||||||
MARC_DLL=NONE
|
|
||||||
|
|
||||||
# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
VKISOLVER=NONE
|
|
||||||
CASISOLVER=NONE
|
|
||||||
MF2SOLVER=NONE
|
|
||||||
INTELSOLVER=NONE
|
|
||||||
MUMPSSOLVER=NONE
|
|
||||||
BCSGPUSOLVER=NONE
|
|
||||||
MARC_DLL=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# define Fortran and C compile syntax
|
|
||||||
#
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DVKI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DCASI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL"
|
|
||||||
fi
|
|
||||||
if test "$MF2SOLVER" = MF2SERIAL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$INTELSOLVER" = PARDISO
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DPARDISO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMUMPS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LINK_OPT=
|
|
||||||
DEBUG_OPT=
|
|
||||||
C_DEBUG_OPT=
|
|
||||||
|
|
||||||
#Uncomment following line to build Marc in debuggable mode
|
|
||||||
MARCDEBUG=
|
|
||||||
#MARCDEBUG="ON"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
LINK_OPT="-debug -traceback"
|
|
||||||
DEBUG_OPT="-debug -traceback"
|
|
||||||
C_DEBUG_OPT="-debug -traceback"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
MARCCHECK=
|
|
||||||
#MARCCHECK="ON"
|
|
||||||
if test "$MARCCHECK" = "ON"
|
|
||||||
then
|
|
||||||
DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv "
|
|
||||||
C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv "
|
|
||||||
fi
|
|
||||||
|
|
||||||
MARCCODECOV=
|
|
||||||
#MARCCODECOV="ON"
|
|
||||||
|
|
||||||
MARCCODEPROF=
|
|
||||||
#MARCCODEPROF="ON"
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
I8FFLAGS=
|
|
||||||
I8DEFINES=
|
|
||||||
I8CDEFINES=
|
|
||||||
I8CASIDEFS=
|
|
||||||
else
|
|
||||||
I8FFLAGS="-i8"
|
|
||||||
I8DEFINES="-DI64"
|
|
||||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
|
||||||
I8CASIDEFS="-DCASI_64BIT_INT=1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
MTHREAD=OPENMP
|
|
||||||
if test "$MARC_OPENMP" = "NONE" ; then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
#MTHREAD=NONE
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
MTHREAD=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
OMP_COMPAT=YES
|
|
||||||
if test "$MTHREAD" = "NONE"
|
|
||||||
then
|
|
||||||
OMP_COMPAT=NO
|
|
||||||
fi
|
|
||||||
|
|
||||||
CDEFINES=
|
|
||||||
FDEFINES=
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CDEFINES="$CDEFINES -D_OEM_NASTRAN"
|
|
||||||
FDEFINES="$FDEFINES -D_OEM_NASTRAN"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FDEFINES="$FDEFINES -D_IMPLICITNONE"
|
|
||||||
|
|
||||||
if test "$_OEM_NASTRAN" -eq 0
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DMKL -DOPENMP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FDEFINES="$FDEFINES -DOMP_COMPAT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -D_MSCMARC
|
|
||||||
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT $MARC_SIMUFACT"
|
|
||||||
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
|
|
||||||
|
|
||||||
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
CINCL="$CINCL -I../../include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel"
|
|
||||||
CCT="$CC"
|
|
||||||
CCTLOW="$CCLOW"
|
|
||||||
CCTHIGH="$CCHIGH"
|
|
||||||
|
|
||||||
CC_CASI="$CC -std=c99 $I8CASIDEFS"
|
|
||||||
CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
CCT_CASI="$CCT -std=c99 $I8CASIDEFS"
|
|
||||||
CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS"
|
|
||||||
CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS"
|
|
||||||
|
|
||||||
#PROFILE="-Mprof=func"
|
|
||||||
#PROFILE="-Mprof=lines"
|
|
||||||
#PROFILE="-Mprof=func,mpi"
|
|
||||||
PROFILE=
|
|
||||||
if test "$MARCCODECOV" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE="-prof-gen=srcpos"
|
|
||||||
fi
|
|
||||||
if test "$MARCCODEPROF" = "ON"
|
|
||||||
then
|
|
||||||
PROFILE=" $PROFILE -pg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB -fp-model source"
|
|
||||||
if test "$MTHREAD" = "OPENMP"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -qopenmp"
|
|
||||||
if test "$OMP_COMPAT" = "YES"
|
|
||||||
then
|
|
||||||
FORT_OPT=" $FORT_OPT -qopenmp-threadprivate=compat"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# FORT_OPT=" $FORT_OPT -auto "
|
|
||||||
FORT_OPT=" $FORT_OPT -save -zero"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
# for compiling free form f90 files. high opt, integer(4)
|
|
||||||
FORTF90="$FCOMP -c -O3"
|
|
||||||
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
|
||||||
FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
|
||||||
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FORTLOWT="$FORTLOW"
|
|
||||||
FORTRANT="$FORTRAN"
|
|
||||||
FORTHIGHT="$FORTHIGH"
|
|
||||||
|
|
||||||
FORTRANMNF="$FCOMP -c $FDEFINES "
|
|
||||||
CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE"
|
|
||||||
|
|
||||||
FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -DMPI_I8 -nofor_main"
|
|
||||||
CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include"
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
|
||||||
CCMUMPS="$CCMUMPS -DINTSIZE64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL"
|
|
||||||
NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES "
|
|
||||||
NVCCLIB="ar rvl"
|
|
||||||
NVCCLD=icc
|
|
||||||
BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common"
|
|
||||||
BCSFORT90HIGH="$BCSFORTHIGH"
|
|
||||||
if test "$MARCDEBUG" = "ON"
|
|
||||||
then
|
|
||||||
BCSFORTRAN=$BCSFORTLOW
|
|
||||||
BCSFORTHIGH=$BCSFORTLOW
|
|
||||||
BCSFORT90HIGH=$BCSFORTLOW
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $MPITYPE != none
|
|
||||||
then
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include"
|
|
||||||
# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
LOAD="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
LOADT="ifort $PROFILE $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
LOAD="$FCOMP $LINK_OPT -o "
|
|
||||||
LOADT="$FCOMP $LINK_OPT -o "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_DLL" = MARC_DLL
|
|
||||||
then
|
|
||||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
|
||||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
|
||||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
|
||||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
|
||||||
CC="$CC -fPIC"
|
|
||||||
CCMNF="$CCMNF -fPIC"
|
|
||||||
CC_CASI="$CC_CASI -fPIC"
|
|
||||||
CCLOW_CASI="$CCLOW_CASI -fPIC"
|
|
||||||
CCHIGH_CASI="$CCHIGH_CASI -fPIC"
|
|
||||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread"
|
|
||||||
LINK_MARC_DLL="-shared -fPIC"
|
|
||||||
LOAD_DLL=$LOAD
|
|
||||||
LOADT_DLL=$LOADT
|
|
||||||
EXT_DLL="so"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
XLIBS="-L/usr/X11/lib -lX11 "
|
|
||||||
|
|
||||||
#
|
|
||||||
# define archive and ranlib syntax
|
|
||||||
#
|
|
||||||
|
|
||||||
ARC="ar rvl"
|
|
||||||
ARD="ar dvl"
|
|
||||||
ARX="ar xl"
|
|
||||||
RAN=""
|
|
||||||
|
|
||||||
#
|
|
||||||
# choose which libraries you want to use ( e.g. blas )
|
|
||||||
#
|
|
||||||
|
|
||||||
if test "$VKISOLVER" = VKI
|
|
||||||
then
|
|
||||||
VKISOLVERLIBS="$MARC_LIB/vkisolver.a"
|
|
||||||
else
|
|
||||||
VKISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CASISOLVER" = CASI
|
|
||||||
then
|
|
||||||
CASISOLVERLIBS="$MARC_CASI/casilib.a"
|
|
||||||
else
|
|
||||||
CASISOLVERLIBS=
|
|
||||||
fi
|
|
||||||
|
|
||||||
MF2SOLVERLIBS=
|
|
||||||
if test "$MF2SOLVER" = MF2PARALLEL
|
|
||||||
then
|
|
||||||
MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \
|
|
||||||
$MARC_LIB/mf2parallel/libsym.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmet.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libmf2.a \
|
|
||||||
$MARC_LIB/mf2parallel/libgauss.a \
|
|
||||||
$MARC_LIB/mf2parallel/libnum.a \
|
|
||||||
$MARC_LIB/mf2parallel/libutl.a \
|
|
||||||
$MARC_LIB/mf2parallel/libr8.a \
|
|
||||||
$MARC_LIB/mf2parallel/libz.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MUMPSSOLVER" = MUMPS
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a"
|
|
||||||
if test $MPITYPE = none
|
|
||||||
then
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
echo hello > /dev/null
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a "
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test $MPITYPE = hpmpi
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a"
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MUMPSSOLVERLIBS=
|
|
||||||
MUMPSSOLVERLIBS2=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$BCSGPUSOLVER" = BCSGPU
|
|
||||||
then
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a "
|
|
||||||
MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda "
|
|
||||||
MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda "
|
|
||||||
MARCCUDALIBS=$MARCCUDALIBS1
|
|
||||||
CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda "
|
|
||||||
else
|
|
||||||
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
|
||||||
else
|
|
||||||
MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a $MARC_MKL/libmkl_blacs_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SECLIBS="-L$MARC_LIB -llapi"
|
|
||||||
|
|
||||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
|
|
||||||
$MKLLIB -L$MARC_MKL -liomp5 \
|
|
||||||
$MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/kdtree2.a "
|
|
||||||
|
|
||||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
|
||||||
|
|
||||||
MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}"
|
|
||||||
MRCLIBSPAR="$MARC_LIB/clib.a"
|
|
||||||
STUBS="$MARC_LIB/stubs.a "
|
|
||||||
MNFLIBS="$MARC_LIB/libmnf.a"
|
|
||||||
MDUSER="$MARC_LIB/md_user.a"
|
|
||||||
if test "X$MARC_SIMUFACT" != "X"
|
|
||||||
then
|
|
||||||
SFLIB="-L$SFMATDIR -lMBA_Grain $SFMATDIR/sfclib.a "
|
|
||||||
else
|
|
||||||
SFLIB=" "
|
|
||||||
fi
|
|
||||||
|
|
||||||
OPENMP="-qopenmp"
|
|
||||||
|
|
||||||
SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
|
|
||||||
|
|
||||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
|
||||||
# if test $MPITYPE = intelmpi
|
|
||||||
# then
|
|
||||||
# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \
|
|
||||||
# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt"
|
|
||||||
# fi
|
|
||||||
if test $MPITYPE = intelmpi
|
|
||||||
then
|
|
||||||
SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi_mt -lmpifort -lrt $OPENMP -threads -lpthread -shared-intel -cxxlib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
SYSLIBSPAR=" "
|
|
||||||
|
|
||||||
MARC_DLL_CODES="runmarc.f"
|
|
||||||
|
|
||||||
|
|
||||||
BLAS_SRC="dzero.f icopy.f izero.f"
|
|
||||||
if test "$_OEM_NASTRAN" -ne 0
|
|
||||||
then
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
|
||||||
BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f"
|
|
||||||
else
|
|
||||||
BLAS_SRC="ALL"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \
|
|
||||||
omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \
|
|
||||||
elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \
|
|
||||||
cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \
|
|
||||||
inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f"
|
|
||||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
|
||||||
LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f"
|
|
||||||
fi
|
|
||||||
LOW_OPT_CODES_CASI=""
|
|
||||||
|
|
||||||
HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \
|
|
||||||
dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \
|
|
||||||
dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f "
|
|
||||||
|
|
||||||
|
|
||||||
HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c"
|
|
||||||
|
|
||||||
MAXNUM=1000000
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# This script opens a window running an editor.
|
|
||||||
# The command to invoke the editor is specified during DAMASK installation
|
|
||||||
|
|
||||||
%EDITOR% $*
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# This script opens a window running an editor. The default window is an
|
|
||||||
# xterm, and the default editor is vi. These may be customized.
|
|
||||||
|
|
||||||
dir=
|
|
||||||
for d in /usr/bin /usr/bin/X11; do
|
|
||||||
if test -x "$d/xterm"; then
|
|
||||||
dir="$d"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -z "$dir"; then
|
|
||||||
echo "$0: Could not find xterm"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $*
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,186 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=/opt/msc/marc2017
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -535,17 +535,24 @@ else
|
||||||
DAMASKVERSION="'N/A'"
|
DAMASKVERSION="'N/A'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$DAMASK_HDF5" = "ON";then
|
||||||
|
DFCOMP="$(h5fc -show) -DDAMASKHDF5"
|
||||||
|
else
|
||||||
|
DFCOMP=$FCOMP
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
||||||
DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
DFORTLOWMP="$DFCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018 -DDAMASKVERSION=$DAMASKVERSION \
|
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018.1 -DDAMASKVERSION=$DAMASKVERSION \
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
-qopenmp -qopenmp-threadprivate=compat\
|
||||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||||
DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
DFORTRANMP="$DFCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018 -DDAMASKVERSION=$DAMASKVERSION \
|
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018.1 -DDAMASKVERSION=$DAMASKVERSION \
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
-qopenmp -qopenmp-threadprivate=compat\
|
||||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||||
DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \
|
DFORTHIGHMP="$DFCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018 -DDAMASKVERSION=$DAMASKVERSION \
|
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018.1 -DDAMASKVERSION=$DAMASKVERSION \
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
-qopenmp -qopenmp-threadprivate=compat\
|
||||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||||
|
|
||||||
|
@ -563,16 +570,16 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
||||||
DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
DFORTLOWMP="$DFCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018 -DDAMASKVERSION=$DAMASKVERSION \
|
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018.1 -DDAMASKVERSION=$DAMASKVERSION \
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
-qopenmp -qopenmp-threadprivate=compat\
|
||||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||||
DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
DFORTRANMP="$DFCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018 -DDAMASKVERSION=$DAMASKVERSION \
|
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018.1 -DDAMASKVERSION=$DAMASKVERSION \
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
-qopenmp -qopenmp-threadprivate=compat\
|
||||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||||
DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
DFORTHIGHMP="$DFCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
||||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018 -DDAMASKVERSION=$DAMASKVERSION \
|
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2018.1 -DDAMASKVERSION=$DAMASKVERSION \
|
||||||
-qopenmp -qopenmp-threadprivate=compat\
|
-qopenmp -qopenmp-threadprivate=compat\
|
||||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
if [ $1x != 3to2x ]; then
|
if [ $1x != 3to2x ]; then
|
||||||
echo 'python2.7 to python'
|
echo 'python2.7 to python3'
|
||||||
find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python2.7/usr\/bin\/env python/g'
|
find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python2.7/usr\/bin\/env python3/g'
|
||||||
else
|
else
|
||||||
echo 'python to python2.7'
|
echo 'python3 to python2.7'
|
||||||
find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python/usr\/bin\/env python2.7/g'
|
find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python3/usr\/bin\/env python2.7/g'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
# Makes postprocessing routines acessible from everywhere.
|
# Makes postprocessing routines acessible from everywhere.
|
||||||
|
|
|
@ -27,220 +27,159 @@ class Rodrigues:
|
||||||
|
|
||||||
# ******************************************************************************************
|
# ******************************************************************************************
|
||||||
class Quaternion:
|
class Quaternion:
|
||||||
"""
|
u"""
|
||||||
Orientation represented as unit quaternion.
|
Orientation represented as unit quaternion.
|
||||||
|
|
||||||
All methods and naming conventions based on http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions.
|
All methods and naming conventions based on Rowenhorst_etal2015
|
||||||
|
Convention 1: coordinate frames are right-handed
|
||||||
|
Convention 2: a rotation angle ω is taken to be positive for a counterclockwise rotation
|
||||||
|
when viewing from the end point of the rotation axis towards the origin
|
||||||
|
Convention 3: rotations will be interpreted in the passive sense
|
||||||
|
Convention 4: Euler angle triplets are implemented using the Bunge convention,
|
||||||
|
with the angular ranges as [0, 2π],[0, π],[0, 2π]
|
||||||
|
Convention 5: the rotation angle ω is limited to the interval [0, π]
|
||||||
|
|
||||||
w is the real part, (x, y, z) are the imaginary parts.
|
w is the real part, (x, y, z) are the imaginary parts.
|
||||||
Representation of rotation is in ACTIVE form!
|
|
||||||
(Derived directly or through angleAxis, Euler angles, or active matrix)
|
Vector "a" (defined in coordinate system "A") is passively rotated
|
||||||
Vector "a" (defined in coordinate system "A") is actively rotated to new coordinates "b".
|
resulting in new coordinates "b" when expressed in system "B".
|
||||||
b = Q * a
|
b = Q * a
|
||||||
b = np.dot(Q.asMatrix(),a)
|
b = np.dot(Q.asMatrix(),a)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
quatArray = [1.0,0.0,0.0,0.0]):
|
quat = None,
|
||||||
"""Initializes to identity if not given"""
|
q = 1.0,
|
||||||
self.w, \
|
p = np.zeros(3,dtype=float)):
|
||||||
self.x, \
|
"""Initializes to identity unless specified"""
|
||||||
self.y, \
|
self.q = quat[0] if quat is not None else q
|
||||||
self.z = quatArray
|
self.p = np.array(quat[1:4]) if quat is not None else p
|
||||||
self.homomorph()
|
self.homomorph()
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
"""Components"""
|
"""Components"""
|
||||||
return iter([self.w,self.x,self.y,self.z])
|
return iter(self.asList())
|
||||||
|
|
||||||
def __copy__(self):
|
def __copy__(self):
|
||||||
"""Create copy"""
|
"""Copy"""
|
||||||
Q = Quaternion([self.w,self.x,self.y,self.z])
|
return self.__class__(q=self.q,p=self.p.copy())
|
||||||
return Q
|
|
||||||
|
|
||||||
copy = __copy__
|
copy = __copy__
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
"""Readbable string"""
|
"""Readable string"""
|
||||||
return 'Quaternion(real=%+.6f, imag=<%+.6f, %+.6f, %+.6f>)' % \
|
return 'Quaternion(real={q:+.6f}, imag=<{p[0]:+.6f}, {p[1]:+.6f}, {p[2]:+.6f}>)'.format(q=self.q,p=self.p)
|
||||||
(self.w, self.x, self.y, self.z)
|
|
||||||
|
|
||||||
def __pow__(self, exponent):
|
def __pow__(self, exponent):
|
||||||
"""Power"""
|
"""Power"""
|
||||||
omega = math.acos(self.w)
|
omega = math.acos(self.q)
|
||||||
vRescale = math.sin(exponent*omega)/math.sin(omega)
|
return self.__class__(q= math.cos(exponent*omega),
|
||||||
Q = Quaternion()
|
p=self.p * math.sin(exponent*omega)/math.sin(omega))
|
||||||
Q.w = math.cos(exponent*omega)
|
|
||||||
Q.x = self.x * vRescale
|
|
||||||
Q.y = self.y * vRescale
|
|
||||||
Q.z = self.z * vRescale
|
|
||||||
return Q
|
|
||||||
|
|
||||||
def __ipow__(self, exponent):
|
def __ipow__(self, exponent):
|
||||||
"""In-place power"""
|
"""In-place power"""
|
||||||
omega = math.acos(self.w)
|
omega = math.acos(self.q)
|
||||||
vRescale = math.sin(exponent*omega)/math.sin(omega)
|
self.q = math.cos(exponent*omega)
|
||||||
self.w = np.cos(exponent*omega)
|
self.p *= math.sin(exponent*omega)/math.sin(omega)
|
||||||
self.x *= vRescale
|
|
||||||
self.y *= vRescale
|
|
||||||
self.z *= vRescale
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __mul__(self, other):
|
def __mul__(self, other):
|
||||||
"""Multiplication"""
|
"""Multiplication"""
|
||||||
|
# Rowenhorst_etal2015 MSMSE: value of P is selected as -1
|
||||||
|
P = -1.0
|
||||||
try: # quaternion
|
try: # quaternion
|
||||||
Aw = self.w
|
return self.__class__(q=self.q*other.q - np.dot(self.p,other.p),
|
||||||
Ax = self.x
|
p=self.q*other.p + other.q*self.p + P * np.cross(self.p,other.p))
|
||||||
Ay = self.y
|
|
||||||
Az = self.z
|
|
||||||
Bw = other.w
|
|
||||||
Bx = other.x
|
|
||||||
By = other.y
|
|
||||||
Bz = other.z
|
|
||||||
Q = Quaternion()
|
|
||||||
Q.w = - Ax * Bx - Ay * By - Az * Bz + Aw * Bw
|
|
||||||
Q.x = + Ax * Bw + Ay * Bz - Az * By + Aw * Bx
|
|
||||||
Q.y = - Ax * Bz + Ay * Bw + Az * Bx + Aw * By
|
|
||||||
Q.z = + Ax * By - Ay * Bx + Az * Bw + Aw * Bz
|
|
||||||
return Q
|
|
||||||
except: pass
|
except: pass
|
||||||
try: # vector (perform active rotation, i.e. q*v*q.conjugated)
|
try: # vector (perform passive rotation)
|
||||||
w = self.w
|
( x, y, z) = self.p
|
||||||
x = self.x
|
(Vx,Vy,Vz) = other[0:3]
|
||||||
y = self.y
|
A = self.q*self.q - np.dot(self.p,self.p)
|
||||||
z = self.z
|
B = 2.0 * (x*Vx + y*Vy + z*Vz)
|
||||||
Vx = other[0]
|
C = 2.0 * P*self.q
|
||||||
Vy = other[1]
|
|
||||||
Vz = other[2]
|
|
||||||
|
|
||||||
return np.array([\
|
return np.array([
|
||||||
w * w * Vx + 2 * y * w * Vz - 2 * z * w * Vy + \
|
A*Vx + B*x + C*(y*Vz - z*Vy),
|
||||||
x * x * Vx + 2 * y * x * Vy + 2 * z * x * Vz - \
|
A*Vy + B*y + C*(z*Vx - x*Vz),
|
||||||
z * z * Vx - y * y * Vx,
|
A*Vz + B*z + C*(x*Vy - y*Vx),
|
||||||
2 * x * y * Vx + y * y * Vy + 2 * z * y * Vz + \
|
])
|
||||||
2 * w * z * Vx - z * z * Vy + w * w * Vy - \
|
|
||||||
2 * x * w * Vz - x * x * Vy,
|
|
||||||
2 * x * z * Vx + 2 * y * z * Vy + \
|
|
||||||
z * z * Vz - 2 * w * y * Vx - y * y * Vz + \
|
|
||||||
2 * w * x * Vy - x * x * Vz + w * w * Vz ])
|
|
||||||
except: pass
|
except: pass
|
||||||
try: # scalar
|
try: # scalar
|
||||||
Q = self.copy()
|
return self.__class__(q=self.q*other,
|
||||||
Q.w *= other
|
p=self.p*other)
|
||||||
Q.x *= other
|
|
||||||
Q.y *= other
|
|
||||||
Q.z *= other
|
|
||||||
return Q
|
|
||||||
except:
|
except:
|
||||||
return self.copy()
|
return self.copy()
|
||||||
|
|
||||||
def __imul__(self, other):
|
def __imul__(self, other):
|
||||||
"""In-place multiplication"""
|
"""In-place multiplication"""
|
||||||
|
# Rowenhorst_etal2015 MSMSE: value of P is selected as -1
|
||||||
|
P = -1.0
|
||||||
try: # Quaternion
|
try: # Quaternion
|
||||||
Aw = self.w
|
self.q = self.q*other.q - np.dot(self.p,other.p)
|
||||||
Ax = self.x
|
self.p = self.q*other.p + other.q*self.p + P * np.cross(self.p,other.p)
|
||||||
Ay = self.y
|
|
||||||
Az = self.z
|
|
||||||
Bw = other.w
|
|
||||||
Bx = other.x
|
|
||||||
By = other.y
|
|
||||||
Bz = other.z
|
|
||||||
self.w = - Ax * Bx - Ay * By - Az * Bz + Aw * Bw
|
|
||||||
self.x = + Ax * Bw + Ay * Bz - Az * By + Aw * Bx
|
|
||||||
self.y = - Ax * Bz + Ay * Bw + Az * Bx + Aw * By
|
|
||||||
self.z = + Ax * By - Ay * Bx + Az * Bw + Aw * Bz
|
|
||||||
except: pass
|
except: pass
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __div__(self, other):
|
def __div__(self, other):
|
||||||
"""Division"""
|
"""Division"""
|
||||||
if isinstance(other, (int,float)):
|
if isinstance(other, (int,float)):
|
||||||
w = self.w / other
|
return self.__class__(q=self.q / other,
|
||||||
x = self.x / other
|
p=self.p / other)
|
||||||
y = self.y / other
|
|
||||||
z = self.z / other
|
|
||||||
return self.__class__([w,x,y,z])
|
|
||||||
else:
|
else:
|
||||||
return NotImplemented
|
return NotImplemented
|
||||||
|
|
||||||
def __idiv__(self, other):
|
def __idiv__(self, other):
|
||||||
"""In-place division"""
|
"""In-place division"""
|
||||||
if isinstance(other, (int,float)):
|
if isinstance(other, (int,float)):
|
||||||
self.w /= other
|
self.q /= other
|
||||||
self.x /= other
|
self.p /= other
|
||||||
self.y /= other
|
|
||||||
self.z /= other
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __add__(self, other):
|
def __add__(self, other):
|
||||||
"""Addition"""
|
"""Addition"""
|
||||||
if isinstance(other, Quaternion):
|
if isinstance(other, Quaternion):
|
||||||
w = self.w + other.w
|
return self.__class__(q=self.q + other.q,
|
||||||
x = self.x + other.x
|
p=self.p + other.p)
|
||||||
y = self.y + other.y
|
|
||||||
z = self.z + other.z
|
|
||||||
return self.__class__([w,x,y,z])
|
|
||||||
else:
|
else:
|
||||||
return NotImplemented
|
return NotImplemented
|
||||||
|
|
||||||
def __iadd__(self, other):
|
def __iadd__(self, other):
|
||||||
"""In-place addition"""
|
"""In-place addition"""
|
||||||
if isinstance(other, Quaternion):
|
if isinstance(other, Quaternion):
|
||||||
self.w += other.w
|
self.q += other.q
|
||||||
self.x += other.x
|
self.p += other.p
|
||||||
self.y += other.y
|
|
||||||
self.z += other.z
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __sub__(self, other):
|
def __sub__(self, other):
|
||||||
"""Subtraction"""
|
"""Subtraction"""
|
||||||
if isinstance(other, Quaternion):
|
if isinstance(other, Quaternion):
|
||||||
Q = self.copy()
|
return self.__class__(q=self.q - other.q,
|
||||||
Q.w -= other.w
|
p=self.p - other.p)
|
||||||
Q.x -= other.x
|
|
||||||
Q.y -= other.y
|
|
||||||
Q.z -= other.z
|
|
||||||
return Q
|
|
||||||
else:
|
else:
|
||||||
return self.copy()
|
return NotImplemented
|
||||||
|
|
||||||
def __isub__(self, other):
|
def __isub__(self, other):
|
||||||
"""In-place subtraction"""
|
"""In-place subtraction"""
|
||||||
if isinstance(other, Quaternion):
|
if isinstance(other, Quaternion):
|
||||||
self.w -= other.w
|
self.q -= other.q
|
||||||
self.x -= other.x
|
self.p -= other.p
|
||||||
self.y -= other.y
|
|
||||||
self.z -= other.z
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __neg__(self):
|
def __neg__(self):
|
||||||
"""Additive inverse"""
|
"""Additive inverse"""
|
||||||
self.w = -self.w
|
self.q = -self.q
|
||||||
self.x = -self.x
|
self.p = -self.p
|
||||||
self.y = -self.y
|
|
||||||
self.z = -self.z
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __abs__(self):
|
def __abs__(self):
|
||||||
"""Norm"""
|
"""Norm"""
|
||||||
return math.sqrt(self.w ** 2 + \
|
return math.sqrt(self.q ** 2 + np.dot(self.p,self.p))
|
||||||
self.x ** 2 + \
|
|
||||||
self.y ** 2 + \
|
|
||||||
self.z ** 2)
|
|
||||||
|
|
||||||
magnitude = __abs__
|
magnitude = __abs__
|
||||||
|
|
||||||
def __eq__(self,other):
|
def __eq__(self,other):
|
||||||
"""Equal at e-8 precision"""
|
"""Equal at e-8 precision"""
|
||||||
return (abs(self.w-other.w) < 1e-8 and \
|
return (self-other).magnitude() < 1e-8 or (-self-other).magnitude() < 1e-8
|
||||||
abs(self.x-other.x) < 1e-8 and \
|
|
||||||
abs(self.y-other.y) < 1e-8 and \
|
|
||||||
abs(self.z-other.z) < 1e-8) \
|
|
||||||
or \
|
|
||||||
(abs(-self.w-other.w) < 1e-8 and \
|
|
||||||
abs(-self.x-other.x) < 1e-8 and \
|
|
||||||
abs(-self.y-other.y) < 1e-8 and \
|
|
||||||
abs(-self.z-other.z) < 1e-8)
|
|
||||||
|
|
||||||
def __ne__(self,other):
|
def __ne__(self,other):
|
||||||
"""Not equal at e-8 precision"""
|
"""Not equal at e-8 precision"""
|
||||||
|
@ -248,31 +187,26 @@ class Quaternion:
|
||||||
|
|
||||||
def __cmp__(self,other):
|
def __cmp__(self,other):
|
||||||
"""Linear ordering"""
|
"""Linear ordering"""
|
||||||
return (self.Rodrigues()>other.Rodrigues()) - (self.Rodrigues()<other.Rodrigues())
|
return (1 if np.linalg.norm(self.asRodrigues()) > np.linalg.norm(other.asRodrigues()) else 0) \
|
||||||
|
- (1 if np.linalg.norm(self.asRodrigues()) < np.linalg.norm(other.asRodrigues()) else 0)
|
||||||
|
|
||||||
def magnitude_squared(self):
|
def magnitude_squared(self):
|
||||||
return self.w ** 2 + \
|
return self.q ** 2 + np.dot(self.p,self.p)
|
||||||
self.x ** 2 + \
|
|
||||||
self.y ** 2 + \
|
|
||||||
self.z ** 2
|
|
||||||
|
|
||||||
def identity(self):
|
def identity(self):
|
||||||
self.w = 1.
|
self.q = 1.
|
||||||
self.x = 0.
|
self.p = np.zeros(3,dtype=float)
|
||||||
self.y = 0.
|
|
||||||
self.z = 0.
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def normalize(self):
|
def normalize(self):
|
||||||
d = self.magnitude()
|
d = self.magnitude()
|
||||||
if d > 0.0:
|
if d > 0.0:
|
||||||
self /= d
|
self.q /= d
|
||||||
|
self.p /= d
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def conjugate(self):
|
def conjugate(self):
|
||||||
self.x = -self.x
|
self.p = -self.p
|
||||||
self.y = -self.y
|
|
||||||
self.z = -self.z
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def inverse(self):
|
def inverse(self):
|
||||||
|
@ -283,11 +217,9 @@ class Quaternion:
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def homomorph(self):
|
def homomorph(self):
|
||||||
if self.w < 0.0:
|
if self.q < 0.0:
|
||||||
self.w = -self.w
|
self.q = -self.q
|
||||||
self.x = -self.x
|
self.p = -self.p
|
||||||
self.y = -self.y
|
|
||||||
self.z = -self.z
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def normalized(self):
|
def normalized(self):
|
||||||
|
@ -303,25 +235,35 @@ class Quaternion:
|
||||||
return self.copy().homomorph()
|
return self.copy().homomorph()
|
||||||
|
|
||||||
def asList(self):
|
def asList(self):
|
||||||
return [i for i in self]
|
return [self.q]+list(self.p)
|
||||||
|
|
||||||
def asM(self): # to find Averaging Quaternions (see F. Landis Markley et al.)
|
def asM(self): # to find Averaging Quaternions (see F. Landis Markley et al.)
|
||||||
return np.outer([i for i in self],[i for i in self])
|
return np.outer(self.asList(),self.asList())
|
||||||
|
|
||||||
def asMatrix(self):
|
def asMatrix(self):
|
||||||
return np.array(
|
# Rowenhorst_etal2015 MSMSE: value of P is selected as -1
|
||||||
[[1.0-2.0*(self.y*self.y+self.z*self.z), 2.0*(self.x*self.y-self.z*self.w), 2.0*(self.x*self.z+self.y*self.w)],
|
P = -1.0
|
||||||
[ 2.0*(self.x*self.y+self.z*self.w), 1.0-2.0*(self.x*self.x+self.z*self.z), 2.0*(self.y*self.z-self.x*self.w)],
|
qbarhalf = 0.5*(self.q**2 - np.dot(self.p,self.p))
|
||||||
[ 2.0*(self.x*self.z-self.y*self.w), 2.0*(self.x*self.w+self.y*self.z), 1.0-2.0*(self.x*self.x+self.y*self.y)]])
|
return 2.0*np.array(
|
||||||
|
[[ qbarhalf + self.p[0]**2 ,
|
||||||
|
self.p[0]*self.p[1] -P* self.q*self.p[2],
|
||||||
|
self.p[0]*self.p[2] +P* self.q*self.p[1] ],
|
||||||
|
[ self.p[0]*self.p[1] +P* self.q*self.p[2],
|
||||||
|
qbarhalf + self.p[1]**2 ,
|
||||||
|
self.p[1]*self.p[2] -P* self.q*self.p[0] ],
|
||||||
|
[ self.p[0]*self.p[2] -P* self.q*self.p[1],
|
||||||
|
self.p[1]*self.p[2] +P* self.q*self.p[0],
|
||||||
|
qbarhalf + self.p[2]**2 ],
|
||||||
|
])
|
||||||
|
|
||||||
def asAngleAxis(self,
|
def asAngleAxis(self,
|
||||||
degrees = False):
|
degrees = False):
|
||||||
if self.w > 1:
|
if self.q > 1.:
|
||||||
self.normalize()
|
self.normalize()
|
||||||
|
|
||||||
s = math.sqrt(1. - self.w**2)
|
s = math.sqrt(1. - self.q**2)
|
||||||
x = 2*self.w**2 - 1.
|
x = 2*self.q**2 - 1.
|
||||||
y = 2*self.w * s
|
y = 2*self.q * s
|
||||||
|
|
||||||
angle = math.atan2(y,x)
|
angle = math.atan2(y,x)
|
||||||
if angle < 0.0:
|
if angle < 0.0:
|
||||||
|
@ -329,58 +271,31 @@ class Quaternion:
|
||||||
s *= -1.
|
s *= -1.
|
||||||
|
|
||||||
return (np.degrees(angle) if degrees else angle,
|
return (np.degrees(angle) if degrees else angle,
|
||||||
np.array([1.0, 0.0, 0.0] if np.abs(angle) < 1e-6 else [self.x / s, self.y / s, self.z / s]))
|
np.array([1.0, 0.0, 0.0] if np.abs(angle) < 1e-6 else self.p / s))
|
||||||
|
|
||||||
def asRodrigues(self):
|
def asRodrigues(self):
|
||||||
return np.inf*np.ones(3) if self.w == 0.0 else np.array([self.x, self.y, self.z])/self.w
|
return np.inf*np.ones(3) if self.q == 0.0 else self.p/self.q
|
||||||
|
|
||||||
def asEulers(self,
|
def asEulers(self,
|
||||||
type = "bunge",
|
degrees = False):
|
||||||
degrees = False,
|
"""Orientation as Bunge-Euler angles."""
|
||||||
standardRange = False):
|
# Rowenhorst_etal2015 MSMSE: value of P is selected as -1
|
||||||
"""
|
P = -1.0
|
||||||
Orientation as Bunge-Euler angles.
|
q03 = self.q**2 + self.p[2]**2
|
||||||
|
q12 = self.p[0]**2 + self.p[1]**2
|
||||||
|
chi = np.sqrt(q03*q12)
|
||||||
|
|
||||||
|
if abs(chi) < 1e-10 and abs(q12) < 1e-10:
|
||||||
|
eulers = np.array([math.atan2(-2*P*self.q*self.p[2],self.q**2-self.p[2]**2),0,0])
|
||||||
|
elif abs(chi) < 1e-10 and abs(q03) < 1e-10:
|
||||||
|
eulers = np.array([math.atan2( 2 *self.p[0]*self.p[1],self.p[0]**2-self.p[1]**2),np.pi,0])
|
||||||
|
else:
|
||||||
|
eulers = np.array([math.atan2((self.p[0]*self.p[2]-P*self.q*self.p[1])/chi,(-P*self.q*self.p[0]-self.p[1]*self.p[2])/chi),
|
||||||
|
math.atan2(2*chi,q03-q12),
|
||||||
|
math.atan2((P*self.q*self.p[1]+self.p[0]*self.p[2])/chi,( self.p[1]*self.p[2]-P*self.q*self.p[0])/chi),
|
||||||
|
])
|
||||||
|
|
||||||
Conversion of ACTIVE rotation to Euler angles taken from:
|
return np.degrees(eulers) if degrees else eulers
|
||||||
Melcher, A.; Unser, A.; Reichhardt, M.; Nestler, B.; Poetschke, M.; Selzer, M.
|
|
||||||
Conversion of EBSD data by a quaternion based algorithm to be used for grain structure simulations
|
|
||||||
Technische Mechanik 30 (2010) pp 401--413.
|
|
||||||
"""
|
|
||||||
angles = [0.0,0.0,0.0]
|
|
||||||
|
|
||||||
if type.lower() == 'bunge' or type.lower() == 'zxz':
|
|
||||||
if abs(self.x) < 1e-4 and abs(self.y) < 1e-4:
|
|
||||||
x = self.w**2 - self.z**2
|
|
||||||
y = 2.*self.w*self.z
|
|
||||||
angles[0] = math.atan2(y,x)
|
|
||||||
elif abs(self.w) < 1e-4 and abs(self.z) < 1e-4:
|
|
||||||
x = self.x**2 - self.y**2
|
|
||||||
y = 2.*self.x*self.y
|
|
||||||
angles[0] = math.atan2(y,x)
|
|
||||||
angles[1] = math.pi
|
|
||||||
else:
|
|
||||||
chi = math.sqrt((self.w**2 + self.z**2)*(self.x**2 + self.y**2))
|
|
||||||
|
|
||||||
x = (self.w * self.x - self.y * self.z)/2./chi
|
|
||||||
y = (self.w * self.y + self.x * self.z)/2./chi
|
|
||||||
angles[0] = math.atan2(y,x)
|
|
||||||
|
|
||||||
x = self.w**2 + self.z**2 - (self.x**2 + self.y**2)
|
|
||||||
y = 2.*chi
|
|
||||||
angles[1] = math.atan2(y,x)
|
|
||||||
|
|
||||||
x = (self.w * self.x + self.y * self.z)/2./chi
|
|
||||||
y = (self.z * self.x - self.y * self.w)/2./chi
|
|
||||||
angles[2] = math.atan2(y,x)
|
|
||||||
|
|
||||||
if standardRange:
|
|
||||||
angles[0] %= 2*math.pi
|
|
||||||
if angles[1] < 0.0:
|
|
||||||
angles[1] += math.pi
|
|
||||||
angles[2] *= -1.0
|
|
||||||
angles[2] %= 2*math.pi
|
|
||||||
|
|
||||||
return np.degrees(angles) if degrees else angles
|
|
||||||
|
|
||||||
|
|
||||||
# # Static constructors
|
# # Static constructors
|
||||||
|
@ -391,25 +306,26 @@ class Quaternion:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fromRandom(cls,randomSeed = None):
|
def fromRandom(cls,randomSeed = None):
|
||||||
|
import binascii
|
||||||
if randomSeed is None:
|
if randomSeed is None:
|
||||||
randomSeed = int(os.urandom(4).encode('hex'), 16)
|
randomSeed = int(binascii.hexlify(os.urandom(4)),16)
|
||||||
np.random.seed(randomSeed)
|
np.random.seed(randomSeed)
|
||||||
r = np.random.random(3)
|
r = np.random.random(3)
|
||||||
w = math.cos(2.0*math.pi*r[0])*math.sqrt(r[2])
|
w = math.cos(2.0*math.pi*r[0])*math.sqrt(r[2])
|
||||||
x = math.sin(2.0*math.pi*r[1])*math.sqrt(1.0-r[2])
|
x = math.sin(2.0*math.pi*r[1])*math.sqrt(1.0-r[2])
|
||||||
y = math.cos(2.0*math.pi*r[1])*math.sqrt(1.0-r[2])
|
y = math.cos(2.0*math.pi*r[1])*math.sqrt(1.0-r[2])
|
||||||
z = math.sin(2.0*math.pi*r[0])*math.sqrt(r[2])
|
z = math.sin(2.0*math.pi*r[0])*math.sqrt(r[2])
|
||||||
return cls([w,x,y,z])
|
return cls(quat=[w,x,y,z])
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fromRodrigues(cls, rodrigues):
|
def fromRodrigues(cls, rodrigues):
|
||||||
if not isinstance(rodrigues, np.ndarray): rodrigues = np.array(rodrigues)
|
if not isinstance(rodrigues, np.ndarray): rodrigues = np.array(rodrigues)
|
||||||
halfangle = math.atan(np.linalg.norm(rodrigues))
|
norm = np.linalg.norm(rodrigues)
|
||||||
|
halfangle = math.atan(norm)
|
||||||
|
s = math.sin(halfangle)
|
||||||
c = math.cos(halfangle)
|
c = math.cos(halfangle)
|
||||||
w = c
|
return cls(q=c,p=s*rodrigues/norm)
|
||||||
x,y,z = c*rodrigues
|
|
||||||
return cls([w,x,y,z])
|
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -417,39 +333,33 @@ class Quaternion:
|
||||||
angle,
|
angle,
|
||||||
axis,
|
axis,
|
||||||
degrees = False):
|
degrees = False):
|
||||||
if not isinstance(axis, np.ndarray): axis = np.array(axis,dtype='d')
|
if not isinstance(axis, np.ndarray): axis = np.array(axis,dtype=float)
|
||||||
axis = axis.astype(float)/np.linalg.norm(axis)
|
axis = axis.astype(float)/np.linalg.norm(axis)
|
||||||
angle = np.radians(angle) if degrees else angle
|
angle = np.radians(angle) if degrees else angle
|
||||||
s = math.sin(0.5 * angle)
|
s = math.sin(0.5 * angle)
|
||||||
w = math.cos(0.5 * angle)
|
c = math.cos(0.5 * angle)
|
||||||
x = axis[0] * s
|
return cls(q=c,p=axis*s)
|
||||||
y = axis[1] * s
|
|
||||||
z = axis[2] * s
|
|
||||||
return cls([w,x,y,z])
|
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fromEulers(cls,
|
def fromEulers(cls,
|
||||||
eulers,
|
eulers,
|
||||||
type = 'Bunge',
|
|
||||||
degrees = False):
|
degrees = False):
|
||||||
if not isinstance(eulers, np.ndarray): eulers = np.array(eulers,dtype='d')
|
if not isinstance(eulers, np.ndarray): eulers = np.array(eulers,dtype=float)
|
||||||
eulers = np.radians(eulers) if degrees else eulers
|
eulers = np.radians(eulers) if degrees else eulers
|
||||||
|
|
||||||
c = np.cos(0.5 * eulers)
|
sigma = 0.5*(eulers[0]+eulers[2])
|
||||||
s = np.sin(0.5 * eulers)
|
delta = 0.5*(eulers[0]-eulers[2])
|
||||||
|
c = np.cos(0.5*eulers[1])
|
||||||
|
s = np.sin(0.5*eulers[1])
|
||||||
|
|
||||||
if type.lower() == 'bunge' or type.lower() == 'zxz':
|
# Rowenhorst_etal2015 MSMSE: value of P is selected as -1
|
||||||
w = c[0] * c[1] * c[2] - s[0] * c[1] * s[2]
|
P = -1.0
|
||||||
x = c[0] * s[1] * c[2] + s[0] * s[1] * s[2]
|
w = c * np.cos(sigma)
|
||||||
y = - c[0] * s[1] * s[2] + s[0] * s[1] * c[2]
|
x = -P * s * np.cos(delta)
|
||||||
z = c[0] * c[1] * s[2] + s[0] * c[1] * c[2]
|
y = -P * s * np.sin(delta)
|
||||||
else:
|
z = -P * c * np.sin(sigma)
|
||||||
w = c[0] * c[1] * c[2] - s[0] * s[1] * s[2]
|
return cls(quat=[w,x,y,z])
|
||||||
x = s[0] * s[1] * c[2] + c[0] * c[1] * s[2]
|
|
||||||
y = s[0] * c[1] * c[2] + c[0] * s[1] * s[2]
|
|
||||||
z = c[0] * s[1] * c[2] - s[0] * c[1] * s[2]
|
|
||||||
return cls([w,x,y,z])
|
|
||||||
|
|
||||||
|
|
||||||
# Modified Method to calculate Quaternion from Orientation Matrix,
|
# Modified Method to calculate Quaternion from Orientation Matrix,
|
||||||
|
@ -460,49 +370,18 @@ class Quaternion:
|
||||||
if m.shape != (3,3) and np.prod(m.shape) == 9:
|
if m.shape != (3,3) and np.prod(m.shape) == 9:
|
||||||
m = m.reshape(3,3)
|
m = m.reshape(3,3)
|
||||||
|
|
||||||
tr = np.trace(m)
|
# Rowenhorst_etal2015 MSMSE: value of P is selected as -1
|
||||||
if tr > 1e-8:
|
P = -1.0
|
||||||
s = math.sqrt(tr + 1.0)*2.0
|
w = 0.5*math.sqrt(1.+m[0,0]+m[1,1]+m[2,2])
|
||||||
|
x = P*0.5*math.sqrt(1.+m[0,0]-m[1,1]-m[2,2])
|
||||||
|
y = P*0.5*math.sqrt(1.-m[0,0]+m[1,1]-m[2,2])
|
||||||
|
z = P*0.5*math.sqrt(1.-m[0,0]-m[1,1]+m[2,2])
|
||||||
|
|
||||||
return cls(
|
x *= -1 if m[2,1] < m[1,2] else 1
|
||||||
[ s*0.25,
|
y *= -1 if m[0,2] < m[2,0] else 1
|
||||||
(m[2,1] - m[1,2])/s,
|
z *= -1 if m[1,0] < m[0,1] else 1
|
||||||
(m[0,2] - m[2,0])/s,
|
|
||||||
(m[1,0] - m[0,1])/s,
|
|
||||||
])
|
|
||||||
|
|
||||||
elif m[0,0] > m[1,1] and m[0,0] > m[2,2]:
|
return cls(quat=np.array([w,x,y,z])/math.sqrt(w**2 + x**2 + y**2 + z**2))
|
||||||
t = m[0,0] - m[1,1] - m[2,2] + 1.0
|
|
||||||
s = 2.0*math.sqrt(t)
|
|
||||||
|
|
||||||
return cls(
|
|
||||||
[ (m[2,1] - m[1,2])/s,
|
|
||||||
s*0.25,
|
|
||||||
(m[0,1] + m[1,0])/s,
|
|
||||||
(m[2,0] + m[0,2])/s,
|
|
||||||
])
|
|
||||||
|
|
||||||
elif m[1,1] > m[2,2]:
|
|
||||||
t = -m[0,0] + m[1,1] - m[2,2] + 1.0
|
|
||||||
s = 2.0*math.sqrt(t)
|
|
||||||
|
|
||||||
return cls(
|
|
||||||
[ (m[0,2] - m[2,0])/s,
|
|
||||||
(m[0,1] + m[1,0])/s,
|
|
||||||
s*0.25,
|
|
||||||
(m[1,2] + m[2,1])/s,
|
|
||||||
])
|
|
||||||
|
|
||||||
else:
|
|
||||||
t = -m[0,0] - m[1,1] + m[2,2] + 1.0
|
|
||||||
s = 2.0*math.sqrt(t)
|
|
||||||
|
|
||||||
return cls(
|
|
||||||
[ (m[1,0] - m[0,1])/s,
|
|
||||||
(m[2,0] + m[0,2])/s,
|
|
||||||
(m[1,2] + m[2,1])/s,
|
|
||||||
s*0.25,
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -516,36 +395,30 @@ class Quaternion:
|
||||||
assert isinstance(q1, Quaternion) and isinstance(q2, Quaternion)
|
assert isinstance(q1, Quaternion) and isinstance(q2, Quaternion)
|
||||||
Q = cls()
|
Q = cls()
|
||||||
|
|
||||||
costheta = q1.w * q2.w + q1.x * q2.x + q1.y * q2.y + q1.z * q2.z
|
costheta = q1.q*q2.q + np.dot(q1.p,q2.p)
|
||||||
if costheta < 0.:
|
if costheta < 0.:
|
||||||
costheta = -costheta
|
costheta = -costheta
|
||||||
q1 = q1.conjugated()
|
q1 = q1.conjugated()
|
||||||
elif costheta > 1:
|
elif costheta > 1.:
|
||||||
costheta = 1
|
costheta = 1.
|
||||||
|
|
||||||
theta = math.acos(costheta)
|
theta = math.acos(costheta)
|
||||||
if abs(theta) < 0.01:
|
if abs(theta) < 0.01:
|
||||||
Q.w = q2.w
|
Q.q = q2.q
|
||||||
Q.x = q2.x
|
Q.p = q2.p
|
||||||
Q.y = q2.y
|
|
||||||
Q.z = q2.z
|
|
||||||
return Q
|
return Q
|
||||||
|
|
||||||
sintheta = math.sqrt(1.0 - costheta * costheta)
|
sintheta = math.sqrt(1.0 - costheta * costheta)
|
||||||
if abs(sintheta) < 0.01:
|
if abs(sintheta) < 0.01:
|
||||||
Q.w = (q1.w + q2.w) * 0.5
|
Q.q = (q1.q + q2.q) * 0.5
|
||||||
Q.x = (q1.x + q2.x) * 0.5
|
Q.p = (q1.p + q2.p) * 0.5
|
||||||
Q.y = (q1.y + q2.y) * 0.5
|
|
||||||
Q.z = (q1.z + q2.z) * 0.5
|
|
||||||
return Q
|
return Q
|
||||||
|
|
||||||
ratio1 = math.sin((1 - t) * theta) / sintheta
|
ratio1 = math.sin((1.0 - t) * theta) / sintheta
|
||||||
ratio2 = math.sin(t * theta) / sintheta
|
ratio2 = math.sin( t * theta) / sintheta
|
||||||
|
|
||||||
Q.w = q1.w * ratio1 + q2.w * ratio2
|
Q.q = q1.q * ratio1 + q2.q * ratio2
|
||||||
Q.x = q1.x * ratio1 + q2.x * ratio2
|
Q.p = q1.p * ratio1 + q2.p * ratio2
|
||||||
Q.y = q1.y * ratio1 + q2.y * ratio2
|
|
||||||
Q.z = q1.z * ratio1 + q2.z * ratio2
|
|
||||||
return Q
|
return Q
|
||||||
|
|
||||||
|
|
||||||
|
@ -571,7 +444,7 @@ class Symmetry:
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
"""Readbable string"""
|
"""Readbable string"""
|
||||||
return '%s' % (self.lattice)
|
return '{}'.format(self.lattice)
|
||||||
|
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
|
@ -584,7 +457,7 @@ class Symmetry:
|
||||||
|
|
||||||
def __cmp__(self,other):
|
def __cmp__(self,other):
|
||||||
"""Linear ordering"""
|
"""Linear ordering"""
|
||||||
myOrder = Symmetry.lattices.index(self.lattice)
|
myOrder = Symmetry.lattices.index(self.lattice)
|
||||||
otherOrder = Symmetry.lattices.index(other.lattice)
|
otherOrder = Symmetry.lattices.index(other.lattice)
|
||||||
return (myOrder > otherOrder) - (myOrder < otherOrder)
|
return (myOrder > otherOrder) - (myOrder < otherOrder)
|
||||||
|
|
||||||
|
@ -663,7 +536,7 @@ class Symmetry:
|
||||||
quaternion,
|
quaternion,
|
||||||
who = []):
|
who = []):
|
||||||
"""List of symmetrically equivalent quaternions based on own symmetry."""
|
"""List of symmetrically equivalent quaternions based on own symmetry."""
|
||||||
return [quaternion*q for q in self.symmetryQuats(who)]
|
return [q*quaternion for q in self.symmetryQuats(who)]
|
||||||
|
|
||||||
|
|
||||||
def inFZ(self,R):
|
def inFZ(self,R):
|
||||||
|
@ -780,7 +653,7 @@ class Symmetry:
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
v = np.array(vector,dtype = float)
|
v = np.array(vector,dtype=float)
|
||||||
if proper: # check both improper ...
|
if proper: # check both improper ...
|
||||||
theComponents = np.dot(basis['improper'],v)
|
theComponents = np.dot(basis['improper'],v)
|
||||||
inSST = np.all(theComponents >= 0.0)
|
inSST = np.all(theComponents >= 0.0)
|
||||||
|
@ -795,10 +668,10 @@ class Symmetry:
|
||||||
if color: # have to return color array
|
if color: # have to return color array
|
||||||
if inSST:
|
if inSST:
|
||||||
rgb = np.power(theComponents/np.linalg.norm(theComponents),0.5) # smoothen color ramps
|
rgb = np.power(theComponents/np.linalg.norm(theComponents),0.5) # smoothen color ramps
|
||||||
rgb = np.minimum(np.ones(3,'d'),rgb) # limit to maximum intensity
|
rgb = np.minimum(np.ones(3,dtype=float),rgb) # limit to maximum intensity
|
||||||
rgb /= max(rgb) # normalize to (HS)V = 1
|
rgb /= max(rgb) # normalize to (HS)V = 1
|
||||||
else:
|
else:
|
||||||
rgb = np.zeros(3,'d')
|
rgb = np.zeros(3,dtype=float)
|
||||||
return (inSST,rgb)
|
return (inSST,rgb)
|
||||||
else:
|
else:
|
||||||
return inSST
|
return inSST
|
||||||
|
@ -829,7 +702,7 @@ class Orientation:
|
||||||
else:
|
else:
|
||||||
self.quaternion = Quaternion.fromRandom(randomSeed=random)
|
self.quaternion = Quaternion.fromRandom(randomSeed=random)
|
||||||
elif isinstance(Eulers, np.ndarray) and Eulers.shape == (3,): # based on given Euler angles
|
elif isinstance(Eulers, np.ndarray) and Eulers.shape == (3,): # based on given Euler angles
|
||||||
self.quaternion = Quaternion.fromEulers(Eulers,type='bunge',degrees=degrees)
|
self.quaternion = Quaternion.fromEulers(Eulers,degrees=degrees)
|
||||||
elif isinstance(matrix, np.ndarray) : # based on given rotation matrix
|
elif isinstance(matrix, np.ndarray) : # based on given rotation matrix
|
||||||
self.quaternion = Quaternion.fromMatrix(matrix)
|
self.quaternion = Quaternion.fromMatrix(matrix)
|
||||||
elif isinstance(angleAxis, np.ndarray) and angleAxis.shape == (4,): # based on given angle and rotation axis
|
elif isinstance(angleAxis, np.ndarray) and angleAxis.shape == (4,): # based on given angle and rotation axis
|
||||||
|
@ -838,8 +711,9 @@ class Orientation:
|
||||||
self.quaternion = Quaternion.fromRodrigues(Rodrigues)
|
self.quaternion = Quaternion.fromRodrigues(Rodrigues)
|
||||||
elif isinstance(quaternion, Quaternion): # based on given quaternion
|
elif isinstance(quaternion, Quaternion): # based on given quaternion
|
||||||
self.quaternion = quaternion.homomorphed()
|
self.quaternion = quaternion.homomorphed()
|
||||||
elif isinstance(quaternion, np.ndarray) and quaternion.shape == (4,): # based on given quaternion-like array
|
elif (isinstance(quaternion, np.ndarray) and quaternion.shape == (4,)) or \
|
||||||
self.quaternion = Quaternion(quaternion).homomorphed()
|
(isinstance(quaternion, list) and len(quaternion) == 4 ): # based on given quaternion-like array
|
||||||
|
self.quaternion = Quaternion(quat=quaternion).homomorphed()
|
||||||
|
|
||||||
self.symmetry = Symmetry(symmetry)
|
self.symmetry = Symmetry(symmetry)
|
||||||
|
|
||||||
|
@ -852,19 +726,20 @@ class Orientation:
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
"""Value as all implemented representations"""
|
"""Value as all implemented representations"""
|
||||||
return 'Symmetry: %s\n' % (self.symmetry) + \
|
return '\n'.join([
|
||||||
'Quaternion: %s\n' % (self.quaternion) + \
|
'Symmetry: {}'.format(self.symmetry),
|
||||||
'Matrix:\n%s\n' % ( '\n'.join(['\t'.join(map(str,self.asMatrix()[i,:])) for i in range(3)]) ) + \
|
'Quaternion: {}'.format(self.quaternion),
|
||||||
'Bunge Eulers / deg: %s' % ('\t'.join(map(str,self.asEulers('bunge',degrees=True))) )
|
'Matrix:\n{}'.format( '\n'.join(['\t'.join(list(map(str,self.asMatrix()[i,:]))) for i in range(3)]) ),
|
||||||
|
'Bunge Eulers / deg: {}'.format('\t'.join(list(map(str,self.asEulers(degrees=True)))) ),
|
||||||
|
])
|
||||||
|
|
||||||
def asQuaternion(self):
|
def asQuaternion(self):
|
||||||
return self.quaternion.asList()
|
return self.quaternion.asList()
|
||||||
|
|
||||||
def asEulers(self,
|
def asEulers(self,
|
||||||
type = 'bunge',
|
|
||||||
degrees = False,
|
degrees = False,
|
||||||
standardRange = False):
|
):
|
||||||
return self.quaternion.asEulers(type, degrees, standardRange)
|
return self.quaternion.asEulers(degrees)
|
||||||
eulers = property(asEulers)
|
eulers = property(asEulers)
|
||||||
|
|
||||||
def asRodrigues(self):
|
def asRodrigues(self):
|
||||||
|
@ -912,13 +787,13 @@ class Orientation:
|
||||||
"""
|
"""
|
||||||
if self.symmetry != other.symmetry: raise TypeError('disorientation between different symmetry classes not supported yet.')
|
if self.symmetry != other.symmetry: raise TypeError('disorientation between different symmetry classes not supported yet.')
|
||||||
|
|
||||||
misQ = self.quaternion.conjugated()*other.quaternion
|
misQ = other.quaternion*self.quaternion.conjugated()
|
||||||
mySymQs = self.symmetry.symmetryQuats() if SST else self.symmetry.symmetryQuats()[:1] # take all or only first sym operation
|
mySymQs = self.symmetry.symmetryQuats() if SST else self.symmetry.symmetryQuats()[:1] # take all or only first sym operation
|
||||||
otherSymQs = other.symmetry.symmetryQuats()
|
otherSymQs = other.symmetry.symmetryQuats()
|
||||||
|
|
||||||
for i,sA in enumerate(mySymQs):
|
for i,sA in enumerate(mySymQs):
|
||||||
for j,sB in enumerate(otherSymQs):
|
for j,sB in enumerate(otherSymQs):
|
||||||
theQ = sA.conjugated()*misQ*sB
|
theQ = sB*misQ*sA.conjugated()
|
||||||
for k in range(2):
|
for k in range(2):
|
||||||
theQ.conjugate()
|
theQ.conjugate()
|
||||||
breaker = self.symmetry.inFZ(theQ) \
|
breaker = self.symmetry.inFZ(theQ) \
|
||||||
|
@ -929,7 +804,7 @@ class Orientation:
|
||||||
|
|
||||||
# disorientation, own sym, other sym, self-->other: True, self<--other: False
|
# disorientation, own sym, other sym, self-->other: True, self<--other: False
|
||||||
return (Orientation(quaternion = theQ,symmetry = self.symmetry.lattice),
|
return (Orientation(quaternion = theQ,symmetry = self.symmetry.lattice),
|
||||||
i,j,k == 1)
|
i,j, k == 1)
|
||||||
|
|
||||||
|
|
||||||
def inversePole(self,
|
def inversePole(self,
|
||||||
|
@ -939,10 +814,10 @@ class Orientation:
|
||||||
"""Axis rotated according to orientation (using crystal symmetry to ensure location falls into SST)"""
|
"""Axis rotated according to orientation (using crystal symmetry to ensure location falls into SST)"""
|
||||||
if SST: # pole requested to be within SST
|
if SST: # pole requested to be within SST
|
||||||
for i,q in enumerate(self.symmetry.equivalentQuaternions(self.quaternion)): # test all symmetric equivalent quaternions
|
for i,q in enumerate(self.symmetry.equivalentQuaternions(self.quaternion)): # test all symmetric equivalent quaternions
|
||||||
pole = q.conjugated()*axis # align crystal direction to axis
|
pole = q*axis # align crystal direction to axis
|
||||||
if self.symmetry.inSST(pole,proper): break # found SST version
|
if self.symmetry.inSST(pole,proper): break # found SST version
|
||||||
else:
|
else:
|
||||||
pole = self.quaternion.conjugated()*axis # align crystal direction to axis
|
pole = self.quaternion*axis # align crystal direction to axis
|
||||||
|
|
||||||
return (pole,i if SST else 0)
|
return (pole,i if SST else 0)
|
||||||
|
|
||||||
|
@ -951,7 +826,7 @@ class Orientation:
|
||||||
color = np.zeros(3,'d')
|
color = np.zeros(3,'d')
|
||||||
|
|
||||||
for q in self.symmetry.equivalentQuaternions(self.quaternion):
|
for q in self.symmetry.equivalentQuaternions(self.quaternion):
|
||||||
pole = q.conjugated()*axis # align crystal direction to axis
|
pole = q*axis # align crystal direction to axis
|
||||||
inSST,color = self.symmetry.inSST(pole,color=True)
|
inSST,color = self.symmetry.inSST(pole,color=True)
|
||||||
if inSST: break
|
if inSST: break
|
||||||
|
|
||||||
|
@ -986,7 +861,7 @@ class Orientation:
|
||||||
M = closest.quaternion.asM() * n if i == 0 else M + closest.quaternion.asM() * n # noqa add (multiples) of this orientation to average noqa
|
M = closest.quaternion.asM() * n if i == 0 else M + closest.quaternion.asM() * n # noqa add (multiples) of this orientation to average noqa
|
||||||
eig, vec = np.linalg.eig(M/N)
|
eig, vec = np.linalg.eig(M/N)
|
||||||
|
|
||||||
return Orientation(quaternion = Quaternion(quatArray = np.real(vec.T[eig.argmax()])),
|
return Orientation(quaternion = Quaternion(quat = np.real(vec.T[eig.argmax()])),
|
||||||
symmetry = reference.symmetry.lattice)
|
symmetry = reference.symmetry.lattice)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,55 +8,37 @@ class Marc(Solver):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.solver = 'Marc'
|
self.solver = 'Marc'
|
||||||
self.releases = { \
|
|
||||||
'2017': ['linux64',''],
|
|
||||||
'2016': ['linux64',''],
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------
|
#--------------------------
|
||||||
def version(self):
|
def version(self):
|
||||||
import os,damask.environment
|
import damask.environment
|
||||||
|
|
||||||
MSCpath = damask.environment.Environment().options['MSC_ROOT']
|
return damask.environment.Environment().options['MARC_VERSION']
|
||||||
|
|
||||||
for release,subdirs in sorted(list(self.releases.items()),reverse=True):
|
|
||||||
for subdir in subdirs:
|
|
||||||
path = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir)
|
|
||||||
if os.path.exists(path): return release
|
|
||||||
else: continue
|
|
||||||
|
|
||||||
return ''
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------
|
#--------------------------
|
||||||
def libraryPath(self,releases = []):
|
def libraryPath(self,release = ''):
|
||||||
import os,damask.environment
|
import os,damask.environment
|
||||||
|
|
||||||
MSCpath = damask.environment.Environment().options['MSC_ROOT']
|
MSCpath = damask.environment.Environment().options['MSC_ROOT']
|
||||||
|
if len(release) == 0: release = self.version()
|
||||||
|
|
||||||
if len(releases) == 0: releases = list(self.releases.keys())
|
path = '{}/mentat{}/shlib/linux64'.format(MSCpath,release)
|
||||||
if type(releases) is not list: releases = [releases]
|
|
||||||
for release in sorted(releases,reverse=True):
|
return path if os.path.exists(path) else ''
|
||||||
if release not in self.releases: continue
|
|
||||||
for subdir in self.releases[release]:
|
|
||||||
libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir)
|
|
||||||
if os.path.exists(libPath): return libPath
|
|
||||||
else: continue
|
|
||||||
|
|
||||||
return ''
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------
|
#--------------------------
|
||||||
def toolsPath(self,release = ''):
|
def toolsPath(self,release = ''):
|
||||||
import os,damask.environment
|
import os,damask.environment
|
||||||
|
|
||||||
MSCpath = damask.environment.Environment().options['MSC_ROOT']
|
MSCpath = damask.environment.Environment().options['MSC_ROOT']
|
||||||
|
|
||||||
if len(release) == 0: release = self.version()
|
if len(release) == 0: release = self.version()
|
||||||
|
|
||||||
path = '%s/marc%s/tools'%(MSCpath,release)
|
path = '%s/marc%s/tools'%(MSCpath,release)
|
||||||
if os.path.exists(path): return path
|
|
||||||
else: return ''
|
return path if os.path.exists(path) else ''
|
||||||
|
|
||||||
|
|
||||||
#--------------------------
|
#--------------------------
|
||||||
|
@ -67,31 +49,25 @@ class Marc(Solver):
|
||||||
logfile = None,
|
logfile = None,
|
||||||
compile = False,
|
compile = False,
|
||||||
optimization ='',
|
optimization ='',
|
||||||
openMP = False
|
|
||||||
):
|
):
|
||||||
|
|
||||||
import os,damask.environment
|
import os,damask.environment
|
||||||
import subprocess,shlex
|
import subprocess,shlex
|
||||||
|
|
||||||
if len(release) == 0: release = self.version()
|
if len(release) == 0: release = self.version()
|
||||||
|
|
||||||
if release not in self.releases:
|
|
||||||
raise Exception("Unknown MSC.Marc Version %s"%release)
|
|
||||||
|
|
||||||
|
|
||||||
damaskEnv = damask.environment.Environment()
|
damaskEnv = damask.environment.Environment()
|
||||||
|
|
||||||
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc') # might be updated if special version (symlink) is found
|
user = 'not found'
|
||||||
|
|
||||||
if compile:
|
if compile:
|
||||||
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s.f90'%release)):
|
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}.f90'.format(release))):
|
||||||
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s'%release)
|
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}'.format(release))
|
||||||
else:
|
else:
|
||||||
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s.marc'%release)):
|
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}.marc'.format(release))):
|
||||||
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s'%release)
|
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}'.format(release))
|
||||||
|
|
||||||
# Define options [see Marc Installation and Operation Guide, pp 23]
|
# Define options [see Marc Installation and Operation Guide, pp 23]
|
||||||
script = 'run_damask%s'%({False:'',True:'_'}[optimization!='' or openMP])
|
script = 'run_damask_{}mp'.format(optimization)
|
||||||
script = script+'%s%s'%({False:'',True:optimization}[optimization!=''],{False:'',True:'mp'}[openMP])
|
|
||||||
|
|
||||||
cmd = os.path.join(self.toolsPath(release),script) + \
|
cmd = os.path.join(self.toolsPath(release),script) + \
|
||||||
' -jid ' + model + '_' + job + \
|
' -jid ' + model + '_' + job + \
|
||||||
|
@ -100,24 +76,24 @@ class Marc(Solver):
|
||||||
if compile: cmd += ' -u ' + user+'.f90' + ' -save y'
|
if compile: cmd += ' -u ' + user+'.f90' + ' -save y'
|
||||||
else: cmd += ' -prog ' + user
|
else: cmd += ' -prog ' + user
|
||||||
|
|
||||||
print('job submission with%s compilation: %s'%({False:'out',True:''}[compile],user))
|
print('job submission with{} compilation: {}'.format({False:'out',True:''}[compile],user))
|
||||||
if logfile:
|
if logfile:
|
||||||
log = open(logfile, 'w')
|
log = open(logfile, 'w')
|
||||||
print(cmd)
|
print(cmd)
|
||||||
self.p = subprocess.Popen(shlex.split(cmd),stdout = log,stderr = subprocess.STDOUT)
|
process = subprocess.Popen(shlex.split(cmd),stdout = log,stderr = subprocess.STDOUT)
|
||||||
log.close()
|
log.close()
|
||||||
self.p.wait()
|
process.wait()
|
||||||
|
|
||||||
#--------------------------
|
#--------------------------
|
||||||
def exit_number_from_outFile(self,outFile=None):
|
def exit_number_from_outFile(self,outFile=None):
|
||||||
import string
|
import string
|
||||||
exitnumber = -1
|
exitnumber = -1
|
||||||
fid_out = open(outFile,'r')
|
fid_out = open(outFile,'r')
|
||||||
for ln in fid_out:
|
for line in fid_out:
|
||||||
if (string.find(ln,'tress iteration') is not -1):
|
if (string.find(line,'tress iteration') is not -1):
|
||||||
print(ln)
|
print(line)
|
||||||
elif (string.find(ln,'Exit number') is not -1):
|
elif (string.find(line,'Exit number') is not -1):
|
||||||
substr = ln[string.find(ln,'Exit number'):len(ln)]
|
substr = line[string.find(line,'Exit number'):len(line)]
|
||||||
exitnumber = int(substr[12:16])
|
exitnumber = int(substr[12:16])
|
||||||
|
|
||||||
fid_out.close()
|
fid_out.close()
|
||||||
|
|
|
@ -384,10 +384,10 @@ class Test():
|
||||||
while table0.data_read(): # read next data line of ASCII table
|
while table0.data_read(): # read next data line of ASCII table
|
||||||
if line0 not in skipLines:
|
if line0 not in skipLines:
|
||||||
for i in range(dataLength):
|
for i in range(dataLength):
|
||||||
myData = np.array(map(float,table0.data[column[0][i]:\
|
myData = np.array(list(map(float,table0.data[column[0][i]:\
|
||||||
column[0][i]+length[i]]),'d')
|
column[0][i]+length[i]])),'d')
|
||||||
normData = np.array(map(float,table0.data[normColumn[i]:\
|
normData = np.array(list(map(float,table0.data[normColumn[i]:\
|
||||||
normColumn[i]+normLength[i]]),'d')
|
normColumn[i]+normLength[i]])),'d')
|
||||||
data[i] = np.append(data[i],np.reshape(myData,shape[i]))
|
data[i] = np.append(data[i],np.reshape(myData,shape[i]))
|
||||||
if normType == 'pInf':
|
if normType == 'pInf':
|
||||||
norm[i] = np.append(norm[i],np.max(np.abs(normData)))
|
norm[i] = np.append(norm[i],np.max(np.abs(normData)))
|
||||||
|
@ -410,8 +410,8 @@ class Test():
|
||||||
while table1.data_read(): # read next data line of ASCII table
|
while table1.data_read(): # read next data line of ASCII table
|
||||||
if line1 not in skipLines:
|
if line1 not in skipLines:
|
||||||
for i in range(dataLength):
|
for i in range(dataLength):
|
||||||
myData = np.array(map(float,table1.data[column[1][i]:\
|
myData = np.array(list(map(float,table1.data[column[1][i]:\
|
||||||
column[1][i]+length[i]]),'d')
|
column[1][i]+length[i]])),'d')
|
||||||
maxError[i] = max(maxError[i],np.linalg.norm(np.reshape(myData-data[i][line1-len(skipLines),:],shape[i]))/
|
maxError[i] = max(maxError[i],np.linalg.norm(np.reshape(myData-data[i][line1-len(skipLines),:],shape[i]))/
|
||||||
norm[i][line1-len(skipLines)])
|
norm[i][line1-len(skipLines)])
|
||||||
line1 +=1
|
line1 +=1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,re,sys,collections
|
import os,re,sys,collections
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
@ -49,7 +49,7 @@ def curlFFT(geomdim,field):
|
||||||
|
|
||||||
curl_fourier = np.einsum(einsums[n],e,k_s,field_fourier)*TWOPIIMG
|
curl_fourier = np.einsum(einsums[n],e,k_s,field_fourier)*TWOPIIMG
|
||||||
|
|
||||||
return np.fft.irfftn(curl_fourier,axes=(0,1,2),s=shapeFFT).reshape([N,n])
|
return np.fft.irfftn(curl_fourier,s=shapeFFT,axes=(0,1,2)).reshape([N,n])
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
@ -45,7 +45,7 @@ def divFFT(geomdim,field):
|
||||||
|
|
||||||
div_fourier = np.einsum(einsums[n],k_s,field_fourier)*TWOPIIMG
|
div_fourier = np.einsum(einsums[n],k_s,field_fourier)*TWOPIIMG
|
||||||
|
|
||||||
return np.fft.irfftn(div_fourier,axes=(0,1,2),s=shapeFFT).reshape([N,n/3])
|
return np.fft.irfftn(div_fourier,s=shapeFFT,axes=(0,1,2)).reshape([N,n//3])
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,itertools
|
import os,sys,itertools
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
@ -45,7 +45,7 @@ def gradFFT(geomdim,field):
|
||||||
k_s = np.concatenate((ki[:,:,:,None],kj[:,:,:,None],kk[:,:,:,None]),axis = 3).astype('c16')
|
k_s = np.concatenate((ki[:,:,:,None],kj[:,:,:,None],kk[:,:,:,None]),axis = 3).astype('c16')
|
||||||
grad_fourier = np.einsum(einsums[n],field_fourier,k_s)*TWOPIIMG
|
grad_fourier = np.einsum(einsums[n],field_fourier,k_s)*TWOPIIMG
|
||||||
|
|
||||||
return np.fft.irfftn(grad_fourier,axes=(0,1,2),s=shapeFFT).reshape([N,3*n])
|
return np.fft.irfftn(grad_fourier,s=shapeFFT,axes=(0,1,2)).reshape([N,3*n])
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
|
@ -200,9 +200,9 @@ for name in filenames:
|
||||||
if gID != -1 and gID not in alreadyChecked: # indexed point belonging to a grain not yet tested?
|
if gID != -1 and gID not in alreadyChecked: # indexed point belonging to a grain not yet tested?
|
||||||
alreadyChecked[gID] = True # remember not to check again
|
alreadyChecked[gID] = True # remember not to check again
|
||||||
disorientation = o.disorientation(orientations[gID],SST = False)[0] # compare against other orientation
|
disorientation = o.disorientation(orientations[gID],SST = False)[0] # compare against other orientation
|
||||||
if disorientation.quaternion.w > cos_disorientation: # within threshold ...
|
if disorientation.quaternion.q > cos_disorientation: # within threshold ...
|
||||||
candidates.append(gID) # remember as potential candidate
|
candidates.append(gID) # remember as potential candidate
|
||||||
if disorientation.quaternion.w >= bestDisorientation.w: # ... and better than current best?
|
if disorientation.quaternion.q >= bestDisorientation.q: # ... and better than current best?
|
||||||
matched = True
|
matched = True
|
||||||
matchedID = gID # remember that grain
|
matchedID = gID # remember that grain
|
||||||
bestDisorientation = disorientation.quaternion
|
bestDisorientation = disorientation.quaternion
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
@ -169,7 +169,7 @@ for name in filenames:
|
||||||
for output in options.output:
|
for output in options.output:
|
||||||
if output == 'quaternion': table.data_append(o.asQuaternion())
|
if output == 'quaternion': table.data_append(o.asQuaternion())
|
||||||
elif output == 'rodrigues': table.data_append(o.asRodrigues())
|
elif output == 'rodrigues': table.data_append(o.asRodrigues())
|
||||||
elif output == 'eulers': table.data_append(o.asEulers('Bunge', degrees=options.degrees))
|
elif output == 'eulers': table.data_append(o.asEulers(degrees=options.degrees))
|
||||||
outputAlive = table.data_write() # output processed line
|
outputAlive = table.data_write() # output processed line
|
||||||
|
|
||||||
# ------------------------------------------ output finalization -----------------------------------
|
# ------------------------------------------ output finalization -----------------------------------
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
@ -190,27 +190,27 @@ if np.sum(input) != 1: parser.error('needs exactly one input format.')
|
||||||
(options.quaternion,4,'quaternion'),
|
(options.quaternion,4,'quaternion'),
|
||||||
][np.where(input)[0][0]] # select input label that was requested
|
][np.where(input)[0][0]] # select input label that was requested
|
||||||
|
|
||||||
c_direction = np.zeros((len(slipSystems[options.lattice]),3),'f')
|
slip_direction = np.zeros((len(slipSystems[options.lattice]),3),'f')
|
||||||
c_normal = np.zeros_like(c_direction)
|
slip_normal = np.zeros_like(slip_direction)
|
||||||
|
|
||||||
|
|
||||||
if options.lattice in latticeChoices[:2]:
|
if options.lattice in latticeChoices[:2]:
|
||||||
c_direction = slipSystems[options.lattice][:,:3]
|
slip_direction = slipSystems[options.lattice][:,:3]
|
||||||
c_normal = slipSystems[options.lattice][:,3:]
|
slip_normal = slipSystems[options.lattice][:,3:]
|
||||||
elif options.lattice == latticeChoices[2]:
|
elif options.lattice == latticeChoices[2]:
|
||||||
# convert 4 Miller index notation of hex to orthogonal 3 Miller index notation
|
# convert 4 Miller index notation of hex to orthogonal 3 Miller index notation
|
||||||
for i in range(len(c_direction)):
|
for i in range(len(slip_direction)):
|
||||||
c_direction[i] = np.array([slipSystems['hex'][i,0]*1.5,
|
slip_direction[i] = np.array([slipSystems['hex'][i,0]*1.5,
|
||||||
(slipSystems['hex'][i,0] + 2.*slipSystems['hex'][i,1])*0.5*np.sqrt(3),
|
(slipSystems['hex'][i,0] + 2.*slipSystems['hex'][i,1])*0.5*np.sqrt(3),
|
||||||
slipSystems['hex'][i,3]*options.CoverA,
|
slipSystems['hex'][i,3]*options.CoverA,
|
||||||
])
|
])
|
||||||
c_normal[i] = np.array([slipSystems['hex'][i,4],
|
slip_normal[i] = np.array([slipSystems['hex'][i,4],
|
||||||
(slipSystems['hex'][i,4] + 2.*slipSystems['hex'][i,5])/np.sqrt(3),
|
(slipSystems['hex'][i,4] + 2.*slipSystems['hex'][i,5])/np.sqrt(3),
|
||||||
slipSystems['hex'][i,7]/options.CoverA,
|
slipSystems['hex'][i,7]/options.CoverA,
|
||||||
])
|
])
|
||||||
|
|
||||||
c_direction /= np.tile(np.linalg.norm(c_direction,axis=1),(3,1)).T
|
slip_direction /= np.tile(np.linalg.norm(slip_direction,axis=1),(3,1)).T
|
||||||
c_normal /= np.tile(np.linalg.norm(c_normal ,axis=1),(3,1)).T
|
slip_normal /= np.tile(np.linalg.norm(slip_normal ,axis=1),(3,1)).T
|
||||||
|
|
||||||
# --- loop over input files ------------------------------------------------------------------------
|
# --- loop over input files ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ for name in filenames:
|
||||||
.format( id = i+1,
|
.format( id = i+1,
|
||||||
normal = theNormal,
|
normal = theNormal,
|
||||||
direction = theDirection,
|
direction = theDirection,
|
||||||
) for i,(theNormal,theDirection) in enumerate(zip(c_normal,c_direction))])
|
) for i,(theNormal,theDirection) in enumerate(zip(slip_normal,slip_direction))])
|
||||||
table.head_write()
|
table.head_write()
|
||||||
|
|
||||||
# ------------------------------------------ process data ------------------------------------------
|
# ------------------------------------------ process data ------------------------------------------
|
||||||
|
@ -262,9 +262,9 @@ for name in filenames:
|
||||||
elif inputtype == 'quaternion':
|
elif inputtype == 'quaternion':
|
||||||
o = damask.Orientation(quaternion = np.array(list(map(float,table.data[column:column+4]))),)
|
o = damask.Orientation(quaternion = np.array(list(map(float,table.data[column:column+4]))),)
|
||||||
|
|
||||||
rotForce = o.quaternion.conjugated() * force
|
|
||||||
rotNormal = o.quaternion.conjugated() * normal
|
table.data_append( np.abs( np.sum(slip_direction * (o.quaternion * force) ,axis=1) \
|
||||||
table.data_append(np.abs(np.sum(c_direction*rotForce,axis=1) * np.sum(c_normal*rotNormal,axis=1)))
|
* np.sum(slip_normal * (o.quaternion * normal),axis=1)))
|
||||||
outputAlive = table.data_write() # output processed line
|
outputAlive = table.data_write() # output processed line
|
||||||
|
|
||||||
# ------------------------------------------ output finalization -----------------------------------
|
# ------------------------------------------ output finalization -----------------------------------
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
@ -94,11 +94,9 @@ for name in filenames:
|
||||||
|
|
||||||
if (any(options.grid) == 0 or any(options.size) == 0.0):
|
if (any(options.grid) == 0 or any(options.size) == 0.0):
|
||||||
grid,size = damask.util.coordGridAndSize(table.data[:,table.label_indexrange(options.pos)])
|
grid,size = damask.util.coordGridAndSize(table.data[:,table.label_indexrange(options.pos)])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
grid = np.array(options.grid,'i')
|
grid = np.array(options.grid,'i')
|
||||||
size = np.array(options.size,'d')
|
size = np.array(options.size,'d')
|
||||||
origin = np.zeros(3,'d')
|
|
||||||
|
|
||||||
packing = np.where(grid == 1,1,packing) # reset packing to 1 where grid==1
|
packing = np.where(grid == 1,1,packing) # reset packing to 1 where grid==1
|
||||||
shift = np.where(grid == 1,0,shift) # reset shift to 0 where grid==1
|
shift = np.where(grid == 1,0,shift) # reset shift to 0 where grid==1
|
||||||
|
@ -113,7 +111,7 @@ for name in filenames:
|
||||||
-shift[2],axis = 2),
|
-shift[2],axis = 2),
|
||||||
size = list(packing) + [1],
|
size = list(packing) + [1],
|
||||||
mode = 'wrap',
|
mode = 'wrap',
|
||||||
origin = list(-(packing/2)) + [0])\
|
origin = list(-(packing//2)) + [0])\
|
||||||
[::packing[0],::packing[1],::packing[2],:].reshape((packedGrid.prod(),table.data.shape[1]),order = 'F')
|
[::packing[0],::packing[1],::packing[2],:].reshape((packedGrid.prod(),table.data.shape[1]),order = 'F')
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,15 +119,15 @@ for name in filenames:
|
||||||
|
|
||||||
#--- generate grid --------------------------------------------------------------------------------
|
#--- generate grid --------------------------------------------------------------------------------
|
||||||
|
|
||||||
x = (0.5 + shift[0] + np.arange(packedGrid[0],dtype=float))/packedGrid[0]*size[0] + origin[0]
|
x = (0.5 + shift[0] + np.arange(packedGrid[0],dtype=float))/packedGrid[0]*size[0]
|
||||||
y = (0.5 + shift[1] + np.arange(packedGrid[1],dtype=float))/packedGrid[1]*size[1] + origin[1]
|
y = (0.5 + shift[1] + np.arange(packedGrid[1],dtype=float))/packedGrid[1]*size[1]
|
||||||
z = (0.5 + shift[2] + np.arange(packedGrid[2],dtype=float))/packedGrid[2]*size[2] + origin[2]
|
z = (0.5 + shift[2] + np.arange(packedGrid[2],dtype=float))/packedGrid[2]*size[2]
|
||||||
|
|
||||||
xx = np.tile( x, packedGrid[1]* packedGrid[2])
|
xx = np.tile( x, packedGrid[1]* packedGrid[2])
|
||||||
yy = np.tile(np.repeat(y,packedGrid[0] ),packedGrid[2])
|
yy = np.tile(np.repeat(y,packedGrid[0] ),packedGrid[2])
|
||||||
zz = np.repeat(z,packedGrid[0]*packedGrid[1])
|
zz = np.repeat(z,packedGrid[0]*packedGrid[1])
|
||||||
|
|
||||||
table.data[:,table.label_indexragen(options.pos)] = np.squeeze(np.dstack((xx,yy,zz)))
|
table.data[:,table.label_indexrange(options.pos)] = np.squeeze(np.dstack((xx,yy,zz)))
|
||||||
|
|
||||||
# ------------------------------------------ output result -----------------------------------------
|
# ------------------------------------------ output result -----------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,re,sys,fnmatch
|
import os,re,sys,fnmatch
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import sys,os
|
import sys,os
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math,re,time,struct
|
import os,sys,math,re,time,struct
|
||||||
|
@ -135,7 +135,7 @@ class MPIEspectral_result: # mimic py_post result object
|
||||||
if self.N_element_scalars is None:
|
if self.N_element_scalars is None:
|
||||||
self.N_element_scalars = self._keyedPackedArray('materialpoint_sizeResults',count=1,type='i')[0]
|
self.N_element_scalars = self._keyedPackedArray('materialpoint_sizeResults',count=1,type='i')[0]
|
||||||
|
|
||||||
self.N_positions = (self.filesize-self.dataOffset)/(self.N_elements*self.N_element_scalars*8)
|
self.N_positions = (self.filesize-self.dataOffset)//(self.N_elements*self.N_element_scalars*8)
|
||||||
self.N_increments = 1 # add zero'th entry
|
self.N_increments = 1 # add zero'th entry
|
||||||
for i in range(self.N_loadcases):
|
for i in range(self.N_loadcases):
|
||||||
self.N_increments += self._increments[i]//self._frequencies[i]
|
self.N_increments += self._increments[i]//self._frequencies[i]
|
||||||
|
@ -244,9 +244,9 @@ class MPIEspectral_result: # mimic py_post result object
|
||||||
a = self.grid[0]+1
|
a = self.grid[0]+1
|
||||||
b = self.grid[1]+1
|
b = self.grid[1]+1
|
||||||
c = self.grid[2]+1
|
c = self.grid[2]+1
|
||||||
return vector([self.size[0] * (n%a) / self.grid[0],
|
return vector([self.size[0] * (n%a) / self.grid[0],
|
||||||
self.size[1] * ((n/a)%b) / self.grid[1],
|
self.size[1] * ((n//a)%b) / self.grid[1],
|
||||||
self.size[2] * ((n/a/b)%c) / self.grid[2],
|
self.size[2] * ((n//a//b)%c) / self.grid[2],
|
||||||
])
|
])
|
||||||
|
|
||||||
def element_sequence(self,e):
|
def element_sequence(self,e):
|
||||||
|
@ -258,7 +258,7 @@ class MPIEspectral_result: # mimic py_post result object
|
||||||
def element(self,e):
|
def element(self,e):
|
||||||
a = self.grid[0]+1
|
a = self.grid[0]+1
|
||||||
b = self.grid[1]+1
|
b = self.grid[1]+1
|
||||||
basenode = 1 + e+e/self.grid[0] + e/self.grid[0]/self.grid[1]*a
|
basenode = 1 + e+e//self.grid[0] + e//self.grid[0]//self.grid[1]*a
|
||||||
basenode2 = basenode+a*b
|
basenode2 = basenode+a*b
|
||||||
return (element([basenode ,basenode +1,basenode +a+1,basenode +a,
|
return (element([basenode ,basenode +1,basenode +a+1,basenode +a,
|
||||||
basenode2 ,basenode2+1,basenode2+a+1,basenode2+a,
|
basenode2 ,basenode2+1,basenode2+a+1,basenode2+a,
|
||||||
|
@ -434,17 +434,17 @@ def mapIncremental(label, mapping, N, base, new):
|
||||||
'unique': lambda n,b,a: a if n==0 or b==a else 'nan'
|
'unique': lambda n,b,a: a if n==0 or b==a else 'nan'
|
||||||
}
|
}
|
||||||
if mapping in theMap:
|
if mapping in theMap:
|
||||||
mapped = map(theMap[mapping],[N]*len(base),base,new) # map one of the standard functions to data
|
mapped = list(map(theMap[mapping],[N for i in range(len(base))],base,new)) # map one of the standard functions to data
|
||||||
if label.lower() == 'orientation': # orientation is special case:...
|
if label.lower() == 'orientation': # orientation is special case:...
|
||||||
orientationNorm = math.sqrt(sum([q*q for q in mapped])) # ...calc norm of average quaternion
|
orientationNorm = math.sqrt(sum([q*q for q in mapped])) # ...calc norm of average quaternion
|
||||||
mapped = map(lambda x: x/orientationNorm, mapped) # ...renormalize quaternion
|
mapped = list(map(lambda x: x/orientationNorm, mapped)) # ...renormalize quaternion
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
mapped = eval('map(%s,[N]*len(base),base,new)'%mapping) # map user defined function to colums in chunks
|
mapped = list(eval('map(%s,[N for i in range(len(base))],base,new)'%mapping)) # map user defined function to colums in chunks
|
||||||
except:
|
except:
|
||||||
mapped = ['nan']*len(base)
|
mapped = ['nan' for i in range(len(base))]
|
||||||
|
|
||||||
return mapped
|
return list(mapped)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -674,6 +674,9 @@ parser.add_option('-p','--type', dest='filetype',
|
||||||
parser.add_option('-q','--quiet', dest='verbose',
|
parser.add_option('-q','--quiet', dest='verbose',
|
||||||
action = 'store_false',
|
action = 'store_false',
|
||||||
help = 'suppress verbose output')
|
help = 'suppress verbose output')
|
||||||
|
parser.add_option('--verbose', dest='verbose',
|
||||||
|
action = 'store_true',
|
||||||
|
help = 'enable verbose output')
|
||||||
|
|
||||||
group_material = OptionGroup(parser,'Material identifier')
|
group_material = OptionGroup(parser,'Material identifier')
|
||||||
|
|
||||||
|
@ -715,7 +718,7 @@ parser.add_option_group(group_general)
|
||||||
parser.add_option_group(group_special)
|
parser.add_option_group(group_special)
|
||||||
|
|
||||||
parser.set_defaults(info = False,
|
parser.set_defaults(info = False,
|
||||||
verbose = True,
|
verbose = False,
|
||||||
legacy = False,
|
legacy = False,
|
||||||
nodal = False,
|
nodal = False,
|
||||||
prefix = '',
|
prefix = '',
|
||||||
|
@ -1164,14 +1167,12 @@ for incCount,position in enumerate(locations): # walk through locations
|
||||||
file.write('\t'.join(standard + header) + '\n')
|
file.write('\t'.join(standard + header) + '\n')
|
||||||
headerWritten = True
|
headerWritten = True
|
||||||
|
|
||||||
file.write('\t'.join(map(str,[p.increment] + \
|
file.write('\t'.join(list(map(str,[p.increment] + \
|
||||||
{True:[p.time],False:[]}[options.time] + \
|
{True:[p.time],False:[]}[options.time] + \
|
||||||
group[0] + \
|
group[0] + \
|
||||||
mappedResult)
|
mappedResult)
|
||||||
) + '\n')
|
)) + '\n')
|
||||||
|
|
||||||
if fileOpen:
|
if fileOpen:
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
|
||||||
# --------------------------- DONE --------------------------------
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,re
|
import os,sys,re
|
||||||
|
@ -66,7 +66,7 @@ for name in filenames:
|
||||||
for i,index in enumerate(indices):
|
for i,index in enumerate(indices):
|
||||||
if index == -1: remarks.append('label "{}" not present...'.format(options.label[i]))
|
if index == -1: remarks.append('label "{}" not present...'.format(options.label[i]))
|
||||||
else:
|
else:
|
||||||
m = pattern[dimensions[i]>1].match(table.tags[index]) # isolate label name
|
m = pattern[int(dimensions[i]>1)].match(table.tags[index]) # isolate label name
|
||||||
for j in range(dimensions[i]):
|
for j in range(dimensions[i]):
|
||||||
table.tags[index+j] = table.tags[index+j].replace(m.group(2),options.substitute[i]) # replace name with substitute
|
table.tags[index+j] = table.tags[index+j].replace(m.group(2),options.substitute[i]) # replace name with substitute
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue