2017-05-15 21:10:49 +05:30
|
|
|
# sets up an environment for DAMASK on tcsh
|
|
|
|
# usage: source DAMASK_env.csh
|
|
|
|
|
|
|
|
set CALLED=($_)
|
2020-01-14 03:56:40 +05:30
|
|
|
set ENV_ROOT=`dirname $CALLED[2]`
|
|
|
|
set DAMASK_ROOT=`python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $ENV_ROOT"/../"`
|
2017-05-17 12:23:37 +05:30
|
|
|
|
2020-01-14 03:56:40 +05:30
|
|
|
source $ENV_ROOT/CONFIG
|
2017-05-15 21:10:49 +05:30
|
|
|
|
2019-04-25 11:30:09 +05:30
|
|
|
set path = ($DAMASK_ROOT/bin $path)
|
2017-05-15 21:10:49 +05:30
|
|
|
|
|
|
|
set SOLVER=`which DAMASK_spectral`
|
|
|
|
if ( "x$DAMASK_NUM_THREADS" == "x" ) then
|
|
|
|
set DAMASK_NUM_THREADS=1
|
|
|
|
endif
|
|
|
|
|
2019-12-21 11:43:13 +05:30
|
|
|
# currently, there is no information that unlimited stack size causes problems
|
2018-08-04 18:05:57 +05:30
|
|
|
# still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it
|
|
|
|
# more info https://jblevins.org/log/segfault
|
|
|
|
# https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap
|
2019-12-22 12:13:07 +05:30
|
|
|
# http://superuser.com/questions/220059/what-parameters-has-ulimit
|
2017-07-12 16:20:59 +05:30
|
|
|
limit stacksize unlimited # maximum stack size (kB)
|
2017-05-15 21:10:49 +05:30
|
|
|
|
|
|
|
# disable output in case of scp
|
|
|
|
if ( $?prompt ) then
|
|
|
|
echo ''
|
|
|
|
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
|
|
|
|
echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf
|
|
|
|
echo https://damask.mpie.de
|
|
|
|
echo
|
|
|
|
echo Using environment with ...
|
2019-12-21 11:59:01 +05:30
|
|
|
echo "DAMASK $DAMASK_ROOT"
|
2019-12-21 11:43:13 +05:30
|
|
|
echo "Grid Solver $SOLVER"
|
2017-05-15 21:10:49 +05:30
|
|
|
if ( $?PETSC_DIR) then
|
|
|
|
echo "PETSc location $PETSC_DIR"
|
|
|
|
endif
|
|
|
|
if ( $?MSC_ROOT) then
|
|
|
|
echo "MSC.Marc/Mentat $MSC_ROOT"
|
|
|
|
endif
|
|
|
|
echo
|
2018-11-30 21:05:01 +05:30
|
|
|
echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
|
2017-05-15 21:10:49 +05:30
|
|
|
echo `limit datasize`
|
|
|
|
echo `limit stacksize`
|
2018-11-30 21:05:01 +05:30
|
|
|
echo
|
2017-05-15 21:10:49 +05:30
|
|
|
endif
|
|
|
|
|
|
|
|
setenv DAMASK_NUM_THREADS $DAMASK_NUM_THREADS
|
2017-05-17 12:23:37 +05:30
|
|
|
if ( ! $?PYTHONPATH ) then
|
2019-01-05 15:22:39 +05:30
|
|
|
setenv PYTHONPATH $DAMASK_ROOT/python
|
2017-05-17 12:23:37 +05:30
|
|
|
else
|
2019-01-05 15:22:39 +05:30
|
|
|
setenv PYTHONPATH $DAMASK_ROOT/python:$PYTHONPATH
|
2017-05-17 12:23:37 +05:30
|
|
|
endif
|
2020-01-14 03:56:40 +05:30
|
|
|
setenv MSC_ROOT
|
|
|
|
setenv MARC_VERSION
|