Merged branch development into development

This commit is contained in:
Philip Eisenlohr 2016-12-23 17:46:30 -05:00
commit 52964fed3d
9 changed files with 108 additions and 20 deletions

View File

@ -240,7 +240,7 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
real(pReal), dimension(6) :: stress
real(pReal), dimension(6,6) :: ddsdde
integer(pInt) :: computationMode, i, cp_en, node, CPnodeID
!$ integer :: defaultNumThreadsInt !< default value set by Marc
!$ integer(4) :: defaultNumThreadsInt !< default value set by Marc
if (iand(debug_level(debug_MARC),debug_LEVELBASIC) /= 0_pInt) then
write(6,'(a,/,i8,i8,i2)') ' MSC.MARC information on shape of element(2), IP:', m, nn

View File

@ -28,7 +28,7 @@ module numerics
fixedSeed = 0_pInt, & !< fixed seeding for pseudo-random number generator, Default 0: use random seed
worldrank = 0_pInt, & !< MPI worldrank (/=0 for MPI simulations only)
worldsize = 0_pInt !< MPI worldsize (/=0 for MPI simulations only)
integer, protected, public :: &
integer(4), protected, public :: &
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
integer(pInt), public :: &
numerics_integrationMode = 0_pInt !< integrationMode 1 = central solution; integrationMode 2 = perturbation, Default 0: undefined, is not read from file
@ -210,7 +210,6 @@ subroutine numerics_init
IO_warning, &
IO_timeStamp, &
IO_EOF
#if defined(Spectral) || defined(FEM)
!$ use OMP_LIB, only: omp_set_num_threads ! Use the standard conforming module file for omp if using the spectral solver
implicit none
@ -242,10 +241,10 @@ subroutine numerics_init
!$ call GET_ENVIRONMENT_VARIABLE(NAME='DAMASK_NUM_THREADS',VALUE=DAMASK_NumThreadsString,STATUS=gotDAMASK_NUM_THREADS) ! get environment variable DAMASK_NUM_THREADS...
!$ if(gotDAMASK_NUM_THREADS /= 0) then ! could not get number of threads, set it to 1
!$ call IO_warning(35_pInt,ext_msg='BEGIN:'//DAMASK_NumThreadsString//':END')
!$ DAMASK_NumThreadsInt = 1
!$ DAMASK_NumThreadsInt = 1_4
!$ else
!$ read(DAMASK_NumThreadsString,'(i6)') DAMASK_NumThreadsInt ! read as integer
!$ if (DAMASK_NumThreadsInt < 1) DAMASK_NumThreadsInt = 1 ! in case of string conversion fails, set it to one
!$ if (DAMASK_NumThreadsInt < 1_4) DAMASK_NumThreadsInt = 1_4 ! in case of string conversion fails, set it to one
!$ endif
!$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution

View File

@ -471,21 +471,14 @@ FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/comm
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
HIT=0
for arg in "$@"
do
if [ $HIT = 1 ]
then
DAMASKPATH=`dirname $arg`
break
elif [ ${arg:0:2} = -u -o ${arg:0:2} = -U ]
then
HIT=1
fi
done
read DAMASKVERSION < $DAMASKPATH/../VERSION
DAMASKVERSION="'"$DAMASKVERSION"'"
# determine DAMASK version
if test -n "$DAMASK_USER"; then
DAMASK_ROOT=`dirname $DAMASK_USER`/..
read DAMASKVERSION < $DAMASK_ROOT/VERSION
DAMASKVERSION="'"$DAMASKVERSION"'"
else
DAMASKVERSION='NA'
fi
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
DFORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \

View File

@ -299,7 +299,23 @@ fi
. "$DIR/getarch"
# getting user subroutine file name
found=0
for i in "$@"; do
if test $found = 1; then
DAMASK_USER=$i
found=0
fi
case $i in
-u* | -U*)
found=1
;;
esac
done
# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
#
#

View File

@ -299,7 +299,23 @@ fi
. "$DIR/getarch"
# getting user subroutine file name
found=0
for i in "$@"; do
if test $found = 1; then
DAMASK_USER=$i
found=0
fi
case $i in
-u* | -U*)
found=1
;;
esac
done
# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
#
#

View File

@ -299,7 +299,23 @@ fi
. "$DIR/getarch"
# getting user subroutine file name
found=0
for i in "$@"; do
if test $found = 1; then
DAMASK_USER=$i
found=0
fi
case $i in
-u* | -U*)
found=1
;;
esac
done
# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
#
#

View File

@ -299,7 +299,23 @@ fi
. "$DIR/getarch"
# getting user subroutine file name
found=0
for i in "$@"; do
if test $found = 1; then
DAMASK_USER=$i
found=0
fi
case $i in
-u* | -U*)
found=1
;;
esac
done
# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
#
#

View File

@ -299,7 +299,23 @@ fi
. "$DIR/getarch"
# getting user subroutine file name
found=0
for i in "$@"; do
if test $found = 1; then
DAMASK_USER=$i
found=0
fi
case $i in
-u* | -U*)
found=1
;;
esac
done
# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
#
#

View File

@ -299,7 +299,23 @@ fi
. "$DIR/getarch"
# getting user subroutine file name
found=0
for i in "$@"; do
if test $found = 1; then
DAMASK_USER=$i
found=0
fi
case $i in
-u* | -U*)
found=1
;;
esac
done
# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
#
#