Merge branch 'development' of magit1.mpie.de:damask/DAMASK into development

This commit is contained in:
Martin Diehl 2016-11-11 06:44:57 +01:00
commit f88f2cd16a
249 changed files with 5101 additions and 108470 deletions

View File

@ -25,11 +25,11 @@ endif
# this seems to make sense for the stack size
if ( `which free` != "free: Command not found." ) then
set freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'`
set stack=`expr $freeMem / $DAMASK_NUM_THREADS / 2`
set heap=` expr $freeMem / 2`
set stack=`expr $freeMem / $DAMASK_NUM_THREADS / 2`
# http://superuser.com/questions/220059/what-parameters-has-ulimit
limit stacksize $stack # maximum stack size (kB)
limit datasize $heap # maximum heap size (kB)
limit stacksize $stack # maximum stack size (kB)
endif
if ( `limit | grep memoryuse` != "" ) then
limit memoryuse unlimited # maximum physical memory size
@ -53,9 +53,6 @@ if ( $?prompt ) then
if ( $?PETSC_DIR) then
echo "PETSc location $PETSC_DIR"
endif
if ( $?PETSC_ARCH) then
echo "PETSc architecture $PETSC_ARCH"
endif
if ( $?MSC_ROOT) then
echo "MSC.Marc/Mentat $MSC_ROOT"
endif

View File

@ -40,8 +40,8 @@ FREE=$(which free 2>/dev/null)
if [ "x$FREE" != "x" ]; then
freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}')
# http://superuser.com/questions/220059/what-parameters-has-ulimit
ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB)
ulimit -d $(expr $freeMem / 2) 2>/dev/null # maximum heap size (kB)
ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB)
fi
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
ulimit -m unlimited 2>/dev/null # maximum physical memory size
@ -63,8 +63,6 @@ if [ ! -z "$PS1" ]; then
[[ $(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") == $PETSC_DIR ]] \
|| echo " ~~> "$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR")
fi
[[ "x$PETSC_ARCH" == "x" ]] \
|| echo "PETSc architecture $PETSC_ARCH"
echo "MSC.Marc/Mentat $MSC_ROOT"
echo
echo -n "heap size "

View File

@ -1,74 +1,87 @@
# sets up an environment for DAMASK on bash
# usage: source DAMASK_env.sh
# sets up an environment for DAMASK on zsh
# usage: source DAMASK_env.zsh
if [ "$OSTYPE" = "linux-gnu" ] || [ "$OSTYPE" = 'linux' ]; then
DAMASK_ROOT=$(readlink -f "`dirname ${(%):-%N}`")
else
print 'Not done yet'
fi
DAMASK_ROOT=${0:a:h}
[[ -f $HOME/.damask/damask.conf ]] && source $HOME/.damask/damask.conf || source /etc/damask.conf
# defining set() allows to source the same file for tcsh and zsh, with and without space around =
set() {
export $1$2$3
}
source $DAMASK_ROOT/CONFIG
unset -f set
# if DAMASK_BIN is present and not in $PATH, add it
#if [[ [[ "x$DAMASK_BIN" != "x" ]] && ! `echo ":$PATH:" | grep $DAMASK_BIN:` ]]; then
# add DAMASK_BIN if present but not yet in $PATH
MATCH=`echo ":$PATH:" | grep $DAMASK_BIN:`
if [[ ( "x$DAMASK_BIN" != "x" ) && ( "x$MATCH" = "x" ) ]]; then
export PATH=$DAMASK_BIN:$PATH
#fi
fi
SOLVER=`which DAMASK_spectral 2>/dev/null`
if [ "x$SOLVER" = "x" ]; then
export SOLVER='Not found!'
fi
PROCESSING=`which postResults 2>/dev/null`
if [ "x$PROCESSING" = "x" ]; then
export PROCESSING='Not found!'
if [ "x$DAMASK_NUM_THREADS" = "x" ]; then
DAMASK_NUM_THREADS=1
fi
# according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size
#FREE=`which free 2>/dev/null`
#if [ "x$FREE" != "x" ]; then
# freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'`
# heap=`expr $freeMem / 2`
# stack=`expr $freeMem / 2`
#
# # http://superuser.com/questions/220059/what-parameters-has-ulimit
# ulimit -s $stack 2>/dev/null # maximum stack size (kB)
# ulimit -d $heap 2>/dev/null # maximum heap size (kB)
#fi
#ulimit -c 2000 2>/dev/null # core file size (512-byte blocks)
#ulimit -v unlimited 2>/dev/null # maximum virtual memory size
if [ "`which free 2>/dev/null`" != "free not found" ]; then
freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'`
# http://superuser.com/questions/220059/what-parameters-has-ulimit
#ulimit -d `expr $freeMem / 2` 2>/dev/null # maximum heap size (kB)
ulimit -s `expr $freeMem / $DAMASK_NUM_THREADS / 2` 2>/dev/null # maximum stack size (kB)
fi
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
ulimit -m unlimited 2>/dev/null # maximum physical memory size
# disable output in case of scp
if [ ! -z "$PS1" ]; then
echo
echo Düsseldorf Advanced Materials Simulation Kit - DAMASK
echo Max-Planck-Institut für Eisenforschung, Düsseldorf
echo http://damask.mpie.de
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 ...
echo "Using environment with ..."
echo "DAMASK $DAMASK_ROOT"
[[ "x$SOLVER" != "x" ]] && echo "Spectral Solver $SOLVER"
[[ "x$PROCESSING" != "x" ]] && echo "Post Processing $PROCESSING"
echo "Spectral Solver $SOLVER"
echo "Post Processing $PROCESSING"
echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
if [ "x$PETSC_DIR" != "x" ]; then
echo "PETSc location $PETSC_DIR"
[[ `readlink -f $PETSC_DIR` == $PETSC_DIR ]] || echo " ~~> "`readlink -f $PETSC_DIR`
[[ $(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") == $PETSC_DIR ]] \
|| echo " ~~> "$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR")
fi
[[ "x$PETSC_ARCH" != "x" ]] && echo "PETSc architecture $PETSC_ARCH"
[[ "x$PETSC_ARCH" == "x" ]] \
|| echo "PETSc architecture $PETSC_ARCH"
echo "MSC.Marc/Mentat $MSC_ROOT"
echo
echo -n "heap size/MiB "; echo "`ulimit -d`/1024" | bc
echo -n "stack size/MiB "; echo "`ulimit -s`/1024" | bc
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -d) )); \
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]))")
echo -n "stack size "
[[ "$(ulimit -s)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -s) )); \
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]))")
fi
export DAMASK_NUM_THREADS
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
for var in BASE STAT SOLVER PROCESSING FREE; do
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN MATCH; do
unset "${var}"
done
for var in DAMASK IMKL ACML LAPACK MSC FFTW HDF5; do
for var in DAMASK MSC; do
unset "${var}_ROOT"
done
for var in ABAQUS MARC; do
unset "${var}_VERSION"
done

View File

@ -1 +1 @@
v2.0.1-150-g5345b42
v2.0.1-306-g2d0193e

View File

@ -10,7 +10,6 @@ module CPFEM
implicit none
private
#if defined(Marc4DAMASK) || defined(Abaqus)
real(pReal), parameter, private :: &
CPFEM_odd_stress = 1e15_pReal, & !< return value for stress in case of ping pong dummy cycle
CPFEM_odd_jacobian = 1e50_pReal !< return value for jacobian in case of ping pong dummy cycle
@ -20,7 +19,6 @@ module CPFEM
CPFEM_dcsdE !< Cauchy stress tangent
real(pReal), dimension (:,:,:,:), allocatable, private :: &
CPFEM_dcsdE_knownGood !< known good tangent
#endif
integer(pInt), public :: &
cycleCounter = 0_pInt, & !< needs description
theInc = -1_pInt, & !< needs description
@ -83,10 +81,6 @@ subroutine CPFEM_initAll(el,ip)
use IO, only: &
IO_init
use DAMASK_interface
#ifdef FEM
use FEZoo, only: &
FEZoo_init
#endif
implicit none
integer(pInt), intent(in) :: el, & !< FE el number
@ -97,9 +91,6 @@ subroutine CPFEM_initAll(el,ip)
call DAMASK_interface_init ! Spectral and FEM interface to commandline
call prec_init
call IO_init
#ifdef FEM
call FEZoo_init
#endif
call numerics_init
call debug_init
call math_init
@ -138,16 +129,12 @@ subroutine CPFEM_init
debug_levelBasic, &
debug_levelExtensive
use FEsolving, only: &
#if defined(Marc4DAMASK) || defined(Abaqus)
symmetricSolver, &
#endif
restartRead, &
modelName
#if defined(Marc4DAMASK) || defined(Abaqus)
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
#endif
use material, only: &
material_phase, &
homogState, &
@ -173,12 +160,10 @@ subroutine CPFEM_init
#include "compilation_info.f90"
endif mainProcess
#if defined(Marc4DAMASK) || defined(Abaqus)
! initialize stress and jacobian to zero
allocate(CPFEM_cs(6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_cs = 0.0_pReal
allocate(CPFEM_dcsdE(6,6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_dcsdE = 0.0_pReal
allocate(CPFEM_dcsdE_knownGood(6,6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_dcsdE_knownGood = 0.0_pReal
#endif
! *** restore the last converged values of each essential variable from the binary file
if (restartRead) then
@ -243,21 +228,17 @@ subroutine CPFEM_init
enddo readHomogInstances
close (777)
#if defined(Marc4DAMASK) || defined(Abaqus)
call IO_read_realFile(777,'convergeddcsdE',modelName,size(CPFEM_dcsdE))
read (777,rec=1) CPFEM_dcsdE
close (777)
#endif
restartRead = .false.
endif
#if defined(Marc4DAMASK) || defined(Abaqus)
if (iand(debug_level(debug_CPFEM), debug_levelBasic) /= 0) then
write(6,'(a32,1x,6(i8,1x))') 'CPFEM_cs: ', shape(CPFEM_cs)
write(6,'(a32,1x,6(i8,1x))') 'CPFEM_dcsdE: ', shape(CPFEM_dcsdE)
write(6,'(a32,1x,6(i8,1x),/)') 'CPFEM_dcsdE_knownGood: ', shape(CPFEM_dcsdE_knownGood)
write(6,'(a32,l1)') 'symmetricSolver: ', symmetricSolver
endif
#endif
flush(6)
end subroutine CPFEM_init
@ -266,11 +247,7 @@ end subroutine CPFEM_init
!--------------------------------------------------------------------------------------------------
!> @brief perform initialization at first call, update variables and call the actual material model
!--------------------------------------------------------------------------------------------------
#if defined(Marc4DAMASK) || defined(Abaqus)
subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyStress, jacobian)
#else
subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
#endif
use numerics, only: &
defgradTolerance, &
iJacoStiffness, &
@ -281,7 +258,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
debug_levelBasic, &
debug_levelExtensive, &
debug_levelSelective, &
#if defined(Marc4DAMASK) || defined(Abaqus)
debug_stressMaxLocation, &
debug_stressMinLocation, &
debug_jacobianMaxLocation, &
@ -290,7 +266,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
debug_stressMin, &
debug_jacobianMax, &
debug_jacobianMin, &
#endif
debug_e, &
debug_i
use FEsolving, only: &
@ -348,12 +323,10 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
use homogenization, only: &
materialpoint_F, &
materialpoint_F0, &
#if defined(Marc4DAMASK) || defined(Abaqus)
materialpoint_P, &
materialpoint_dPdF, &
materialpoint_results, &
materialpoint_sizeResults, &
#endif
materialpoint_stressAndItsTangent, &
materialpoint_postResults
use IO, only: &
@ -368,7 +341,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
real(pReal), dimension (3,3), intent(in) :: ffn, & !< deformation gradient for t=t0
ffn1 !< deformation gradient for t=t1
integer(pInt), intent(in) :: mode !< computation mode 1: regular computation plus aging of results
#if defined(Marc4DAMASK) || defined(Abaqus)
real(pReal), intent(in) :: temperature_inp !< temperature
logical, intent(in) :: parallelExecution !< flag indicating parallel computation of requested IPs
real(pReal), dimension(6), intent(out) :: cauchyStress !< stress vector in Mandel notation
@ -381,20 +353,13 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
real(pReal), dimension (3,3,3,3) :: H_sym, &
H, &
jacobian3333 ! jacobian in Matrix notation
#else
logical, parameter :: parallelExecution = .true.
#endif
integer(pInt) elCP, & ! crystal plasticity element number
i, j, k, l, m, n, ph, homog, mySource
logical updateJaco ! flag indicating if JAcobian has to be updated
character(len=1024) :: rankStr
#if defined(Marc4DAMASK) || defined(Abaqus)
elCP = mesh_FEasCP('elem',elFE)
#else
elCP = elFE
#endif
if (iand(debug_level(debug_CPFEM), debug_levelBasic) /= 0_pInt &
.and. elCP == debug_e .and. ip == debug_i) then
@ -411,13 +376,10 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
write(6,'(a,/)') '#############################################'; flush (6)
endif
#if defined(Marc4DAMASK) || defined(Abaqus)
if (iand(mode, CPFEM_BACKUPJACOBIAN) /= 0_pInt) &
CPFEM_dcsde_knownGood = CPFEM_dcsde
if (iand(mode, CPFEM_RESTOREJACOBIAN) /= 0_pInt) &
CPFEM_dcsde = CPFEM_dcsde_knownGood
#endif
!*** age results and write restart data if requested
if (iand(mode, CPFEM_AGERESULTS) /= 0_pInt) then
@ -514,11 +476,9 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
enddo writeHomogInstances
close (777)
#if defined(Marc4DAMASK) || defined(Abaqus)
call IO_write_jobRealFile(777,'convergeddcsdE',size(CPFEM_dcsdE))
write (777,rec=1) CPFEM_dcsdE
close (777)
#endif
endif
endif ! results aging
@ -529,22 +489,18 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
!* If no parallel execution is required, there is no need to collect FEM input
if (.not. parallelExecution) then
#if defined(Marc4DAMASK) || defined(Abaqus)
temperature(material_homog(ip,elCP))%p(thermalMapping(material_homog(ip,elCP))%p(ip,elCP)) = &
temperature_inp
#endif
materialpoint_F0(1:3,1:3,ip,elCP) = ffn
materialpoint_F(1:3,1:3,ip,elCP) = ffn1
elseif (iand(mode, CPFEM_COLLECT) /= 0_pInt) then
#if defined(Marc4DAMASK) || defined(Abaqus)
call random_number(rnd)
if (rnd < 0.5_pReal) rnd = rnd - 1.0_pReal
CPFEM_cs(1:6,ip,elCP) = rnd * CPFEM_odd_stress
CPFEM_dcsde(1:6,1:6,ip,elCP) = CPFEM_odd_jacobian * math_identity2nd(6)
temperature(material_homog(ip,elCP))%p(thermalMapping(material_homog(ip,elCP))%p(ip,elCP)) = &
temperature_inp
#endif
materialpoint_F0(1:3,1:3,ip,elCP) = ffn
materialpoint_F(1:3,1:3,ip,elCP) = ffn1
CPFEM_calc_done = .false.
@ -569,12 +525,10 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
endif
outdatedFFN1 = .true.
endif
#if defined(Marc4DAMASK) || defined(Abaqus)
call random_number(rnd)
if (rnd < 0.5_pReal) rnd = rnd - 1.0_pReal
CPFEM_cs(1:6,ip,elCP) = rnd*CPFEM_odd_stress
CPFEM_dcsde(1:6,1:6,ip,elCP) = CPFEM_odd_jacobian*math_identity2nd(6)
#endif
!*** deformation gradient is not outdated
@ -607,7 +561,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
endif
!* map stress and stiffness (or return odd values if terminally ill)
#if defined(Marc4DAMASK) || defined(Abaqus)
terminalIllness: if ( terminallyIll ) then
call random_number(rnd)
@ -648,11 +601,8 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
CPFEM_dcsde(1:6,1:6,ip,elCP) = math_Mandel3333to66(J_inverse * H_sym)
endif terminalIllness
#endif
endif validCalculation
#if defined(Marc4DAMASK) || defined(Abaqus)
!* report stress and stiffness
if ((iand(debug_level(debug_CPFEM), debug_levelExtensive) /= 0_pInt) &
.and. ((debug_e == elCP .and. debug_i == ip) &
@ -663,11 +613,9 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
'<< CPFEM >> Jacobian/GPa at elFE ip ', elFE, ip, transpose(CPFEM_dcsdE(1:6,1:6,ip,elCP))*1.0e-9_pReal
flush(6)
endif
#endif
endif
#if defined(Marc4DAMASK) || defined(Abaqus)
!*** warn if stiffness close to zero
if (all(abs(CPFEM_dcsdE(1:6,1:6,ip,elCP)) < 1e-10_pReal)) call IO_warning(601,elCP,ip)
@ -696,7 +644,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
debug_jacobianMinLocation = [elCP, ip]
debug_jacobianMin = minval(jacobian3333)
endif
#endif
end subroutine CPFEM_general

View File

@ -116,7 +116,6 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
CPFEM_CALCRESULTS, &
CPFEM_AGERESULTS, &
CPFEM_COLLECT, &
CPFEM_RESTOREJACOBIAN, &
CPFEM_BACKUPJACOBIAN, &
cycleCounter, &
theInc, &

View File

@ -244,13 +244,13 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
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
write(6,'(a,2(1i))'), ' Jacobian: ', ngens,ngens
write(6,'(a,1i)'), ' Direct stress: ', ndi
write(6,'(a,1i)'), ' Shear stress: ', nshear
write(6,'(a,1i)'), ' DoF: ', ndeg
write(6,'(a,1i)'), ' Coordinates: ', ncrd
write(6,'(a,1i)'), ' Nodes: ', nnode
write(6,'(a,1i)'), ' Deformation gradient: ', itel
write(6,'(a,2(i1))') ' Jacobian: ', ngens,ngens
write(6,'(a,i1)') ' Direct stress: ', ndi
write(6,'(a,i1)') ' Shear stress: ', nshear
write(6,'(a,i2)') ' DoF: ', ndeg
write(6,'(a,i2)') ' Coordinates: ', ncrd
write(6,'(a,i12)') ' Nodes: ', nnode
write(6,'(a,i1)') ' Deformation gradient: ', itel
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' Deformation gradient at t=n:', &
math_transpose33(ffn)
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' Deformation gradient at t=n+1:', &
@ -421,4 +421,4 @@ subroutine plotv(v,s,sp,etot,eplas,ecreep,t,m,nn,layer,ndi,nshear,jpltcd)
if (jpltcd > materialpoint_sizeResults) call IO_error(700_pInt,jpltcd) ! complain about out of bounds error
v = materialpoint_results(jpltcd,nn,mesh_FEasCP('elem', m))
end subroutine plotv
end subroutine plotv

View File

@ -192,7 +192,7 @@ program DAMASK_spectral
if ((N_def /= N_n) .or. (N_n /= N_t) .or. N_n < 1_pInt) & ! sanity check
call IO_error(error_ID=837_pInt,ext_msg = trim(loadCaseFile)) ! error message for incomplete loadcase
allocate (loadCases(N_n)) ! array of load cases
loadCases%P%myType='p'
loadCases%stress%myType='stress'
do i = 1, size(loadCases)
allocate(loadCases(i)%ID(nActiveFields))
@ -244,10 +244,10 @@ program DAMASK_spectral
temp_maskVector(j) = IO_stringValue(line,chunkPos,i+j) /= '*' ! true if not an asterisk
if (temp_maskVector(j)) temp_valueVector(j) = IO_floatValue(line,chunkPos,i+j) ! read value where applicable
enddo
loadCases(currentLoadCase)%P%maskLogical = transpose(reshape(temp_maskVector,[ 3,3]))
loadCases(currentLoadCase)%P%maskFloat = merge(ones,zeros,&
loadCases(currentLoadCase)%P%maskLogical)
loadCases(currentLoadCase)%P%values = math_plain9to33(temp_valueVector)
loadCases(currentLoadCase)%stress%maskLogical = transpose(reshape(temp_maskVector,[ 3,3]))
loadCases(currentLoadCase)%stress%maskFloat = merge(ones,zeros,&
loadCases(currentLoadCase)%stress%maskLogical)
loadCases(currentLoadCase)%stress%values = math_plain9to33(temp_valueVector)
case('t','time','delta') ! increment time
loadCases(currentLoadCase)%time = IO_floatValue(line,chunkPos,i+1_pInt)
case('n','incs','increments','steps') ! number of increments
@ -318,16 +318,16 @@ program DAMASK_spectral
endif
enddo; write(6,'(/)',advance='no')
enddo
if (any(loadCases(currentLoadCase)%P%maskLogical .eqv. &
if (any(loadCases(currentLoadCase)%stress%maskLogical .eqv. &
loadCases(currentLoadCase)%deformation%maskLogical)) errorID = 831_pInt ! exclusive or masking only
if (any(loadCases(currentLoadCase)%P%maskLogical .and. &
transpose(loadCases(currentLoadCase)%P%maskLogical) .and. &
if (any(loadCases(currentLoadCase)%stress%maskLogical .and. &
transpose(loadCases(currentLoadCase)%stress%maskLogical) .and. &
reshape([ .false.,.true.,.true.,.true.,.false.,.true.,.true.,.true.,.false.],[ 3,3]))) &
errorID = 838_pInt ! no rotation is allowed by stress BC
write(6,'(2x,a)') 'stress / GPa:'
do i = 1_pInt, 3_pInt; do j = 1_pInt, 3_pInt
if(loadCases(currentLoadCase)%P%maskLogical(i,j)) then
write(6,'(2x,f12.7)',advance='no') loadCases(currentLoadCase)%P%values(i,j)*1e-9_pReal
if(loadCases(currentLoadCase)%stress%maskLogical(i,j)) then
write(6,'(2x,f12.7)',advance='no') loadCases(currentLoadCase)%stress%values(i,j)*1e-9_pReal
else
write(6,'(2x,12a)',advance='no') ' * '
endif
@ -524,30 +524,25 @@ program DAMASK_spectral
case (DAMASK_spectral_SolverBasicPETSc_label)
call BasicPETSc_forward (&
guess,timeinc,timeIncOld,remainingLoadCaseTime, &
F_BC = loadCases(currentLoadCase)%deformation, &
P_BC = loadCases(currentLoadCase)%P, &
deformation_BC = loadCases(currentLoadCase)%deformation, &
stress_BC = loadCases(currentLoadCase)%stress, &
rotation_BC = loadCases(currentLoadCase)%rotation)
case (DAMASK_spectral_SolverAL_label)
call AL_forward (&
guess,timeinc,timeIncOld,remainingLoadCaseTime, &
F_BC = loadCases(currentLoadCase)%deformation, &
P_BC = loadCases(currentLoadCase)%P, &
deformation_BC = loadCases(currentLoadCase)%deformation, &
stress_BC = loadCases(currentLoadCase)%stress, &
rotation_BC = loadCases(currentLoadCase)%rotation)
case (DAMASK_spectral_SolverPolarisation_label)
call Polarisation_forward (&
guess,timeinc,timeIncOld,remainingLoadCaseTime, &
F_BC = loadCases(currentLoadCase)%deformation, &
P_BC = loadCases(currentLoadCase)%P, &
deformation_BC = loadCases(currentLoadCase)%deformation, &
stress_BC = loadCases(currentLoadCase)%stress, &
rotation_BC = loadCases(currentLoadCase)%rotation)
end select
case(FIELD_THERMAL_ID)
call spectral_thermal_forward (&
guess,timeinc,timeIncOld,remainingLoadCaseTime)
case(FIELD_DAMAGE_ID)
call spectral_damage_forward (&
guess,timeinc,timeIncOld,remainingLoadCaseTime)
case(FIELD_THERMAL_ID); call spectral_thermal_forward()
case(FIELD_DAMAGE_ID); call spectral_damage_forward()
end select
enddo
@ -562,34 +557,29 @@ program DAMASK_spectral
select case (spectral_solver)
case (DAMASK_spectral_SolverBasicPETSc_label)
solres(field) = BasicPETSC_solution (&
incInfo,guess,timeinc,timeIncOld,remainingLoadCaseTime, &
P_BC = loadCases(currentLoadCase)%P, &
F_BC = loadCases(currentLoadCase)%deformation, &
incInfo,timeinc,timeIncOld, &
stress_BC = loadCases(currentLoadCase)%stress, &
rotation_BC = loadCases(currentLoadCase)%rotation)
case (DAMASK_spectral_SolverAL_label)
solres(field) = AL_solution (&
incInfo,guess,timeinc,timeIncOld,remainingLoadCaseTime, &
P_BC = loadCases(currentLoadCase)%P, &
F_BC = loadCases(currentLoadCase)%deformation, &
incInfo,timeinc,timeIncOld, &
stress_BC = loadCases(currentLoadCase)%stress, &
rotation_BC = loadCases(currentLoadCase)%rotation)
case (DAMASK_spectral_SolverPolarisation_label)
solres(field) = Polarisation_solution (&
incInfo,guess,timeinc,timeIncOld,remainingLoadCaseTime, &
P_BC = loadCases(currentLoadCase)%P, &
F_BC = loadCases(currentLoadCase)%deformation, &
incInfo,timeinc,timeIncOld, &
stress_BC = loadCases(currentLoadCase)%stress, &
rotation_BC = loadCases(currentLoadCase)%rotation)
end select
case(FIELD_THERMAL_ID)
solres(field) = spectral_thermal_solution (&
guess,timeinc,timeIncOld,remainingLoadCaseTime)
solres(field) = spectral_thermal_solution(timeinc,timeIncOld,remainingLoadCaseTime)
case(FIELD_DAMAGE_ID)
solres(field) = spectral_damage_solution (&
guess,timeinc,timeIncOld,remainingLoadCaseTime)
solres(field) = spectral_damage_solution(timeinc,timeIncOld,remainingLoadCaseTime)
end select
if (.not. solres(field)%converged) exit ! no solution found

View File

@ -1267,8 +1267,8 @@ integer(pInt) function IO_countContinuousIntValues(fileUnit)
line = IO_read(fileUnit, .true.) ! reset IO_read
exit
elseif (IO_lc(IO_stringValue(line,chunkPos,2_pInt)) == 'to' ) then ! found range indicator
IO_countContinuousIntValues = 1_pInt + IO_intValue(line,chunkPos,3_pInt) &
- IO_intValue(line,chunkPos,1_pInt)
IO_countContinuousIntValues = 1_pInt + abs( IO_intValue(line,chunkPos,3_pInt) &
- IO_intValue(line,chunkPos,1_pInt))
line = IO_read(fileUnit, .true.) ! reset IO_read
exit ! only one single range indicator allowed
else if (IO_lc(IO_stringValue(line,chunkPos,2_pInt)) == 'of' ) then ! found multiple entries indicator
@ -1321,9 +1321,9 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN)
lookupMaxN
integer(pInt), dimension(:,:), intent(in) :: lookupMap
character(len=64), dimension(:), intent(in) :: lookupName
integer(pInt) :: i
integer(pInt) :: i,first,last
#ifdef Abaqus
integer(pInt) :: j,l,c,first,last
integer(pInt) :: j,l,c
#endif
integer(pInt), allocatable, dimension(:) :: chunkPos
@ -1348,7 +1348,9 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN)
enddo
exit
else if (chunkPos(1) > 2_pInt .and. IO_lc(IO_stringValue(line,chunkPos,2_pInt)) == 'to' ) then ! found range indicator
do i = IO_intValue(line,chunkPos,1_pInt),IO_intValue(line,chunkPos,3_pInt)
first = IO_intValue(line,chunkPos,1_pInt)
last = IO_intValue(line,chunkPos,3_pInt)
do i = first, last, sign(1_pInt,last-first)
IO_continuousIntValues(1) = IO_continuousIntValues(1) + 1_pInt
IO_continuousIntValues(1+IO_continuousIntValues(1)) = i
enddo

View File

@ -22,7 +22,7 @@ DAMASKVERSION :=$(shell cat ../VERSION)
include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules
INCLUDE_DIRS := $(PETSC_FC_INCLUDES) -DPETSc -I../lib
INCLUDE_DIRS := $(PETSC_FC_INCLUDES) -DPETSc
LIBRARIES := $(PETSC_WITH_EXTERNAL_LIB)
FCOMPILERNAME ?= $(FC)
CCOMPILERNAME ?= $(CC)
@ -65,7 +65,7 @@ endif
# settings for shared memory multicore support
ifeq "$(OPENMP)" "ON"
OPENMP_FLAG_ifort =-openmp -openmp-report0 -parallel
OPENMP_FLAG_ifort =-qopenmp -parallel
OPENMP_FLAG_gfortran =-fopenmp
endif

View File

@ -508,13 +508,11 @@ end subroutine crystallite_init
subroutine crystallite_stressAndItsTangent(updateJaco)
use prec, only: &
tol_math_check, &
dNeq
dNeq0
use numerics, only: &
subStepMinCryst, &
subStepSizeCryst, &
stepIncreaseCryst, &
pert_Fg, &
pert_method, &
nCryst, &
numerics_integrator, &
numerics_integrationMode, &
@ -574,7 +572,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
logical, intent(in) :: &
updateJaco !< whether to update the Jacobian (stiffness) or not
real(pReal) :: &
myPert, & ! perturbation with correct sign
formerSubStep, &
subFracIntermediate
real(pReal), dimension(3,3) :: &
@ -586,14 +583,11 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
c, & !< counter in integration point component loop
i, & !< counter in integration point loop
e, & !< counter in element loop
k, &
l, &
n, startIP, endIP, &
neighboring_e, &
neighboring_i, &
o, &
p, &
perturbation , & ! loop counter for forward,backward perturbation mode
myNcomponents, &
mySource
! local variables used for calculating analytic Jacobian
@ -782,7 +776,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
endif
else
subFracIntermediate = maxval(crystallite_subFrac, mask=.not.crystallite_localPlasticity)
if (dNeq(subFracIntermediate,0.0_pReal)) then
if (dNeq0(subFracIntermediate)) then
crystallite_neighborEnforcedCutback = .false. ! look for ips that require a cutback because of a nonconverged neighbor
!$OMP PARALLEL
!$OMP DO PRIVATE(neighboring_e,neighboring_i)
@ -823,7 +817,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
!$OMP DO PRIVATE(neighboring_e,neighboring_i)
do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
if (.not. crystallite_localPlasticity(1,i,e) .and. dNeq(crystallite_subFrac(1,i,e),0.0_pReal)) then
if (.not. crystallite_localPlasticity(1,i,e) .and. dNeq0(crystallite_subFrac(1,i,e))) then
do n = 1_pInt,FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,e))))
neighboring_e = mesh_ipNeighborhood(1,n,i,e)
neighboring_i = mesh_ipNeighborhood(2,n,i,e)
@ -3076,7 +3070,7 @@ end subroutine crystallite_integrateStateFPI
logical function crystallite_stateJump(ipc,ip,el)
use prec, only: &
prec_isNaN, &
dNeq
dNeq0
use debug, only: &
debug_level, &
debug_crystallite, &
@ -3128,7 +3122,7 @@ logical function crystallite_stateJump(ipc,ip,el)
enddo
#ifndef _OPENMP
if (any(dNeq(plasticState(p)%deltaState(1:mySizePlasticDeltaState,c),0.0_pReal)) &
if (any(dNeq0(plasticState(p)%deltaState(1:mySizePlasticDeltaState,c))) &
.and. iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt &
.and. ((el == debug_e .and. ip == debug_i .and. ipc == debug_g) &
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then
@ -3184,7 +3178,7 @@ logical function crystallite_integrateStress(&
use prec, only: pLongInt, &
tol_math_check, &
prec_isNaN, &
dEq
dEq0
use numerics, only: nStress, &
aTol_crystalliteStress, &
rTol_crystalliteStress, &
@ -3331,7 +3325,7 @@ logical function crystallite_integrateStress(&
!* inversion of Fp_current...
invFp_current = math_inv33(Fp_current)
failedInversionFp: if (all(dEq(invFp_current,0.0_pReal))) then
failedInversionFp: if (all(dEq0(invFp_current))) then
#ifndef _OPENMP
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
write(6,'(a,i8,1x,a,i8,a,1x,i2,1x,i3)') '<< CRYST >> integrateStress failed on inversion of Fp_current at el (elFE) ip g ',&
@ -3347,7 +3341,7 @@ logical function crystallite_integrateStress(&
!* inversion of Fi_current...
invFi_current = math_inv33(Fi_current)
failedInversionFi: if (all(dEq(invFi_current,0.0_pReal))) then
failedInversionFi: if (all(dEq0(invFi_current))) then
#ifndef _OPENMP
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
write(6,'(a,i8,1x,a,i8,a,1x,i2,1x,i3)') '<< CRYST >> integrateStress failed on inversion of Fi_current at el (elFE) ip ipc ',&
@ -3606,7 +3600,7 @@ logical function crystallite_integrateStress(&
invFp_new = math_mul33x33(invFp_current,B)
invFp_new = invFp_new / math_det33(invFp_new)**(1.0_pReal/3.0_pReal) ! regularize by det
Fp_new = math_inv33(invFp_new)
failedInversionInvFp: if (all(dEq(Fp_new,0.0_pReal))) then
failedInversionInvFp: if (all(dEq0(Fp_new))) then
#ifndef _OPENMP
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
write(6,'(a,i8,1x,a,i8,a,1x,i2,1x,i3,a,i3)') '<< CRYST >> integrateStress failed on invFp_new inversion at el ip ipc ',&

View File

@ -387,7 +387,7 @@ end subroutine homogenization_RGC_partitionDeformation
!--------------------------------------------------------------------------------------------------
function homogenization_RGC_updateState(P,F,F0,avgF,dt,dPdF,ip,el)
use prec, only: &
dEq
dEq0
use debug, only: &
debug_level, &
debug_homogenization,&
@ -443,7 +443,7 @@ function homogenization_RGC_updateState(P,F,F0,avgF,dt,dPdF,ip,el)
real(pReal), dimension(:,:), allocatable :: tract,jmatrix,jnverse,smatrix,pmatrix,rmatrix
real(pReal), dimension(:), allocatable :: resid,relax,p_relax,p_resid,drelax
zeroTimeStep: if(dEq(dt,0.0_pReal)) then
zeroTimeStep: if(dEq0(dt)) then
homogenization_RGC_updateState = .true. ! pretend everything is fine and return
return
endif zeroTimeStep

View File

@ -67,8 +67,6 @@ subroutine kinematics_hydrogen_strain_init(fileUnit)
KINEMATICS_hydrogen_strain_ID, &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
worldrank
implicit none
integer(pInt), intent(in) :: fileUnit
@ -79,11 +77,9 @@ subroutine kinematics_hydrogen_strain_init(fileUnit)
tag = '', &
line = ''
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_hydrogen_strain_LABEL//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_hydrogen_strain_LABEL//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
maxNinstance = int(count(phase_kinematics == KINEMATICS_hydrogen_strain_ID),pInt)
if (maxNinstance == 0_pInt) return

View File

@ -577,26 +577,26 @@ module lattice
real(pReal), dimension(4+4,LATTICE_hex_Nslip), parameter, private :: &
LATTICE_hex_systemSlip = reshape(real([&
! Slip direction Plane normal
! Basal systems <11.0>{00.1} (independent of c/a-ratio, Bravais notation (4 coordinate base))
! Basal systems <11.0>{00.1} (independent of c/a-ratio, Bravais notation (4 coordinate base))
2, -1, -1, 0, 0, 0, 0, 1, &
-1, 2, -1, 0, 0, 0, 0, 1, &
-1, -1, 2, 0, 0, 0, 0, 1, &
! 1st type prismatic systems <11.0>{10.0} (independent of c/a-ratio)
! 1st type prismatic systems <11.0>{10.0} (independent of c/a-ratio)
2, -1, -1, 0, 0, 1, -1, 0, &
-1, 2, -1, 0, -1, 0, 1, 0, &
-1, -1, 2, 0, 1, -1, 0, 0, &
! 2nd type prismatic systems <10.0>{11.0} -- a slip; plane normals independent of c/a-ratio
! 2nd type prismatic systems <10.0>{11.0} -- a slip; plane normals independent of c/a-ratio
0, 1, -1, 0, 2, -1, -1, 0, &
-1, 0, 1, 0, -1, 2, -1, 0, &
1, -1, 0, 0, -1, -1, 2, 0, &
! 1st type 1st order pyramidal systems <11.0>{-11.1} -- plane normals depend on the c/a-ratio
! 1st type 1st order pyramidal systems <11.0>{-11.1} -- plane normals depend on the c/a-ratio
2, -1, -1, 0, 0, 1, -1, 1, &
-1, 2, -1, 0, -1, 0, 1, 1, &
-1, -1, 2, 0, 1, -1, 0, 1, &
1, 1, -2, 0, -1, 1, 0, 1, &
-2, 1, 1, 0, 0, -1, 1, 1, &
1, -2, 1, 0, 1, 0, -1, 1, &
! pyramidal system: c+a slip <11.3>{-10.1} -- plane normals depend on the c/a-ratio
! pyramidal system: c+a slip <11.3>{-10.1} -- plane normals depend on the c/a-ratio
2, -1, -1, 3, -1, 1, 0, 1, &
1, -2, 1, 3, -1, 1, 0, 1, &
-1, -1, 2, 3, 1, 0, -1, 1, &
@ -609,7 +609,7 @@ module lattice
2, -1, -1, 3, -1, 0, 1, 1, &
1, -2, 1, 3, 0, 1, -1, 1, &
-1, -1, 2, 3, 0, 1, -1, 1, &
! pyramidal system: c+a slip <11.3>{-1-1.2} -- as for hexagonal ice (Castelnau et al. 1996, similar to twin system found below)
! pyramidal system: c+a slip <11.3>{-1-1.2} -- as for hexagonal ice (Castelnau et al. 1996, similar to twin system found below)
2, -1, -1, 3, -2, 1, 1, 2, & ! sorted according to similar twin system
-1, 2, -1, 3, 1, -2, 1, 2, & ! <11.3>{-1-1.2} shear = 2((c/a)^2-2)/(3 c/a)
-1, -1, 2, 3, 1, 1, -2, 2, &

View File

@ -549,13 +549,13 @@ subroutine mesh_init(ip,el)
call IO_open_file(FILEUNIT,geometryFile) ! parse info from geometry file...
if (myDebug) write(6,'(a)') ' Opened geometry file'; flush(6)
grid = mesh_spectral_getGrid(fileUnit)
call MPI_comm_size(MPI_COMM_WORLD, worldsize, ierr)
call MPI_comm_size(PETSC_COMM_WORLD, worldsize, ierr)
if(ierr /=0_pInt) call IO_error(894_pInt, ext_msg='MPI_comm_size')
if(worldsize>grid(3)) call IO_error(894_pInt, ext_msg='number of processes exceeds grid(3)')
geomSize = mesh_spectral_getSize(fileUnit)
devNull = fftw_mpi_local_size_3d(int(grid(3),C_INTPTR_T),int(grid(2),C_INTPTR_T),&
int(grid(1),C_INTPTR_T)/2+1,MPI_COMM_WORLD,local_K,local_K_offset)
int(grid(1),C_INTPTR_T)/2+1,PETSC_COMM_WORLD,local_K,local_K_offset)
grid3 = int(local_K,pInt)
grid3Offset = int(local_K_offset,pInt)
size3 = geomSize(3)*real(grid3,pReal) /real(grid(3),pReal)

View File

@ -110,7 +110,7 @@ module numerics
fftw_plan_mode = 'FFTW_PATIENT' !< reads the planing-rigor flag, see manual on www.fftw.org, Default FFTW_PATIENT: use patient planner flag
character(len=64), protected, public :: &
spectral_solver = 'basicpetsc' , & !< spectral solution method
spectral_derivative = 'continuous' !< spectral filtering method
spectral_derivative = 'continuous' !< spectral spatial derivative method
character(len=1024), protected, public :: &
petsc_defaultOptions = '-mech_snes_type ngmres &
&-damage_snes_type ngmres &

View File

@ -974,7 +974,7 @@ end subroutine plastic_disloUCLA_LpAndItsTangent
subroutine plastic_disloUCLA_dotState(Tstar_v,Temperature,ipc,ip,el)
use prec, only: &
tol_math_check, &
dEq
dEq0
use math, only: &
pi
use material, only: &
@ -1112,7 +1112,7 @@ subroutine plastic_disloUCLA_dotState(Tstar_v,Temperature,ipc,ip,el)
!* Dipole formation
EdgeDipMinDistance = &
plastic_disloUCLA_CEdgeDipMinDistance(instance)*plastic_disloUCLA_burgersPerSlipSystem(j,instance)
if (dEq(tau_slip_pos,0.0_pReal)) then
if (dEq0(tau_slip_pos)) then
DotRhoDipFormation = 0.0_pReal
else
EdgeDipDistance = &
@ -1140,7 +1140,7 @@ subroutine plastic_disloUCLA_dotState(Tstar_v,Temperature,ipc,ip,el)
plastic_disloUCLA_CAtomicVolume(instance)*plastic_disloUCLA_burgersPerSlipSystem(j,instance)**(3.0_pReal)
VacancyDiffusion = &
plastic_disloUCLA_D0(instance)*exp(-plastic_disloUCLA_Qsd(instance)/(kB*Temperature))
if (dEq(tau_slip_pos,0.0_pReal)) then
if (dEq0(tau_slip_pos)) then
DotRhoEdgeDipClimb = 0.0_pReal
else
ClimbVelocity = &

View File

@ -200,7 +200,8 @@ contains
subroutine plastic_dislotwin_init(fileUnit)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use prec, only: &
dEq, &
dEq0, &
dNeq0, &
dNeq
use debug, only: &
debug_level,&
@ -748,8 +749,8 @@ subroutine plastic_dislotwin_init(fileUnit)
if (plastic_dislotwin_Qsd(instance) <= 0.0_pReal) &
call IO_error(211_pInt,el=instance,ext_msg='Qsd ('//PLASTICITY_DISLOTWIN_label//')')
if (sum(plastic_dislotwin_Ntwin(:,instance)) > 0_pInt) then
if (dEq(plastic_dislotwin_SFE_0K(instance), 0.0_pReal) .and. &
dEq(plastic_dislotwin_dSFE_dT(instance),0.0_pReal) .and. &
if (dEq0(plastic_dislotwin_SFE_0K(instance)) .and. &
dEq0(plastic_dislotwin_dSFE_dT(instance)) .and. &
lattice_structure(phase) == LATTICE_fcc_ID) &
call IO_error(211_pInt,el=instance,ext_msg='SFE0K ('//PLASTICITY_DISLOTWIN_label//')')
if (plastic_dislotwin_aTolRho(instance) <= 0.0_pReal) &
@ -758,8 +759,8 @@ subroutine plastic_dislotwin_init(fileUnit)
call IO_error(211_pInt,el=instance,ext_msg='aTolTwinFrac ('//PLASTICITY_DISLOTWIN_label//')')
endif
if (sum(plastic_dislotwin_Ntrans(:,instance)) > 0_pInt) then
if (dEq(plastic_dislotwin_SFE_0K(instance), 0.0_pReal) .and. &
dEq(plastic_dislotwin_dSFE_dT(instance),0.0_pReal) .and. &
if (dEq0(plastic_dislotwin_SFE_0K(instance)) .and. &
dEq0(plastic_dislotwin_dSFE_dT(instance)) .and. &
lattice_structure(phase) == LATTICE_fcc_ID) &
call IO_error(211_pInt,el=instance,ext_msg='SFE0K ('//PLASTICITY_DISLOTWIN_label//')')
if (plastic_dislotwin_aTolTransFrac(instance) <= 0.0_pReal) &
@ -772,7 +773,7 @@ subroutine plastic_dislotwin_init(fileUnit)
if (plastic_dislotwin_sbVelocity(instance) > 0.0_pReal .and. &
plastic_dislotwin_pShearBand(instance) <= 0.0_pReal) &
call IO_error(211_pInt,el=instance,ext_msg='pShearBand ('//PLASTICITY_DISLOTWIN_label//')')
if (dNeq(plastic_dislotwin_dipoleFormationFactor(instance), 0.0_pReal) .and. &
if (dNeq0(plastic_dislotwin_dipoleFormationFactor(instance)) .and. &
dNeq(plastic_dislotwin_dipoleFormationFactor(instance), 1.0_pReal)) &
call IO_error(211_pInt,el=instance,ext_msg='dipoleFormationFactor ('//PLASTICITY_DISLOTWIN_label//')')
if (plastic_dislotwin_sbVelocity(instance) > 0.0_pReal .and. &
@ -1624,7 +1625,7 @@ end subroutine plastic_dislotwin_microstructure
subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,Temperature,ipc,ip,el)
use prec, only: &
tol_math_check, &
dNeq
dNeq0
use math, only: &
math_Plain3333to99, &
math_Mandel6to33, &
@ -1771,8 +1772,7 @@ subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,Temperature
!--------------------------------------------------------------------------------------------------
! Shear banding (shearband) part
if(dNeq(plastic_dislotwin_sbVelocity(instance), 0.0_pReal) .and. &
dNeq(plastic_dislotwin_sbResistance(instance),0.0_pReal)) then
if(dNeq0(plastic_dislotwin_sbVelocity(instance)) .and. dNeq0(plastic_dislotwin_sbResistance(instance))) then
gdot_sb = 0.0_pReal
dgdot_dtausb = 0.0_pReal
call math_eigenValuesVectorsSym(math_Mandel6to33(Tstar_v),eigValues,eigVectors,error)
@ -1939,7 +1939,7 @@ end subroutine plastic_dislotwin_LpAndItsTangent
subroutine plastic_dislotwin_dotState(Tstar_v,Temperature,ipc,ip,el)
use prec, only: &
tol_math_check, &
dEq
dEq0
use math, only: &
pi
use material, only: &
@ -2040,7 +2040,7 @@ subroutine plastic_dislotwin_dotState(Tstar_v,Temperature,ipc,ip,el)
!* Dipole formation
EdgeDipMinDistance = &
plastic_dislotwin_CEdgeDipMinDistance(instance)*plastic_dislotwin_burgersPerSlipSystem(j,instance)
if (dEq(tau_slip(j),0.0_pReal)) then
if (dEq0(tau_slip(j))) then
DotRhoDipFormation = 0.0_pReal
else
EdgeDipDistance = &
@ -2068,10 +2068,10 @@ subroutine plastic_dislotwin_dotState(Tstar_v,Temperature,ipc,ip,el)
plastic_dislotwin_CAtomicVolume(instance)*plastic_dislotwin_burgersPerSlipSystem(j,instance)**(3.0_pReal)
VacancyDiffusion = &
plastic_dislotwin_D0(instance)*exp(-plastic_dislotwin_Qsd(instance)/(kB*Temperature))
if (dEq(tau_slip(j),0.0_pReal)) then
if (dEq0(tau_slip(j))) then
DotRhoEdgeDipClimb = 0.0_pReal
else
if (dEq(EdgeDipDistance-EdgeDipMinDistance,0.0_pReal)) then
if (dEq0(EdgeDipDistance-EdgeDipMinDistance)) then
DotRhoEdgeDipClimb = 0.0_pReal
else
ClimbVelocity = 3.0_pReal*lattice_mu(ph)*VacancyDiffusion*AtomicVolume/ &
@ -2187,7 +2187,7 @@ end subroutine plastic_dislotwin_dotState
function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
use prec, only: &
tol_math_check, &
dEq
dEq0
use math, only: &
pi, &
math_Mandel6to33, &
@ -2503,7 +2503,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
!* Stress exponent
plastic_dislotwin_postResults(c+j) = &
merge(0.0_pReal,(tau/gdot_slip(j))*dgdot_dtauslip,dEq(gdot_slip(j),0.0_pReal))
merge(0.0_pReal,(tau/gdot_slip(j))*dgdot_dtauslip,dEq0(gdot_slip(j)))
enddo ; enddo
c = c + ns
case (sb_eigenvalues_ID)

View File

@ -517,7 +517,7 @@ end subroutine plastic_isotropic_LiAndItsTangent
!--------------------------------------------------------------------------------------------------
subroutine plastic_isotropic_dotState(Tstar_v,ipc,ip,el)
use prec, only: &
dEq
dEq0
use math, only: &
math_mul6x6
use material, only: &
@ -564,7 +564,7 @@ subroutine plastic_isotropic_dotState(Tstar_v,ipc,ip,el)
!--------------------------------------------------------------------------------------------------
! hardening coefficient
if (abs(gamma_dot) > 1e-12_pReal) then
if (dEq(param(instance)%tausat_SinhFitA,0.0_pReal)) then
if (dEq0(param(instance)%tausat_SinhFitA)) then
saturation = param(instance)%tausat
else
saturation = ( param(instance)%tausat &

View File

@ -1542,7 +1542,7 @@ end subroutine plastic_nonlocal_aTolState
!--------------------------------------------------------------------------------------------------
subroutine plastic_nonlocal_microstructure(Fe, Fp, ip, el)
use prec, only: &
dEq
dEq0
use IO, only: &
IO_error
use math, only: &
@ -1786,7 +1786,7 @@ if (.not. phase_localPlasticity(ph) .and. shortRangeStressCorrection(instance))
- neighbor_rhoExcess(c,s,neighbors(2))
enddo
invConnections = math_inv33(connections)
if (all(dEq(invConnections,0.0_pReal))) &
if (all(dEq0(invConnections))) &
call IO_error(-1_pInt,ext_msg='back stress calculation: inversion error')
rhoExcessGradient(c) = math_mul3x3(m(1:3,s,c), &
math_mul33x3(invConnections,rhoExcessDifferences))
@ -2195,7 +2195,7 @@ end subroutine plastic_nonlocal_LpAndItsTangent
!--------------------------------------------------------------------------------------------------
subroutine plastic_nonlocal_deltaState(Tstar_v,ip,el)
use prec, only: &
dNeq
dNeq0
use debug, only: debug_level, &
debug_constitutive, &
debug_levelBasic, &
@ -2318,8 +2318,8 @@ dUpper(1:ns,2) = lattice_mu(ph) * burgers(1:ns,instance) / (4.0_pReal * pi * abs
forall (c = 1_pInt:2_pInt)
where(dNeq(sqrt(rhoSgl(1:ns,2*c-1)+rhoSgl(1:ns,2*c)+&
abs(rhoSgl(1:ns,2*c+3))+abs(rhoSgl(1:ns,2*c+4))+rhoDip(1:ns,c)),0.0_pReal)) &
where(dNeq0(sqrt(rhoSgl(1:ns,2*c-1)+rhoSgl(1:ns,2*c)+abs(rhoSgl(1:ns,2*c+3))&
+abs(rhoSgl(1:ns,2*c+4))+rhoDip(1:ns,c)))) &
dUpper(1:ns,c) = min(1.0_pReal / sqrt(rhoSgl(1:ns,2*c-1) + rhoSgl(1:ns,2*c) &
+ abs(rhoSgl(1:ns,2*c+3)) + abs(rhoSgl(1:ns,2*c+4)) + rhoDip(1:ns,c)), &
dUpper(1:ns,c))
@ -2331,7 +2331,7 @@ deltaDUpper = dUpper - dUpperOld
!*** dissociation by stress increase
deltaRhoDipole2SingleStress = 0.0_pReal
forall (c=1_pInt:2_pInt, s=1_pInt:ns, deltaDUpper(s,c) < 0.0_pReal .and. &
dNeq(dUpperOld(s,c) - dLower(s,c),0.0_pReal)) &
dNeq0(dUpperOld(s,c) - dLower(s,c))) &
deltaRhoDipole2SingleStress(s,8_pInt+c) = rhoDip(s,c) * deltaDUpper(s,c) &
/ (dUpperOld(s,c) - dLower(s,c))
@ -2379,8 +2379,9 @@ subroutine plastic_nonlocal_dotState(Tstar_v, Fe, Fp, Temperature, &
timestep,subfrac, ip,el)
use prec, only: DAMASK_NaN, &
dNeq0, &
dNeq, &
dEq
dEq0
use numerics, only: numerics_integrationMode, &
numerics_timeSyncing
use IO, only: IO_error
@ -2614,8 +2615,8 @@ dUpper(1:ns,1) = lattice_mu(ph) * burgers(1:ns,instance) &
dUpper(1:ns,2) = lattice_mu(ph) * burgers(1:ns,instance) &
/ (4.0_pReal * pi * abs(tau))
forall (c = 1_pInt:2_pInt)
where(dNeq(sqrt(rhoSgl(1:ns,2*c-1)+rhoSgl(1:ns,2*c)+&
abs(rhoSgl(1:ns,2*c+3))+abs(rhoSgl(1:ns,2*c+4))+rhoDip(1:ns,c)),0.0_pReal)) &
where(dNeq0(sqrt(rhoSgl(1:ns,2*c-1)+rhoSgl(1:ns,2*c)+abs(rhoSgl(1:ns,2*c+3))&
+abs(rhoSgl(1:ns,2*c+4))+rhoDip(1:ns,c)))) &
dUpper(1:ns,c) = min(1.0_pReal / sqrt(rhoSgl(1:ns,2*c-1) + rhoSgl(1:ns,2*c) &
+ abs(rhoSgl(1:ns,2*c+3)) + abs(rhoSgl(1:ns,2*c+4)) + rhoDip(1:ns,c)), &
dUpper(1:ns,c))
@ -2827,11 +2828,11 @@ if (.not. phase_localPlasticity(material_phase(1_pInt,ip,el))) then
my_rhoSgl = rhoSgl
my_v = v
if(numerics_timeSyncing) then
if (dEq(subfrac(1_pInt,ip,el),0.0_pReal)) then
if (dEq0(subfrac(1_pInt,ip,el))) then
my_rhoSgl = rhoSgl0
my_v = v0
elseif (neighbor_n > 0_pInt) then
if (dEq(subfrac(1_pInt,neighbor_ip,neighbor_el),0.0_pReal)) then
if (dEq0(subfrac(1_pInt,neighbor_ip,neighbor_el))) then
my_rhoSgl = rhoSgl0
my_v = v0
endif
@ -3170,7 +3171,7 @@ end subroutine plastic_nonlocal_updateCompatibility
!*********************************************************************
function plastic_nonlocal_dislocationstress(Fe, ip, el)
use prec, only: &
dEq
dEq0
use math, only: math_mul33x33, &
math_mul33x3, &
math_inv33, &
@ -3383,7 +3384,7 @@ if (.not. phase_localPlasticity(ph)) then
Rsquare = R * R
Rcube = Rsquare * R
denominator = R * (R + flipSign * lambda)
if (dEq(denominator,0.0_pReal)) exit ipLoop
if (dEq0(denominator)) exit ipLoop
sigma(1,1) = sigma(1,1) - real(side,pReal) &
* flipSign * z / denominator &
@ -3428,7 +3429,7 @@ if (.not. phase_localPlasticity(ph)) then
Rsquare = R * R
Rcube = Rsquare * R
denominator = R * (R + flipSign * lambda)
if (dEq(denominator,0.0_pReal)) exit ipLoop
if (dEq0(denominator)) exit ipLoop
sigma(1,2) = sigma(1,2) - real(side,pReal) * flipSign * z &
* (1.0_pReal - lattice_nu(ph)) / denominator &
@ -3518,7 +3519,7 @@ end function plastic_nonlocal_dislocationstress
!--------------------------------------------------------------------------------------------------
function plastic_nonlocal_postResults(Tstar_v,Fe,ip,el)
use prec, only: &
dNeq
dNeq0
use math, only: &
math_mul6x6, &
math_mul33x3, &
@ -3635,8 +3636,8 @@ dUpper(1:ns,1) = lattice_mu(ph) * burgers(1:ns,instance) &
dUpper(1:ns,2) = lattice_mu(ph) * burgers(1:ns,instance) &
/ (4.0_pReal * pi * abs(tau))
forall (c = 1_pInt:2_pInt)
where(dNeq(sqrt(rhoSgl(1:ns,2*c-1)+rhoSgl(1:ns,2*c)+&
abs(rhoSgl(1:ns,2*c+3))+abs(rhoSgl(1:ns,2*c+4))+rhoDip(1:ns,c)),0.0_pReal)) &
where(dNeq0(sqrt(rhoSgl(1:ns,2*c-1)+rhoSgl(1:ns,2*c)+abs(rhoSgl(1:ns,2*c+3))&
+abs(rhoSgl(1:ns,2*c+4))+rhoDip(1:ns,c)))) &
dUpper(1:ns,c) = min(1.0_pReal / sqrt(rhoSgl(1:ns,2*c-1) + rhoSgl(1:ns,2*c) &
+ abs(rhoSgl(1:ns,2*c+3)) + abs(rhoSgl(1:ns,2*c+4)) + rhoDip(1:ns,c)), &
dUpper(1:ns,c))

View File

@ -113,7 +113,7 @@ contains
subroutine plastic_phenoplus_init(fileUnit)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use prec, only: &
dEq
dEq0
use debug, only: &
debug_level, &
debug_constitutive,&
@ -479,8 +479,7 @@ subroutine plastic_phenoplus_init(fileUnit)
if (any(plastic_phenoplus_tausat_slip(:,instance) <= 0.0_pReal .and. &
plastic_phenoplus_Nslip(:,instance) > 0)) &
call IO_error(211_pInt,el=instance,ext_msg='tausat_slip ('//PLASTICITY_PHENOPLUS_label//')')
if (any(dEq(plastic_phenoplus_a_slip(instance),0.0_pReal) .and. &
plastic_phenoplus_Nslip(:,instance) > 0)) &
if (any(dEq0(plastic_phenoplus_a_slip(instance)) .and. plastic_phenoplus_Nslip(:,instance) > 0)) &
call IO_error(211_pInt,el=instance,ext_msg='a_slip ('//PLASTICITY_PHENOPLUS_label//')')
if (any(plastic_phenoplus_tau0_twin(:,instance) < 0.0_pReal .and. &
plastic_phenoplus_Ntwin(:,instance) > 0)) &
@ -918,7 +917,7 @@ end subroutine plastic_phenoplus_microstructure
!--------------------------------------------------------------------------------------------------
subroutine plastic_phenoplus_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,el)
use prec, only: &
dNeq
dNeq0
use math, only: &
math_Plain3333to99, &
math_Mandel6to33
@ -1034,7 +1033,7 @@ subroutine plastic_phenoplus_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,el)
(gdot_slip_pos+gdot_slip_neg)*lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
! Calculation of the tangent of Lp
if (dNeq(gdot_slip_pos,0.0_pReal)) then
if (dNeq0(gdot_slip_pos)) then
dgdot_dtauslip_pos = gdot_slip_pos*plastic_phenoplus_n_slip(instance)/tau_slip_pos
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
dLp_dTstar3333(k,l,m,n) = dLp_dTstar3333(k,l,m,n) + &
@ -1042,7 +1041,7 @@ subroutine plastic_phenoplus_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,el)
nonSchmid_tensor(m,n,1)
endif
if (dNeq(gdot_slip_neg,0.0_pReal)) then
if (dNeq0(gdot_slip_neg)) then
dgdot_dtauslip_neg = gdot_slip_neg*plastic_phenoplus_n_slip(instance)/tau_slip_neg
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
dLp_dTstar3333(k,l,m,n) = dLp_dTstar3333(k,l,m,n) + &
@ -1069,7 +1068,7 @@ subroutine plastic_phenoplus_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,el)
Lp = Lp + gdot_twin*lattice_Stwin(1:3,1:3,index_myFamily+i,ph)
! Calculation of the tangent of Lp
if (dNeq(gdot_twin,0.0_pReal)) then
if (dNeq0(gdot_twin)) then
dgdot_dtautwin = gdot_twin*plastic_phenoplus_n_twin(instance)/tau_twin
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
dLp_dTstar3333(k,l,m,n) = dLp_dTstar3333(k,l,m,n) + &

View File

@ -125,7 +125,7 @@ contains
subroutine plastic_phenopowerlaw_init(fileUnit)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use prec, only: &
dEq
dEq0
use debug, only: &
debug_level, &
debug_constitutive,&
@ -485,8 +485,7 @@ subroutine plastic_phenopowerlaw_init(fileUnit)
if (any(plastic_phenopowerlaw_tausat_slip(:,instance) <= 0.0_pReal .and. &
plastic_phenopowerlaw_Nslip(:,instance) > 0)) &
call IO_error(211_pInt,el=instance,ext_msg='tausat_slip ('//PLASTICITY_PHENOPOWERLAW_label//')')
if (any(dEq(plastic_phenopowerlaw_a_slip(instance),0.0_pReal) .and. &
plastic_phenopowerlaw_Nslip(:,instance) > 0)) &
if (any(dEq0(plastic_phenopowerlaw_a_slip(instance)) .and. plastic_phenopowerlaw_Nslip(:,instance) > 0)) &
call IO_error(211_pInt,el=instance,ext_msg='a_slip ('//PLASTICITY_PHENOPOWERLAW_label//')')
if (any(plastic_phenopowerlaw_tau0_twin(:,instance) < 0.0_pReal .and. &
plastic_phenopowerlaw_Ntwin(:,instance) > 0)) &
@ -769,7 +768,7 @@ end subroutine plastic_phenopowerlaw_aTolState
!--------------------------------------------------------------------------------------------------
subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,el)
use prec, only: &
dNeq
dNeq0
use math, only: &
math_Plain3333to99, &
math_Mandel6to33
@ -859,7 +858,7 @@ subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,
(gdot_slip_pos+gdot_slip_neg)*lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
! Calculation of the tangent of Lp
if (dNeq(gdot_slip_pos,0.0_pReal)) then
if (dNeq0(gdot_slip_pos)) then
dgdot_dtauslip_pos = gdot_slip_pos*plastic_phenopowerlaw_n_slip(instance)/tau_slip_pos
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
dLp_dTstar3333(k,l,m,n) = dLp_dTstar3333(k,l,m,n) + &
@ -867,7 +866,7 @@ subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,
nonSchmid_tensor(m,n,1)
endif
if (dNeq(gdot_slip_neg,0.0_pReal)) then
if (dNeq0(gdot_slip_neg)) then
dgdot_dtauslip_neg = gdot_slip_neg*plastic_phenopowerlaw_n_slip(instance)/tau_slip_neg
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
dLp_dTstar3333(k,l,m,n) = dLp_dTstar3333(k,l,m,n) + &
@ -894,7 +893,7 @@ subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,
Lp = Lp + gdot_twin*lattice_Stwin(1:3,1:3,index_myFamily+i,ph)
! Calculation of the tangent of Lp
if (dNeq(gdot_twin,0.0_pReal)) then
if (dNeq0(gdot_twin)) then
dgdot_dtautwin = gdot_twin*plastic_phenopowerlaw_n_twin(instance)/tau_twin
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
dLp_dTstar3333(k,l,m,n) = dLp_dTstar3333(k,l,m,n) + &

View File

@ -23,21 +23,17 @@ subroutine porosity_none_init()
use IO, only: &
IO_timeStamp
use material
use numerics, only: &
worldrank
implicit none
integer(pInt) :: &
homog, &
NofMyHomog
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- porosity_'//POROSITY_none_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- porosity_'//POROSITY_none_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
initializeInstances: do homog = 1_pInt, material_Nhomogenization
initializeInstances: do homog = 1_pInt, material_Nhomogenization
myhomog: if (porosity_type(homog) == POROSITY_none_ID) then
NofMyHomog = count(material_homog == homog)

View File

@ -20,12 +20,7 @@ module prec
private
#if (FLOAT==8)
integer, parameter, public :: pReal = 8 !< floating point double precision (was selected_real_kind(15,300), number with 15 significant digits, up to 1e+-300)
#ifdef __INTEL_COMPILER
real(pReal), parameter, public :: DAMASK_NaN = Z'7FF8000000000000' !< quiet NaN for double precision (from http://www.hpc.unimelb.edu.au/doc/f90lrm/dfum_035.html)
#endif
#ifdef __GFORTRAN__
real(pReal), parameter, public :: DAMASK_NaN = real(Z'7FF8000000000000',pReal) !< quiet NaN for double precision (from http://www.hpc.unimelb.edu.au/doc/f90lrm/dfum_035.html)
#endif
#else
NO SUITABLE PRECISION FOR REAL SELECTED, STOPPING COMPILATION
#endif
@ -171,7 +166,7 @@ end function prec_isNaN
!--------------------------------------------------------------------------------------------------
!> @brief equality comparison for float with double precision
! replaces "==" but for certain (relative) tolerance. Counterpart to dNeq
! http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
! https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
!--------------------------------------------------------------------------------------------------
logical elemental pure function dEq(a,b,tol)
@ -187,7 +182,7 @@ end function dEq
!--------------------------------------------------------------------------------------------------
!> @brief inequality comparison for float with double precision
! replaces "!=" but for certain (relative) tolerance. Counterpart to dEq
! http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
! https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
!--------------------------------------------------------------------------------------------------
logical elemental pure function dNeq(a,b,tol)
@ -201,9 +196,9 @@ end function dNeq
!--------------------------------------------------------------------------------------------------
!> @brief equality to 0comparison for float with double precision
! replaces "==0" but for certain (relative) tolerance. Counterpart to dNeq0
! http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
!> @brief equality to 0 comparison for float with double precision
! replaces "==0" but for certain (absolute) tolerance. Counterpart to dNeq0
! https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
!--------------------------------------------------------------------------------------------------
logical elemental pure function dEq0(a,tol)
@ -212,14 +207,14 @@ logical elemental pure function dEq0(a,tol)
real(pReal), intent(in), optional :: tol
real(pReal), parameter :: eps = 2.220446049250313E-16 ! DBL_EPSILON in C
dEq0 = merge(.True., .False.,abs(a) <= merge(tol,eps,present(tol))*abs(a))
dEq0 = merge(.True., .False.,abs(a) <= merge(tol,eps,present(tol))*10.0_pReal)
end function dEq0
!--------------------------------------------------------------------------------------------------
!> @brief inequality comparison to 0 for float with double precision
! replaces "!=0" but for certain (relative) tolerance. Counterpart to dEq0
! http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
!> @brief inequality to 0 comparison for float with double precision
! replaces "!=0" but for certain (absolute) tolerance. Counterpart to dEq0
! https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
!--------------------------------------------------------------------------------------------------
logical elemental pure function dNeq0(a,tol)
@ -228,14 +223,14 @@ logical elemental pure function dNeq0(a,tol)
real(pReal), intent(in), optional :: tol
real(pReal), parameter :: eps = 2.220446049250313E-16 ! DBL_EPSILON in C
dNeq0 = merge(.False., .True.,abs(a) <= merge(tol,eps,present(tol))*abs(a))
dNeq0 = merge(.False., .True.,abs(a) <= merge(tol,eps,present(tol))*10.0_pReal)
end function dNeq0
!--------------------------------------------------------------------------------------------------
!> @brief equality comparison for complex with double precision
! replaces "==" but for certain (relative) tolerance. Counterpart to cNeq
! http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
! https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
! probably a component wise comparison would be more accurate than the comparsion of the absolute
! value
!--------------------------------------------------------------------------------------------------
@ -253,7 +248,7 @@ end function cEq
!--------------------------------------------------------------------------------------------------
!> @brief inequality comparison for complex with double precision
! replaces "!=" but for certain (relative) tolerance. Counterpart to cEq
! http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
! https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
! probably a component wise comparison would be more accurate than the comparsion of the absolute
! value
!--------------------------------------------------------------------------------------------------

View File

@ -1,6 +1,7 @@
!--------------------------------------------------------------------------------------------------
!> @author Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH
!> @brief material subroutine for thermal source due to plastic dissipation
!> @author Philip Eisenlohr, Michigan State University
!> @brief material subroutine for variable heat source
!> @details to be done
!--------------------------------------------------------------------------------------------------
module source_thermal_externalheat
@ -10,24 +11,24 @@ module source_thermal_externalheat
implicit none
private
integer(pInt), dimension(:), allocatable, public, protected :: &
integer(pInt), dimension(:), allocatable, public, protected :: &
source_thermal_externalheat_sizePostResults, & !< cumulative size of post results
source_thermal_externalheat_offset, & !< which source is my current thermal dissipation mechanism?
source_thermal_externalheat_instance !< instance of thermal dissipation source mechanism
integer(pInt), dimension(:,:), allocatable, target, public :: &
integer(pInt), dimension(:,:), allocatable, target, public :: &
source_thermal_externalheat_sizePostResult !< size of each post result output
character(len=64), dimension(:,:), allocatable, target, public :: &
character(len=64), dimension(:,:), allocatable, target, public :: &
source_thermal_externalheat_output !< name of each post result output
integer(pInt), dimension(:), allocatable, target, public :: &
integer(pInt), dimension(:), allocatable, target, public :: &
source_thermal_externalheat_Noutput !< number of outputs per instance of this source
integer(pInt), dimension(:), allocatable, private :: &
integer(pInt), dimension(:), allocatable, private :: &
source_thermal_externalheat_nIntervals
real(pReal), dimension(:,:), allocatable, private :: &
real(pReal), dimension(:,:), allocatable, private :: &
source_thermal_externalheat_time, &
source_thermal_externalheat_rate
@ -136,23 +137,26 @@ subroutine source_thermal_externalheat_init(fileUnit)
if (phase > 0_pInt ) then; if (any(phase_source(:,phase) == SOURCE_thermal_externalheat_ID)) then ! do not short-circuit here (.and. with next if statemen). It's not safe in Fortran
instance = source_thermal_externalheat_instance(phase) ! which instance of my source is present phase
instance = source_thermal_externalheat_instance(phase) ! which instance of my source is present phase
chunkPos = IO_stringPos(line)
tag = IO_lc(IO_stringValue(line,chunkPos,1_pInt)) ! extract key
tag = IO_lc(IO_stringValue(line,chunkPos,1_pInt)) ! extract key
select case(tag)
case ('externalheat_time')
case ('externalheat_time','externalheat_rate')
if (chunkPos(1) <= 2_pInt) &
call IO_error(150_pInt,ext_msg=trim(tag)//' ('//SOURCE_thermal_externalheat_label//')')
if ( source_thermal_externalheat_nIntervals(instance) > 0_pInt &
.and. source_thermal_externalheat_nIntervals(instance) /= chunkPos(1) - 2_pInt) &
call IO_error(150_pInt,ext_msg=trim(tag)//' ('//SOURCE_thermal_externalheat_label//')')
source_thermal_externalheat_nIntervals(instance) = chunkPos(1) - 2_pInt
do interval = 1, source_thermal_externalheat_nIntervals(instance) + 1_pInt
temp_time(instance, interval) = IO_floatValue(line,chunkPos,1_pInt + interval)
select case(tag)
case ('externalheat_time')
temp_time(instance, interval) = IO_floatValue(line,chunkPos,1_pInt + interval)
case ('externalheat_rate')
temp_rate(instance, interval) = IO_floatValue(line,chunkPos,1_pInt + interval)
end select
enddo
case ('externalheat_rate')
do interval = 1, source_thermal_externalheat_nIntervals(instance) + 1_pInt
temp_rate(instance, interval) = IO_floatValue(line,chunkPos,1_pInt + interval)
enddo
end select
endif; endif
enddo parsingFile
@ -162,13 +166,13 @@ subroutine source_thermal_externalheat_init(fileUnit)
initializeInstances: do phase = 1_pInt, material_Nphase
if (any(phase_source(:,phase) == SOURCE_thermal_externalheat_ID)) then
NofMyPhase=count(material_phase==phase)
NofMyPhase = count(material_phase==phase)
instance = source_thermal_externalheat_instance(phase)
sourceOffset = source_thermal_externalheat_offset(phase)
source_thermal_externalheat_time(instance,1:source_thermal_externalheat_nIntervals(instance)+1_pInt) = &
temp_time(instance,1:source_thermal_externalheat_nIntervals(instance)+1_pInt)
temp_time(instance,1:source_thermal_externalheat_nIntervals(instance)+1_pInt)
source_thermal_externalheat_rate(instance,1:source_thermal_externalheat_nIntervals(instance)+1_pInt) = &
temp_rate(instance,1:source_thermal_externalheat_nIntervals(instance)+1_pInt)
temp_rate(instance,1:source_thermal_externalheat_nIntervals(instance)+1_pInt)
sizeDotState = 1_pInt
sizeDeltaState = 0_pInt
@ -200,7 +204,8 @@ subroutine source_thermal_externalheat_init(fileUnit)
end subroutine source_thermal_externalheat_init
!--------------------------------------------------------------------------------------------------
!> @brief calculates derived quantities from state
!> @brief rate of change of state
!> @details state only contains current time to linearly interpolate given heat powers
!--------------------------------------------------------------------------------------------------
subroutine source_thermal_externalheat_dotState(ipc, ip, el)
use material, only: &
@ -221,12 +226,12 @@ subroutine source_thermal_externalheat_dotState(ipc, ip, el)
constituent = phasememberAt(ipc,ip,el)
sourceOffset = source_thermal_externalheat_offset(phase)
sourceState(phase)%p(sourceOffset)%dotState(1,constituent) = 1.0_pReal
sourceState(phase)%p(sourceOffset)%dotState(1,constituent) = 1.0_pReal ! state is current time
end subroutine source_thermal_externalheat_dotState
!--------------------------------------------------------------------------------------------------
!> @brief returns local vacancy generation rate
!> @brief returns local heat generation rate
!--------------------------------------------------------------------------------------------------
subroutine source_thermal_externalheat_getRateAndItsTangent(TDot, dTDot_dT, ipc, ip, el)
use material, only: &
@ -244,21 +249,24 @@ subroutine source_thermal_externalheat_getRateAndItsTangent(TDot, dTDot_dT, ipc,
integer(pInt) :: &
instance, phase, constituent, sourceOffset, interval
real(pReal) :: &
norm_time
frac_time
phase = phaseAt(ipc,ip,el)
constituent = phasememberAt(ipc,ip,el)
instance = source_thermal_externalheat_instance(phase)
sourceOffset = source_thermal_externalheat_offset(phase)
do interval = 1, source_thermal_externalheat_nIntervals(instance)
norm_time = (sourceState(phase)%p(sourceOffset)%state(1,constituent) - &
do interval = 1, source_thermal_externalheat_nIntervals(instance) ! scan through all rate segments
frac_time = (sourceState(phase)%p(sourceOffset)%state(1,constituent) - &
source_thermal_externalheat_time(instance,interval)) / &
(source_thermal_externalheat_time(instance,interval+1) - &
source_thermal_externalheat_time(instance,interval))
if (norm_time >= 0.0_pReal .and. norm_time < 1.0_pReal) &
TDot = source_thermal_externalheat_rate(instance,interval ) * (1.0_pReal - norm_time) + &
source_thermal_externalheat_rate(instance,interval+1) * norm_time
source_thermal_externalheat_time(instance,interval)) ! fractional time within segment
if ( (frac_time < 0.0_pReal .and. interval == 1) &
.or. (frac_time >= 1.0_pReal .and. interval == source_thermal_externalheat_nIntervals(instance)) &
.or. (frac_time >= 0.0_pReal .and. frac_time < 1.0_pReal) ) &
TDot = source_thermal_externalheat_rate(instance,interval ) * (1.0_pReal - frac_time) + &
source_thermal_externalheat_rate(instance,interval+1) * frac_time ! interpolate heat rate between segment boundaries...
! ...or extrapolate if outside of bounds
enddo
dTDot_dT = 0.0

View File

@ -81,7 +81,6 @@ subroutine spectral_damage_init()
DM :: damage_grid
Vec :: uBound, lBound
PetscErrorCode :: ierr
PetscObject :: dummy
character(len=100) :: snes_type
external :: &
@ -99,11 +98,9 @@ subroutine spectral_damage_init()
DMRestoreGlobalVector, &
SNESVISetVariableBounds
mainProcess: if (worldrank == 0_pInt) then
write(6,'(/,a)') ' <<<+- spectral_damage init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- spectral_damage init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
!--------------------------------------------------------------------------------------------------
! initialize solver specific parts of PETSc
@ -124,7 +121,8 @@ subroutine spectral_damage_init()
CHKERRQ(ierr)
call SNESSetDM(damage_snes,damage_grid,ierr); CHKERRQ(ierr) !< connect snes to da
call DMCreateGlobalVector(damage_grid,solution,ierr); CHKERRQ(ierr) !< global solution vector (grid x 1, i.e. every def grad tensor)
call DMDASNESSetFunctionLocal(damage_grid,INSERT_VALUES,spectral_damage_formResidual,dummy,ierr) !< residual vector of same shape as solution vector
call DMDASNESSetFunctionLocal(damage_grid,INSERT_VALUES,spectral_damage_formResidual,&
PETSC_NULL_OBJECT,ierr) !< residual vector of same shape as solution vector
CHKERRQ(ierr)
call SNESSetFromOptions(damage_snes,ierr); CHKERRQ(ierr) !< pull it all together with additional cli arguments
call SNESGetType(damage_snes,snes_type,ierr); CHKERRQ(ierr)
@ -171,7 +169,7 @@ end subroutine spectral_damage_init
!--------------------------------------------------------------------------------------------------
!> @brief solution for the spectral damage scheme with internal iterations
!--------------------------------------------------------------------------------------------------
type(tSolutionState) function spectral_damage_solution(guess,timeinc,timeinc_old,loadCaseTime)
type(tSolutionState) function spectral_damage_solution(timeinc,timeinc_old,loadCaseTime)
use numerics, only: &
itmax, &
err_damage_tolAbs, &
@ -190,7 +188,6 @@ type(tSolutionState) function spectral_damage_solution(guess,timeinc,timeinc_old
timeinc, & !< increment in time for current solution
timeinc_old, & !< increment in time of last increment
loadCaseTime !< remaining time of current load case
logical, intent(in) :: guess
integer(pInt) :: i, j, k, cell
PetscInt ::position
PetscReal :: minDamage, maxDamage, stagNorm, solnNorm
@ -283,10 +280,10 @@ subroutine spectral_damage_formResidual(in,x_scal,f_scal,dummy,ierr)
DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: &
in
PetscScalar, dimension( &
XG_RANGE,YG_RANGE,ZG_RANGE) :: &
XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: &
x_scal
PetscScalar, dimension( &
X_RANGE,Y_RANGE,Z_RANGE) :: &
X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: &
f_scal
PetscObject :: dummy
PetscErrorCode :: ierr
@ -341,7 +338,7 @@ end subroutine spectral_damage_formResidual
!--------------------------------------------------------------------------------------------------
!> @brief spectral damage forwarding routine
!--------------------------------------------------------------------------------------------------
subroutine spectral_damage_forward(guess,timeinc,timeinc_old,loadCaseTime)
subroutine spectral_damage_forward()
use mesh, only: &
grid, &
grid3
@ -354,11 +351,6 @@ subroutine spectral_damage_forward(guess,timeinc,timeinc_old,loadCaseTime)
damage_nonlocal_getMobility
implicit none
real(pReal), intent(in) :: &
timeinc_old, &
timeinc, &
loadCaseTime !< remaining time of current load case
logical, intent(in) :: guess
integer(pInt) :: i, j, k, cell
DM :: dm_local
PetscScalar, dimension(:,:,:), pointer :: x_scal

View File

@ -89,7 +89,7 @@ subroutine DAMASK_interface_init()
call PetscInitialize(PETSC_NULL_CHARACTER,ierr) ! according to PETSc manual, that should be the first line in the code
CHKERRQ(ierr) ! this is a macro definition, it is case sensitive
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
call MPI_Comm_size(MPI_COMM_WORLD, worldsize, ierr);CHKERRQ(ierr)
call MPI_Comm_size(PETSC_COMM_WORLD,worldsize,ierr);CHKERRQ(ierr)
mainProcess: if (worldrank == 0) then
if (output_unit /= 6) then
write(output_unit,'(a)') ' STDOUT != 6'
@ -152,7 +152,7 @@ subroutine DAMASK_interface_init()
write(6,'(a)') ' Make sure the file "material.config" exists in the working'
write(6,'(a)') ' directory.'
write(6,'(a)') ' For further configuration place "numerics.config"'
write(6,'(a)')' and "numerics.config" in that directory.'
write(6,'(a)')' and "debug.config" in that directory.'
write(6,'(/,a)')' --restart XX'
write(6,'(a)') ' Reads in total increment No. XX-1 and continues to'
write(6,'(a)') ' calculate total increment No. XX.'

View File

@ -49,7 +49,7 @@ module spectral_mech_AL
F_av = 0.0_pReal, & !< average incompatible def grad field
P_av = 0.0_pReal, & !< average 1st Piola--Kirchhoff stress
P_avLastEval = 0.0_pReal !< average 1st Piola--Kirchhoff stress last call of CPFEM_general
character(len=1024), private :: incInfo !< time and increment information
character(len=1024), private :: incInfo !< time and increment information
real(pReal), private, dimension(3,3,3,3) :: &
C_volAvg = 0.0_pReal, & !< current volume average stiffness
C_volAvgLastInc = 0.0_pReal, & !< previous volume average stiffness
@ -57,7 +57,7 @@ module spectral_mech_AL
S = 0.0_pReal, & !< current compliance (filled up with zeros)
C_scale = 0.0_pReal, &
S_scale = 0.0_pReal
real(pReal), private :: &
err_BC, & !< deviation from stress BC
err_curl, & !< RMS of curl of F
@ -116,7 +116,6 @@ subroutine AL_init
temp33_Real = 0.0_pReal
PetscErrorCode :: ierr
PetscObject :: dummy
PetscScalar, pointer, dimension(:,:,:,:) :: xx_psc, F, F_lambda
integer(pInt), dimension(:), allocatable :: localK
integer(pInt) :: proc
@ -133,11 +132,9 @@ subroutine AL_init
SNESSetConvergenceTest, &
SNESSetFromOptions
mainProcess: if (worldrank == 0_pInt) then
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverAL init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverAL init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
!--------------------------------------------------------------------------------------------------
! allocate global fields
@ -165,9 +162,9 @@ subroutine AL_init
CHKERRQ(ierr)
call SNESSetDM(snes,da,ierr); CHKERRQ(ierr)
call DMCreateGlobalVector(da,solution_vec,ierr); CHKERRQ(ierr)
call DMDASNESSetFunctionLocal(da,INSERT_VALUES,AL_formResidual,dummy,ierr)
call DMDASNESSetFunctionLocal(da,INSERT_VALUES,AL_formResidual,PETSC_NULL_OBJECT,ierr)
CHKERRQ(ierr)
call SNESSetConvergenceTest(snes,AL_converged,dummy,PETSC_NULL_FUNCTION,ierr)
call SNESSetConvergenceTest(snes,AL_converged,PETSC_NULL_OBJECT,PETSC_NULL_FUNCTION,ierr)
CHKERRQ(ierr)
call SNESSetFromOptions(snes,ierr); CHKERRQ(ierr)
@ -245,7 +242,7 @@ end subroutine AL_init
!> @brief solution for the AL scheme with internal iterations
!--------------------------------------------------------------------------------------------------
type(tSolutionState) function &
AL_solution(incInfoIn,guess,timeinc,timeinc_old,loadCaseTime,P_BC,F_BC,rotation_BC)
AL_solution(incInfoIn,timeinc,timeinc_old,stress_BC,rotation_BC)
use IO, only: &
IO_error
use numerics, only: &
@ -266,13 +263,9 @@ type(tSolutionState) function &
! input data for solution
real(pReal), intent(in) :: &
timeinc, & !< increment in time for current solution
timeinc_old, & !< increment in time of last increment
loadCaseTime !< remaining time of current load case
logical, intent(in) :: &
guess
timeinc_old !< increment in time of last increment
type(tBoundaryCondition), intent(in) :: &
P_BC, &
F_BC
stress_BC
character(len=*), intent(in) :: &
incInfoIn
real(pReal), dimension(3,3), intent(in) :: rotation_BC
@ -290,7 +283,7 @@ type(tSolutionState) function &
!--------------------------------------------------------------------------------------------------
! update stiffness (and gamma operator)
S = Utilities_maskedCompliance(rotation_BC,P_BC%maskLogical,C_volAvg)
S = Utilities_maskedCompliance(rotation_BC,stress_BC%maskLogical,C_volAvg)
if (update_gamma) then
call Utilities_updateGamma(C_minMaxAvg,restartWrite)
C_scale = C_minMaxAvg
@ -299,11 +292,11 @@ type(tSolutionState) function &
!--------------------------------------------------------------------------------------------------
! set module wide availabe data
mask_stress = P_BC%maskFloat
params%P_BC = P_BC%values
mask_stress = stress_BC%maskFloat
params%stress_BC = stress_BC%values
params%rotation_BC = rotation_BC
params%timeinc = timeinc
params%timeincOld = timeinc_old
params%timeinc = timeinc
params%timeincOld = timeinc_old
!--------------------------------------------------------------------------------------------------
! solve BVP
@ -331,8 +324,7 @@ subroutine AL_formResidual(in,x_scal,f_scal,dummy,ierr)
itmax, &
itmin, &
polarAlpha, &
polarBeta, &
worldrank
polarBeta
use mesh, only: &
grid3, &
grid
@ -369,10 +361,10 @@ subroutine AL_formResidual(in,x_scal,f_scal,dummy,ierr)
DMDA_LOCAL_INFO_SIZE) :: &
in
PetscScalar, target, dimension(3,3,2, &
XG_RANGE,YG_RANGE,ZG_RANGE) :: &
XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: &
x_scal
PetscScalar, target, dimension(3,3,2, &
X_RANGE,Y_RANGE,Z_RANGE) :: &
X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: &
f_scal
PetscScalar, pointer, dimension(:,:,:,:,:) :: &
F, &
@ -411,16 +403,14 @@ subroutine AL_formResidual(in,x_scal,f_scal,dummy,ierr)
!--------------------------------------------------------------------------------------------------
! report begin of new iteration
totalIter = totalIter + 1_pInt
if (worldrank == 0_pInt) then
write(6,'(1x,a,3(a,'//IO_intOut(itmax)//'))') trim(incInfo), &
' @ Iteration ', itmin, '≤',totalIter, '≤', itmax
if (iand(debug_level(debug_spectral),debug_spectralRotation) /= 0) &
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim (lab) =', &
math_transpose33(math_rotate_backward33(F_aim,params%rotation_BC))
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim =', &
math_transpose33(F_aim)
flush(6)
endif
write(6,'(1x,a,3(a,'//IO_intOut(itmax)//'))') trim(incInfo), &
' @ Iteration ', itmin, '≤',totalIter, '≤', itmax
if (iand(debug_level(debug_spectral),debug_spectralRotation) /= 0) &
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim (lab) =', &
math_transpose33(math_rotate_backward33(F_aim,params%rotation_BC))
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim =', &
math_transpose33(F_aim)
flush(6)
endif newIteration
!--------------------------------------------------------------------------------------------------
@ -495,8 +485,7 @@ subroutine AL_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,dummy,ierr
err_curl_tolRel, &
err_curl_tolAbs, &
err_stress_tolAbs, &
err_stress_tolRel, &
worldrank
err_stress_tolRel
use math, only: &
math_mul3333xx33
use FEsolving, only: &
@ -519,9 +508,9 @@ subroutine AL_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,dummy,ierr
!--------------------------------------------------------------------------------------------------
! stress BC handling
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%P_BC))) ! S = 0.0 for no bc
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%stress_BC))) ! S = 0.0 for no bc
err_BC = maxval(abs((-mask_stress+1.0_pReal)*math_mul3333xx33(C_scale,F_aim-F_av) + &
mask_stress *(P_av - params%P_BC))) ! mask = 0.0 for no bc
mask_stress *(P_av - params%stress_BC))) ! mask = 0.0 for no bc
!--------------------------------------------------------------------------------------------------
! error calculation
@ -543,24 +532,22 @@ subroutine AL_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,dummy,ierr
!--------------------------------------------------------------------------------------------------
! report
if (worldrank == 0_pInt) then
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(/,a,f12.2,a,es8.2,a,es9.2,a)') ' error curl = ', &
err_curl/curlTol,' (',err_curl,' -, tol =',curlTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div, ' / m, tol =',divTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)
endif
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(/,a,f12.2,a,es8.2,a,es9.2,a)') ' error curl = ', &
err_curl/curlTol,' (',err_curl,' -, tol =',curlTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div, ' / m, tol =',divTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)
end subroutine AL_converged
!--------------------------------------------------------------------------------------------------
!> @brief forwarding routine
!--------------------------------------------------------------------------------------------------
subroutine AL_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,rotation_BC)
subroutine AL_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation_BC,stress_BC,rotation_BC)
use math, only: &
math_mul33x33, &
math_mul3333xx33, &
@ -588,8 +575,8 @@ subroutine AL_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,rotation_
timeinc, &
loadCaseTime !< remaining time of current load case
type(tBoundaryCondition), intent(in) :: &
P_BC, &
F_BC
stress_BC, &
deformation_BC
real(pReal), dimension(3,3), intent(in) :: rotation_BC
logical, intent(in) :: &
guess
@ -605,21 +592,19 @@ subroutine AL_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,rotation_
F => xx_psc(0:8,:,:,:)
F_lambda => xx_psc(9:17,:,:,:)
if (restartWrite) then
if (worldrank == 0_pInt) then
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
endif
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
write(rankStr,'(a1,i0)')'_',worldrank
call IO_write_jobRealFile(777,'F'//trim(rankStr),size(F)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F'//trim(rankStr),size(F)) ! writing deformation gradient field to file
write (777,rec=1) F
close (777)
call IO_write_jobRealFile(777,'F_lastInc'//trim(rankStr),size(F_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lastInc'//trim(rankStr),size(F_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lastInc
close (777)
call IO_write_jobRealFile(777,'F_lambda'//trim(rankStr),size(F_lambda)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F_lambda'//trim(rankStr),size(F_lambda)) ! writing deformation gradient field to file
write (777,rec=1) F_lambda
close (777)
call IO_write_jobRealFile(777,'F_lambda_lastInc'//trim(rankStr),size(F_lambda_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lambda_lastInc'//trim(rankStr),size(F_lambda_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lambda_lastInc
close (777)
if (worldrank == 0_pInt) then
@ -653,14 +638,14 @@ subroutine AL_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,rotation_
C_volAvgLastInc = C_volAvg
!--------------------------------------------------------------------------------------------------
! calculate rate for aim
if (F_BC%myType=='l') then ! calculate f_aimDot from given L and current F
f_aimDot = F_BC%maskFloat * math_mul33x33(F_BC%values, F_aim)
elseif(F_BC%myType=='fdot') then ! f_aimDot is prescribed
f_aimDot = F_BC%maskFloat * F_BC%values
elseif(F_BC%myType=='f') then ! aim at end of load case is prescribed
f_aimDot = F_BC%maskFloat * (F_BC%values -F_aim)/loadCaseTime
if (deformation_BC%myType=='l') then ! calculate f_aimDot from given L and current F
f_aimDot = deformation_BC%maskFloat * math_mul33x33(deformation_BC%values, F_aim)
elseif(deformation_BC%myType=='fdot') then ! f_aimDot is prescribed
f_aimDot = deformation_BC%maskFloat * deformation_BC%values
elseif(deformation_BC%myType=='f') then ! aim at end of load case is prescribed
f_aimDot = deformation_BC%maskFloat * (deformation_BC%values -F_aim)/loadCaseTime
endif
if (guess) f_aimDot = f_aimDot + P_BC%maskFloat * (F_aim - F_aim_lastInc)/timeinc_old
if (guess) f_aimDot = f_aimDot + stress_BC%maskFloat * (F_aim - F_aim_lastInc)/timeinc_old
F_aim_lastInc = F_aim
!--------------------------------------------------------------------------------------------------

View File

@ -105,7 +105,6 @@ subroutine basicPETSc_init
temp33_Real = 0.0_pReal
PetscErrorCode :: ierr
PetscObject :: dummy
PetscScalar, pointer, dimension(:,:,:,:) :: F
integer(pInt), dimension(:), allocatable :: localK
@ -123,11 +122,9 @@ subroutine basicPETSc_init
SNESSetConvergenceTest, &
SNESSetFromOptions
mainProcess: if (worldrank == 0_pInt) then
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasicPETSc init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasicPETSc init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
!--------------------------------------------------------------------------------------------------
! allocate global fields
@ -153,10 +150,10 @@ subroutine basicPETSc_init
CHKERRQ(ierr)
call SNESSetDM(snes,da,ierr); CHKERRQ(ierr)
call DMCreateGlobalVector(da,solution_vec,ierr); CHKERRQ(ierr) ! global solution vector (grid x 9, i.e. every def grad tensor)
call DMDASNESSetFunctionLocal(da,INSERT_VALUES,BasicPETSC_formResidual,dummy,ierr) ! residual vector of same shape as solution vector
call DMDASNESSetFunctionLocal(da,INSERT_VALUES,BasicPETSC_formResidual,PETSC_NULL_OBJECT,ierr) ! residual vector of same shape as solution vector
CHKERRQ(ierr)
call SNESSetDM(snes,da,ierr); CHKERRQ(ierr) ! connect snes to da
call SNESSetConvergenceTest(snes,BasicPETSC_converged,dummy,PETSC_NULL_FUNCTION,ierr) ! specify custom convergence check function "_converged"
call SNESSetConvergenceTest(snes,BasicPETSC_converged,PETSC_NULL_OBJECT,PETSC_NULL_FUNCTION,ierr) ! specify custom convergence check function "_converged"
CHKERRQ(ierr)
call SNESSetFromOptions(snes,ierr); CHKERRQ(ierr) ! pull it all together with additional cli arguments
@ -165,7 +162,7 @@ subroutine basicPETSc_init
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr) ! get the data out of PETSc to work with
restart: if (restartInc > 1_pInt) then
if (iand(debug_level(debug_spectral),debug_spectralRestart)/= 0 .and. worldrank == 0_pInt) &
if (iand(debug_level(debug_spectral),debug_spectralRestart)/= 0) &
write(6,'(/,a,'//IO_intOut(restartInc-1_pInt)//',a)') &
'reading values of increment ', restartInc - 1_pInt, ' from file'
flush(6)
@ -220,7 +217,7 @@ end subroutine basicPETSc_init
!> @brief solution for the Basic PETSC scheme with internal iterations
!--------------------------------------------------------------------------------------------------
type(tSolutionState) function &
basicPETSc_solution(incInfoIn,guess,timeinc,timeinc_old,loadCaseTime,P_BC,F_BC,rotation_BC)
basicPETSc_solution(incInfoIn,timeinc,timeinc_old,stress_BC,rotation_BC)
use IO, only: &
IO_error
use numerics, only: &
@ -239,13 +236,9 @@ type(tSolutionState) function &
! input data for solution
real(pReal), intent(in) :: &
timeinc, & !< increment in time for current solution
timeinc_old, & !< increment in time of last increment
loadCaseTime !< remaining time of current load case
logical, intent(in) :: &
guess
timeinc_old !< increment in time of last increment
type(tBoundaryCondition), intent(in) :: &
P_BC, &
F_BC
stress_BC
character(len=*), intent(in) :: &
incInfoIn
real(pReal), dimension(3,3), intent(in) :: rotation_BC
@ -263,17 +256,17 @@ type(tSolutionState) function &
!--------------------------------------------------------------------------------------------------
! update stiffness (and gamma operator)
S = Utilities_maskedCompliance(rotation_BC,P_BC%maskLogical,C_volAvg)
S = Utilities_maskedCompliance(rotation_BC,stress_BC%maskLogical,C_volAvg)
if (update_gamma) call Utilities_updateGamma(C_minmaxAvg,restartWrite)
!--------------------------------------------------------------------------------------------------
! set module wide availabe data
mask_stress = P_BC%maskFloat
params%P_BC = P_BC%values
mask_stress = stress_BC%maskFloat
params%stress_BC = stress_BC%values
params%rotation_BC = rotation_BC
params%timeinc = timeinc
params%timeincOld = timeinc_old
params%timeinc = timeinc
params%timeincOld = timeinc_old
!--------------------------------------------------------------------------------------------------
! solve BVP
@ -301,8 +294,6 @@ subroutine BasicPETSC_formResidual(in,x_scal,f_scal,dummy,ierr)
use numerics, only: &
itmax, &
itmin
use numerics, only: &
worldrank
use mesh, only: &
grid, &
grid3
@ -331,10 +322,10 @@ subroutine BasicPETSC_formResidual(in,x_scal,f_scal,dummy,ierr)
DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: &
in
PetscScalar, dimension(3,3, &
XG_RANGE,YG_RANGE,ZG_RANGE) :: &
XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: &
x_scal
PetscScalar, dimension(3,3, &
X_RANGE,Y_RANGE,Z_RANGE) :: &
X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: &
f_scal
PetscInt :: &
PETScIter, &
@ -354,16 +345,14 @@ subroutine BasicPETSC_formResidual(in,x_scal,f_scal,dummy,ierr)
!--------------------------------------------------------------------------------------------------
! report begin of new iteration
totalIter = totalIter + 1_pInt
if (worldrank == 0_pInt) then
write(6,'(1x,a,3(a,'//IO_intOut(itmax)//'))') trim(incInfo), &
' @ Iteration ', itmin, '≤',totalIter, '≤', itmax
if (iand(debug_level(debug_spectral),debug_spectralRotation) /= 0) &
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim (lab) =', &
math_transpose33(math_rotate_backward33(F_aim,params%rotation_BC))
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim =', &
math_transpose33(F_aim)
flush(6)
endif
write(6,'(1x,a,3(a,'//IO_intOut(itmax)//'))') trim(incInfo), &
' @ Iteration ', itmin, '≤',totalIter, '≤', itmax
if (iand(debug_level(debug_spectral),debug_spectralRotation) /= 0) &
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim (lab) =', &
math_transpose33(math_rotate_backward33(F_aim,params%rotation_BC))
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim =', &
math_transpose33(F_aim)
flush(6)
endif newIteration
!--------------------------------------------------------------------------------------------------
@ -376,8 +365,8 @@ subroutine BasicPETSC_formResidual(in,x_scal,f_scal,dummy,ierr)
!--------------------------------------------------------------------------------------------------
! stress BC handling
F_aim_lastIter = F_aim
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%P_BC))) ! S = 0.0 for no bc
err_stress = maxval(abs(mask_stress * (P_av - params%P_BC))) ! mask = 0.0 for no bc
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%stress_BC))) ! S = 0.0 for no bc
err_stress = maxval(abs(mask_stress * (P_av - params%stress_BC))) ! mask = 0.0 for no bc
!--------------------------------------------------------------------------------------------------
! updated deformation gradient using fix point algorithm of basic scheme
@ -405,8 +394,7 @@ subroutine BasicPETSc_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,du
err_div_tolRel, &
err_div_tolAbs, &
err_stress_tolRel, &
err_stress_tolAbs, &
worldrank
err_stress_tolAbs
use FEsolving, only: &
terminallyIll
@ -440,22 +428,20 @@ subroutine BasicPETSc_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,du
!--------------------------------------------------------------------------------------------------
! report
if (worldrank == 0_pInt) then
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(1/,a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div,' / m, tol =',divTol,')'
write(6,'(a,f12.2,a,es8.2,a,es9.2,a)') ' error stress BC = ', &
err_stress/stressTol, ' (',err_stress, ' Pa, tol =',stressTol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)
endif
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(1/,a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div,' / m, tol =',divTol,')'
write(6,'(a,f12.2,a,es8.2,a,es9.2,a)') ' error stress BC = ', &
err_stress/stressTol, ' (',err_stress, ' Pa, tol =',stressTol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)
end subroutine BasicPETSc_converged
!--------------------------------------------------------------------------------------------------
!> @brief forwarding routine
!--------------------------------------------------------------------------------------------------
subroutine BasicPETSc_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,rotation_BC)
subroutine BasicPETSc_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation_BC,stress_BC,rotation_BC)
use math, only: &
math_mul33x33 ,&
math_rotate_backward33
@ -481,8 +467,8 @@ subroutine BasicPETSc_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,r
timeinc, &
loadCaseTime !< remaining time of current load case
type(tBoundaryCondition), intent(in) :: &
P_BC, &
F_BC
stress_BC, &
deformation_BC
real(pReal), dimension(3,3), intent(in) :: rotation_BC
logical, intent(in) :: &
guess
@ -495,10 +481,8 @@ subroutine BasicPETSc_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,r
!--------------------------------------------------------------------------------------------------
! restart information for spectral solver
if (restartWrite) then
if (worldrank == 0_pInt) then
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
endif
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
write(rankStr,'(a1,i0)')'_',worldrank
call IO_write_jobRealFile(777,'F'//trim(rankStr),size(F)) ! writing deformation gradient field to file
write (777,rec=1) F
@ -530,14 +514,14 @@ subroutine BasicPETSc_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,r
C_volAvgLastInc = C_volAvg
!--------------------------------------------------------------------------------------------------
! calculate rate for aim
if (F_BC%myType=='l') then ! calculate f_aimDot from given L and current F
f_aimDot = F_BC%maskFloat * math_mul33x33(F_BC%values, F_aim)
elseif(F_BC%myType=='fdot') then ! f_aimDot is prescribed
f_aimDot = F_BC%maskFloat * F_BC%values
elseif(F_BC%myType=='f') then ! aim at end of load case is prescribed
f_aimDot = F_BC%maskFloat * (F_BC%values -F_aim)/loadCaseTime
if (deformation_BC%myType=='l') then ! calculate f_aimDot from given L and current F
f_aimDot = deformation_BC%maskFloat * math_mul33x33(deformation_BC%values, F_aim)
elseif(deformation_BC%myType=='fdot') then ! f_aimDot is prescribed
f_aimDot = deformation_BC%maskFloat * deformation_BC%values
elseif(deformation_BC%myType=='f') then ! aim at end of load case is prescribed
f_aimDot = deformation_BC%maskFloat * (deformation_BC%values -F_aim)/loadCaseTime
endif
if (guess) f_aimDot = f_aimDot + P_BC%maskFloat * (F_aim - F_aim_lastInc)/timeinc_old
if (guess) f_aimDot = f_aimDot + stress_BC%maskFloat * (F_aim - F_aim_lastInc)/timeinc_old
F_aim_lastInc = F_aim
!--------------------------------------------------------------------------------------------------
@ -552,8 +536,8 @@ subroutine BasicPETSc_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,r
!--------------------------------------------------------------------------------------------------
! update local deformation gradient
F = reshape(Utilities_forwardField(timeinc,F_lastInc,Fdot, & ! ensure that it matches rotated F_aim
math_rotate_backward33(F_aim,rotation_BC)),[9,grid(1),grid(2),grid3])
F = reshape(Utilities_forwardField(timeinc,F_lastInc,Fdot, & ! ensure that it matches rotated F_aim
math_rotate_backward33(F_aim,rotation_BC)),[9,grid(1),grid(2),grid3])
call DMDAVecRestoreArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr)
end subroutine BasicPETSc_forward

View File

@ -116,7 +116,6 @@ subroutine Polarisation_init
temp33_Real = 0.0_pReal
PetscErrorCode :: ierr
PetscObject :: dummy
PetscScalar, pointer, dimension(:,:,:,:) :: xx_psc, F, F_tau
integer(pInt), dimension(:), allocatable :: localK
integer(pInt) :: proc
@ -133,11 +132,9 @@ subroutine Polarisation_init
SNESSetConvergenceTest, &
SNESSetFromOptions
mainProcess: if (worldrank == 0_pInt) then
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverPolarisation init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverPolarisation init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
!--------------------------------------------------------------------------------------------------
! allocate global fields
@ -165,9 +162,9 @@ subroutine Polarisation_init
CHKERRQ(ierr)
call SNESSetDM(snes,da,ierr); CHKERRQ(ierr)
call DMCreateGlobalVector(da,solution_vec,ierr); CHKERRQ(ierr)
call DMDASNESSetFunctionLocal(da,INSERT_VALUES,Polarisation_formResidual,dummy,ierr)
call DMDASNESSetFunctionLocal(da,INSERT_VALUES,Polarisation_formResidual,PETSC_NULL_OBJECT,ierr)
CHKERRQ(ierr)
call SNESSetConvergenceTest(snes,Polarisation_converged,dummy,PETSC_NULL_FUNCTION,ierr)
call SNESSetConvergenceTest(snes,Polarisation_converged,PETSC_NULL_OBJECT,PETSC_NULL_FUNCTION,ierr)
CHKERRQ(ierr)
call SNESSetFromOptions(snes,ierr); CHKERRQ(ierr)
@ -177,7 +174,7 @@ subroutine Polarisation_init
F => xx_psc(0:8,:,:,:)
F_tau => xx_psc(9:17,:,:,:)
restart: if (restartInc > 1_pInt) then
if (iand(debug_level(debug_spectral),debug_spectralRestart)/= 0 .and. worldrank == 0_pInt) &
if (iand(debug_level(debug_spectral),debug_spectralRestart)/= 0) &
write(6,'(/,a,'//IO_intOut(restartInc-1_pInt)//',a)') &
'reading values of increment ', restartInc - 1_pInt, ' from file'
flush(6)
@ -245,7 +242,7 @@ end subroutine Polarisation_init
!> @brief solution for the Polarisation scheme with internal iterations
!--------------------------------------------------------------------------------------------------
type(tSolutionState) function &
Polarisation_solution(incInfoIn,guess,timeinc,timeinc_old,loadCaseTime,P_BC,F_BC,rotation_BC)
Polarisation_solution(incInfoIn,timeinc,timeinc_old,stress_BC,rotation_BC)
use IO, only: &
IO_error
use numerics, only: &
@ -266,13 +263,9 @@ type(tSolutionState) function &
! input data for solution
real(pReal), intent(in) :: &
timeinc, & !< increment in time for current solution
timeinc_old, & !< increment in time of last increment
loadCaseTime !< remaining time of current load case
logical, intent(in) :: &
guess
timeinc_old !< increment in time of last increment
type(tBoundaryCondition), intent(in) :: &
P_BC, &
F_BC
stress_BC
character(len=*), intent(in) :: &
incInfoIn
real(pReal), dimension(3,3), intent(in) :: rotation_BC
@ -290,7 +283,7 @@ type(tSolutionState) function &
!--------------------------------------------------------------------------------------------------
! update stiffness (and gamma operator)
S = Utilities_maskedCompliance(rotation_BC,P_BC%maskLogical,C_volAvg)
S = Utilities_maskedCompliance(rotation_BC,stress_BC%maskLogical,C_volAvg)
if (update_gamma) then
call Utilities_updateGamma(C_minMaxAvg,restartWrite)
C_scale = C_minMaxAvg
@ -299,11 +292,11 @@ type(tSolutionState) function &
!--------------------------------------------------------------------------------------------------
! set module wide availabe data
mask_stress = P_BC%maskFloat
params%P_BC = P_BC%values
mask_stress = stress_BC%maskFloat
params%stress_BC = stress_BC%values
params%rotation_BC = rotation_BC
params%timeinc = timeinc
params%timeincOld = timeinc_old
params%timeinc = timeinc
params%timeincOld = timeinc_old
!--------------------------------------------------------------------------------------------------
! solve BVP
@ -331,8 +324,7 @@ subroutine Polarisation_formResidual(in,x_scal,f_scal,dummy,ierr)
itmax, &
itmin, &
polarAlpha, &
polarBeta, &
worldrank
polarBeta
use mesh, only: &
grid3, &
grid
@ -369,10 +361,10 @@ subroutine Polarisation_formResidual(in,x_scal,f_scal,dummy,ierr)
DMDA_LOCAL_INFO_SIZE) :: &
in
PetscScalar, target, dimension(3,3,2, &
XG_RANGE,YG_RANGE,ZG_RANGE) :: &
XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: &
x_scal
PetscScalar, target, dimension(3,3,2, &
X_RANGE,Y_RANGE,Z_RANGE) :: &
X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: &
f_scal
PetscScalar, pointer, dimension(:,:,:,:,:) :: &
F, &
@ -411,16 +403,14 @@ subroutine Polarisation_formResidual(in,x_scal,f_scal,dummy,ierr)
!--------------------------------------------------------------------------------------------------
! report begin of new iteration
totalIter = totalIter + 1_pInt
if (worldrank == 0_pInt) then
write(6,'(1x,a,3(a,'//IO_intOut(itmax)//'))') trim(incInfo), &
' @ Iteration ', itmin, '≤',totalIter, '≤', itmax
if (iand(debug_level(debug_spectral),debug_spectralRotation) /= 0) &
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim (lab) =', &
math_transpose33(math_rotate_backward33(F_aim,params%rotation_BC))
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim =', &
math_transpose33(F_aim)
flush(6)
endif
write(6,'(1x,a,3(a,'//IO_intOut(itmax)//'))') trim(incInfo), &
' @ Iteration ', itmin, '≤',totalIter, '≤', itmax
if (iand(debug_level(debug_spectral),debug_spectralRotation) /= 0) &
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim (lab) =', &
math_transpose33(math_rotate_backward33(F_aim,params%rotation_BC))
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' deformation gradient aim =', &
math_transpose33(F_aim)
flush(6)
endif newIteration
!--------------------------------------------------------------------------------------------------
@ -494,8 +484,7 @@ subroutine Polarisation_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,
err_curl_tolRel, &
err_curl_tolAbs, &
err_stress_tolAbs, &
err_stress_tolRel, &
worldrank
err_stress_tolRel
use math, only: &
math_mul3333xx33
use FEsolving, only: &
@ -518,9 +507,9 @@ subroutine Polarisation_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,
!--------------------------------------------------------------------------------------------------
! stress BC handling
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%P_BC))) ! S = 0.0 for no bc
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%stress_BC))) ! S = 0.0 for no bc
err_BC = maxval(abs((-mask_stress+1.0_pReal)*math_mul3333xx33(C_scale,F_aim-F_av) + &
mask_stress *(P_av - params%P_BC))) ! mask = 0.0 for no bc
mask_stress *(P_av - params%stress_BC))) ! mask = 0.0 for no bc
!--------------------------------------------------------------------------------------------------
! error calculation
@ -542,31 +531,29 @@ subroutine Polarisation_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,
!--------------------------------------------------------------------------------------------------
! report
if (worldrank == 0_pInt) then
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(/,a,f12.2,a,es8.2,a,es9.2,a)') ' error curl = ', &
err_curl/curlTol,' (',err_curl,' -, tol =',curlTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div, ' / m, tol =',divTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)
endif
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(/,a,f12.2,a,es8.2,a,es9.2,a)') ' error curl = ', &
err_curl/curlTol,' (',err_curl,' -, tol =',curlTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div, ' / m, tol =',divTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)
end subroutine Polarisation_converged
!--------------------------------------------------------------------------------------------------
!> @brief forwarding routine
!--------------------------------------------------------------------------------------------------
subroutine Polarisation_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC,rotation_BC)
subroutine Polarisation_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation_BC,stress_BC,rotation_BC)
use math, only: &
math_mul33x33, &
math_mul3333xx33, &
math_transpose33, &
math_rotate_backward33
use numerics, only: &
worldrank
worldrank
use mesh, only: &
grid3, &
grid
@ -587,8 +574,8 @@ subroutine Polarisation_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC
timeinc, &
loadCaseTime !< remaining time of current load case
type(tBoundaryCondition), intent(in) :: &
P_BC, &
F_BC
stress_BC, &
deformation_BC
real(pReal), dimension(3,3), intent(in) :: rotation_BC
logical, intent(in) :: &
guess
@ -604,19 +591,19 @@ subroutine Polarisation_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC
F => xx_psc(0:8,:,:,:)
F_tau => xx_psc(9:17,:,:,:)
if (restartWrite) then
if (worldrank == 0_pInt) write(6,'(/,a)') ' writing converged results for restart'
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
write(rankStr,'(a1,i0)')'_',worldrank
call IO_write_jobRealFile(777,'F'//trim(rankStr),size(F)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F'//trim(rankStr),size(F)) ! writing deformation gradient field to file
write (777,rec=1) F
close (777)
call IO_write_jobRealFile(777,'F_lastInc'//trim(rankStr),size(F_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lastInc'//trim(rankStr),size(F_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lastInc
close (777)
call IO_write_jobRealFile(777,'F_tau'//trim(rankStr),size(F_tau)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F_tau'//trim(rankStr),size(F_tau)) ! writing deformation gradient field to file
write (777,rec=1) F_tau
close (777)
call IO_write_jobRealFile(777,'F_tau_lastInc'//trim(rankStr),size(F_tau_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_tau_lastInc'//trim(rankStr),size(F_tau_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_tau_lastInc
close (777)
if (worldrank == 0_pInt) then
@ -650,14 +637,14 @@ subroutine Polarisation_forward(guess,timeinc,timeinc_old,loadCaseTime,F_BC,P_BC
C_volAvgLastInc = C_volAvg
!--------------------------------------------------------------------------------------------------
! calculate rate for aim
if (F_BC%myType=='l') then ! calculate f_aimDot from given L and current F
f_aimDot = F_BC%maskFloat * math_mul33x33(F_BC%values, F_aim)
elseif(F_BC%myType=='fdot') then ! f_aimDot is prescribed
f_aimDot = F_BC%maskFloat * F_BC%values
elseif(F_BC%myType=='f') then ! aim at end of load case is prescribed
f_aimDot = F_BC%maskFloat * (F_BC%values -F_aim)/loadCaseTime
if (deformation_BC%myType=='l') then ! calculate f_aimDot from given L and current F
f_aimDot = deformation_BC%maskFloat * math_mul33x33(deformation_BC%values, F_aim)
elseif(deformation_BC%myType=='fdot') then ! f_aimDot is prescribed
f_aimDot = deformation_BC%maskFloat * deformation_BC%values
elseif(deformation_BC%myType=='f') then ! aim at end of load case is prescribed
f_aimDot = deformation_BC%maskFloat * (deformation_BC%values -F_aim)/loadCaseTime
endif
if (guess) f_aimDot = f_aimDot + P_BC%maskFloat * (F_aim - F_aim_lastInc)/timeinc_old
if (guess) f_aimDot = f_aimDot + stress_BC%maskFloat * (F_aim - F_aim_lastInc)/timeinc_old
F_aim_lastInc = F_aim
!--------------------------------------------------------------------------------------------------

View File

@ -86,7 +86,6 @@ subroutine spectral_thermal_init
DM :: thermal_grid
PetscScalar, dimension(:,:,:), pointer :: x_scal
PetscErrorCode :: ierr
PetscObject :: dummy
external :: &
SNESCreate, &
@ -123,7 +122,8 @@ subroutine spectral_thermal_init
CHKERRQ(ierr)
call SNESSetDM(thermal_snes,thermal_grid,ierr); CHKERRQ(ierr) ! connect snes to da
call DMCreateGlobalVector(thermal_grid,solution ,ierr); CHKERRQ(ierr) ! global solution vector (grid x 1, i.e. every def grad tensor)
call DMDASNESSetFunctionLocal(thermal_grid,INSERT_VALUES,spectral_thermal_formResidual,dummy,ierr) ! residual vector of same shape as solution vector
call DMDASNESSetFunctionLocal(thermal_grid,INSERT_VALUES,spectral_thermal_formResidual,&
PETSC_NULL_OBJECT,ierr) ! residual vector of same shape as solution vector
CHKERRQ(ierr)
call SNESSetFromOptions(thermal_snes,ierr); CHKERRQ(ierr) ! pull it all together with additional cli arguments
@ -170,7 +170,7 @@ end subroutine spectral_thermal_init
!--------------------------------------------------------------------------------------------------
!> @brief solution for the spectral thermal scheme with internal iterations
!--------------------------------------------------------------------------------------------------
type(tSolutionState) function spectral_thermal_solution(guess,timeinc,timeinc_old,loadCaseTime)
type(tSolutionState) function spectral_thermal_solution(timeinc,timeinc_old,loadCaseTime)
use numerics, only: &
itmax, &
err_thermal_tolAbs, &
@ -189,7 +189,6 @@ type(tSolutionState) function spectral_thermal_solution(guess,timeinc,timeinc_ol
timeinc, & !< increment in time for current solution
timeinc_old, & !< increment in time of last increment
loadCaseTime !< remaining time of current load case
logical, intent(in) :: guess
integer(pInt) :: i, j, k, cell
PetscInt :: position
PetscReal :: minTemperature, maxTemperature, stagNorm, solnNorm
@ -283,10 +282,10 @@ subroutine spectral_thermal_formResidual(in,x_scal,f_scal,dummy,ierr)
DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: &
in
PetscScalar, dimension( &
XG_RANGE,YG_RANGE,ZG_RANGE) :: &
XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: &
x_scal
PetscScalar, dimension( &
X_RANGE,Y_RANGE,Z_RANGE) :: &
X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: &
f_scal
PetscObject :: dummy
PetscErrorCode :: ierr
@ -337,7 +336,7 @@ end subroutine spectral_thermal_formResidual
!--------------------------------------------------------------------------------------------------
!> @brief forwarding routine
!--------------------------------------------------------------------------------------------------
subroutine spectral_thermal_forward(guess,timeinc,timeinc_old,loadCaseTime)
subroutine spectral_thermal_forward()
use mesh, only: &
grid, &
grid3
@ -351,11 +350,6 @@ subroutine spectral_thermal_forward(guess,timeinc,timeinc_old,loadCaseTime)
thermal_conduction_getSpecificHeat
implicit none
real(pReal), intent(in) :: &
timeinc_old, &
timeinc, &
loadCaseTime !< remaining time of current load case
logical, intent(in) :: guess
integer(pInt) :: i, j, k, cell
DM :: dm_local
PetscScalar, dimension(:,:,:), pointer :: x_scal

View File

@ -1,3 +1,4 @@
!--------------------------------------------------------------------------------------------------
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Utilities used by the different spectral solver variants
@ -84,7 +85,7 @@ module spectral_utilities
type, public :: tLoadCase
real(pReal), dimension (3,3) :: rotation = math_I3 !< rotation of BC
type(tBoundaryCondition) :: P, & !< stress BC
type(tBoundaryCondition) :: stress, & !< stress BC
deformation !< deformation BC (Fdot or L)
real(pReal) :: time = 0.0_pReal !< length of increment
integer(pInt) :: incs = 0_pInt, & !< number of increments
@ -96,7 +97,7 @@ module spectral_utilities
end type tLoadCase
type, public :: tSolutionParams !< @todo use here the type definition for a full loadcase including mask
real(pReal), dimension(3,3) :: P_BC, rotation_BC
real(pReal), dimension(3,3) :: stress_BC, rotation_BC
real(pReal) :: timeinc
real(pReal) :: timeincOld
real(pReal) :: density
@ -227,9 +228,12 @@ subroutine utilities_init()
' add more using the PETSc_Options keyword in numerics.config '; flush(6)
call PetscOptionsClear(ierr); CHKERRQ(ierr)
if(debugPETSc) call PetscOptionsInsertString(trim(PETSCDEBUG),ierr); CHKERRQ(ierr)
call PetscOptionsInsertString(trim(petsc_defaultOptions),ierr); CHKERRQ(ierr)
call PetscOptionsInsertString(trim(petsc_options),ierr); CHKERRQ(ierr)
if(debugPETSc) call PetscOptionsInsertString(trim(PETSCDEBUG),ierr)
CHKERRQ(ierr)
call PetscOptionsInsertString(trim(petsc_defaultOptions),ierr)
CHKERRQ(ierr)
call PetscOptionsInsertString(trim(petsc_options),ierr)
CHKERRQ(ierr)
grid1Red = grid(1)/2_pInt + 1_pInt
wgt = 1.0/real(product(grid),pReal)
@ -238,11 +242,11 @@ subroutine utilities_init()
write(6,'(a,3(es12.5))') ' size x y z: ', geomSize
select case (spectral_derivative)
case ('continuous') ! default, no weighting
case ('continuous')
spectral_derivative_ID = DERIVATIVE_CONTINUOUS_ID
case ('central_difference') ! cosine curve with 1 for avg and zero for highest freq
case ('central_difference')
spectral_derivative_ID = DERIVATIVE_CENTRAL_DIFF_ID
case ('fwbw_difference') ! gradient, might need grid scaling as for cosine filter
case ('fwbw_difference')
spectral_derivative_ID = DERIVATIVE_FWBW_DIFF_ID
case default
call IO_error(892_pInt,ext_msg=trim(spectral_derivative))
@ -271,9 +275,9 @@ subroutine utilities_init()
! MPI allocation
gridFFTW = int(grid,C_INTPTR_T)
alloc_local = fftw_mpi_local_size_3d(gridFFTW(3), gridFFTW(2), gridFFTW(1)/2 +1, &
MPI_COMM_WORLD, local_K, local_K_offset)
allocate (xi1st (3,grid1Red,grid(2),grid3),source = cmplx(0.0_pReal,0.0_pReal,pReal)) ! frequencies, only half the size for first dimension
allocate (xi2nd (3,grid1Red,grid(2),grid3),source = cmplx(0.0_pReal,0.0_pReal,pReal)) ! frequencies, only half the size for first dimension
PETSC_COMM_WORLD, local_K, local_K_offset)
allocate (xi1st (3,grid1Red,grid(2),grid3),source = cmplx(0.0_pReal,0.0_pReal,pReal)) ! frequencies for first derivatives, only half the size for first dimension
allocate (xi2nd (3,grid1Red,grid(2),grid3),source = cmplx(0.0_pReal,0.0_pReal,pReal)) ! frequencies for second derivatives, only half the size for first dimension
tensorField = fftw_alloc_complex(tensorSize*alloc_local)
call c_f_pointer(tensorField, tensorField_real, [3_C_INTPTR_T,3_C_INTPTR_T, &
@ -298,12 +302,12 @@ subroutine utilities_init()
planTensorForth = fftw_mpi_plan_many_dft_r2c(3, [gridFFTW(3),gridFFTW(2),gridFFTW(1)], & ! dimension, logical length in each dimension in reversed order
tensorSize, FFTW_MPI_DEFAULT_BLOCK, FFTW_MPI_DEFAULT_BLOCK, &! no. of transforms, default iblock and oblock
tensorField_real, tensorField_fourier, & ! input data, output data
MPI_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
PETSC_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
if (.not. C_ASSOCIATED(planTensorForth)) call IO_error(810, ext_msg='planTensorForth')
planTensorBack = fftw_mpi_plan_many_dft_c2r(3, [gridFFTW(3),gridFFTW(2),gridFFTW(1)], & ! dimension, logical length in each dimension in reversed order
tensorSize, FFTW_MPI_DEFAULT_BLOCK, FFTW_MPI_DEFAULT_BLOCK, &! no. of transforms, default iblock and oblock
tensorField_fourier,tensorField_real, & ! input data, output data
MPI_COMM_WORLD, fftw_planner_flag) ! all processors, planer precision
PETSC_COMM_WORLD, fftw_planner_flag) ! all processors, planer precision
if (.not. C_ASSOCIATED(planTensorBack)) call IO_error(810, ext_msg='planTensorBack')
!--------------------------------------------------------------------------------------------------
@ -311,12 +315,12 @@ subroutine utilities_init()
planVectorForth = fftw_mpi_plan_many_dft_r2c(3, [gridFFTW(3),gridFFTW(2),gridFFTW(1)], & ! dimension, logical length in each dimension in reversed order
vecSize, FFTW_MPI_DEFAULT_BLOCK, FFTW_MPI_DEFAULT_BLOCK, &! no. of transforms, default iblock and oblock
vectorField_real, vectorField_fourier, & ! input data, output data
MPI_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
PETSC_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
if (.not. C_ASSOCIATED(planVectorForth)) call IO_error(810, ext_msg='planVectorForth')
planVectorBack = fftw_mpi_plan_many_dft_c2r(3, [gridFFTW(3),gridFFTW(2),gridFFTW(1)], & ! dimension, logical length in each dimension in reversed order
vecSize, FFTW_MPI_DEFAULT_BLOCK, FFTW_MPI_DEFAULT_BLOCK, & ! no. of transforms, default iblock and oblock
vectorField_fourier,vectorField_real, & ! input data, output data
MPI_COMM_WORLD, fftw_planner_flag) ! all processors, planer precision
PETSC_COMM_WORLD, fftw_planner_flag) ! all processors, planer precision
if (.not. C_ASSOCIATED(planVectorBack)) call IO_error(810, ext_msg='planVectorBack')
!--------------------------------------------------------------------------------------------------
@ -324,12 +328,12 @@ subroutine utilities_init()
planScalarForth = fftw_mpi_plan_many_dft_r2c(3, [gridFFTW(3),gridFFTW(2),gridFFTW(1)], & ! dimension, logical length in each dimension in reversed order
scalarSize, FFTW_MPI_DEFAULT_BLOCK, FFTW_MPI_DEFAULT_BLOCK, & ! no. of transforms, default iblock and oblock
scalarField_real, scalarField_fourier, & ! input data, output data
MPI_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
PETSC_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
if (.not. C_ASSOCIATED(planScalarForth)) call IO_error(810, ext_msg='planScalarForth')
planScalarBack = fftw_mpi_plan_many_dft_c2r(3, [gridFFTW(3),gridFFTW(2),gridFFTW(1)], & ! dimension, logical length in each dimension in reversed order, no. of transforms
planScalarBack = fftw_mpi_plan_many_dft_c2r(3, [gridFFTW(3),gridFFTW(2),gridFFTW(1)], & ! dimension, logical length in each dimension in reversed order, no. of transforms
scalarSize, FFTW_MPI_DEFAULT_BLOCK, FFTW_MPI_DEFAULT_BLOCK, & ! no. of transforms, default iblock and oblock
scalarField_fourier,scalarField_real, & ! input data, output data
MPI_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
scalarField_fourier,scalarField_real, & ! input data, output data
PETSC_COMM_WORLD, fftw_planner_flag) ! use all processors, planer precision
if (.not. C_ASSOCIATED(planScalarBack)) call IO_error(810, ext_msg='planScalarBack')
!--------------------------------------------------------------------------------------------------
@ -699,8 +703,8 @@ real(pReal) function utilities_curlRMS()
curl_fourier(l,3) = (+tensorField_fourier(l,2,i,j,k)*xi1st(1,i,j,k)*rescaledGeom(1) &
-tensorField_fourier(l,1,i,j,k)*xi1st(2,i,j,k)*rescaledGeom(2))
enddo
utilities_curlRMS = utilities_curlRMS + &
2.0_pReal*sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal)! Has somewhere a conj. complex counterpart. Therefore count it twice.
utilities_curlRMS = utilities_curlRMS &
+2.0_pReal*sum(real(curl_fourier)**2.0_pReal+aimag(curl_fourier)**2.0_pReal) ! Has somewhere a conj. complex counterpart. Therefore count it twice.
enddo
do l = 1_pInt, 3_pInt
curl_fourier = (+tensorField_fourier(l,3,1,j,k)*xi1st(2,1,j,k)*rescaledGeom(2) &
@ -710,8 +714,8 @@ real(pReal) function utilities_curlRMS()
curl_fourier = (+tensorField_fourier(l,2,1,j,k)*xi1st(1,1,j,k)*rescaledGeom(1) &
-tensorField_fourier(l,1,1,j,k)*xi1st(2,1,j,k)*rescaledGeom(2))
enddo
utilities_curlRMS = utilities_curlRMS + &
sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal)! this layer (DC) does not have a conjugate complex counterpart (if grid(1) /= 1)
utilities_curlRMS = utilities_curlRMS &
+ sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal) ! this layer (DC) does not have a conjugate complex counterpart (if grid(1) /= 1)
do l = 1_pInt, 3_pInt
curl_fourier = (+tensorField_fourier(l,3,grid1Red,j,k)*xi1st(2,grid1Red,j,k)*rescaledGeom(2) &
-tensorField_fourier(l,2,grid1Red,j,k)*xi1st(3,grid1Red,j,k)*rescaledGeom(3))
@ -720,14 +724,14 @@ real(pReal) function utilities_curlRMS()
curl_fourier = (+tensorField_fourier(l,2,grid1Red,j,k)*xi1st(1,grid1Red,j,k)*rescaledGeom(1) &
-tensorField_fourier(l,1,grid1Red,j,k)*xi1st(2,grid1Red,j,k)*rescaledGeom(2))
enddo
utilities_curlRMS = utilities_curlRMS + &
sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal)! this layer (Nyquist) does not have a conjugate complex counterpart (if grid(1) /= 1)
utilities_curlRMS = utilities_curlRMS &
+ sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal) ! this layer (Nyquist) does not have a conjugate complex counterpart (if grid(1) /= 1)
enddo; enddo
call MPI_Allreduce(MPI_IN_PLACE,utilities_curlRMS,1,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
if(ierr /=0_pInt) call IO_error(894_pInt, ext_msg='utilities_curlRMS')
utilities_curlRMS = sqrt(utilities_curlRMS) * wgt
if(grid(1) == 1_pInt) utilities_curlRMS = utilities_curlRMS * 0.5_pReal ! counted twice in case of grid(1) == 1
if(grid(1) == 1_pInt) utilities_curlRMS = utilities_curlRMS * 0.5_pReal ! counted twice in case of grid(1) == 1
end function utilities_curlRMS

View File

@ -74,8 +74,6 @@ subroutine thermal_adiabatic_init(fileUnit)
temperature, &
temperatureRate, &
material_partHomogenization
use numerics,only: &
worldrank
implicit none
integer(pInt), intent(in) :: fileUnit
@ -88,11 +86,9 @@ subroutine thermal_adiabatic_init(fileUnit)
tag = '', &
line = ''
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_ADIABATIC_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_ADIABATIC_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
maxNinstance = int(count(thermal_type == THERMAL_adiabatic_ID),pInt)
if (maxNinstance == 0_pInt) return

View File

@ -75,8 +75,6 @@ subroutine thermal_conduction_init(fileUnit)
temperature, &
temperatureRate, &
material_partHomogenization
use numerics,only: &
worldrank
implicit none
integer(pInt), intent(in) :: fileUnit
@ -89,11 +87,9 @@ subroutine thermal_conduction_init(fileUnit)
tag = '', &
line = ''
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_CONDUCTION_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_CONDUCTION_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
maxNinstance = int(count(thermal_type == THERMAL_conduction_ID),pInt)
if (maxNinstance == 0_pInt) return

View File

@ -23,8 +23,6 @@ subroutine thermal_isothermal_init()
use IO, only: &
IO_timeStamp
use material
use numerics, only: &
worldrank
implicit none
integer(pInt) :: &
@ -32,13 +30,11 @@ subroutine thermal_isothermal_init()
NofMyHomog, &
sizeState
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_isothermal_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_isothermal_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
initializeInstances: do homog = 1_pInt, material_Nhomogenization
initializeInstances: do homog = 1_pInt, material_Nhomogenization
myhomog: if (thermal_type(homog) == THERMAL_isothermal_ID) then
NofMyHomog = count(material_homog == homog)

View File

@ -90,8 +90,6 @@ subroutine vacancyflux_cahnhilliard_init(fileUnit)
vacancyflux_initialCv, &
material_partHomogenization, &
material_partPhase
use numerics,only: &
worldrank
implicit none
integer(pInt), intent(in) :: fileUnit
@ -104,11 +102,9 @@ subroutine vacancyflux_cahnhilliard_init(fileUnit)
tag = '', &
line = ''
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- vacancyflux_'//VACANCYFLUX_cahnhilliard_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- vacancyflux_'//VACANCYFLUX_cahnhilliard_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
maxNinstance = int(count(vacancyflux_type == VACANCYFLUX_cahnhilliard_ID),pInt)
if (maxNinstance == 0_pInt) return

View File

@ -72,8 +72,6 @@ subroutine vacancyflux_isochempot_init(fileUnit)
vacancyConcRate, &
vacancyflux_initialCv, &
material_partHomogenization
use numerics,only: &
worldrank
implicit none
integer(pInt), intent(in) :: fileUnit
@ -86,11 +84,9 @@ subroutine vacancyflux_isochempot_init(fileUnit)
tag = '', &
line = ''
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- vacancyflux_'//VACANCYFLUX_isochempot_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- vacancyflux_'//VACANCYFLUX_isochempot_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
maxNinstance = int(count(vacancyflux_type == VACANCYFLUX_isochempot_ID),pInt)
if (maxNinstance == 0_pInt) return

View File

@ -23,21 +23,17 @@ subroutine vacancyflux_isoconc_init()
use IO, only: &
IO_timeStamp
use material
use numerics, only: &
worldrank
implicit none
integer(pInt) :: &
homog, &
NofMyHomog
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- vacancyflux_'//VACANCYFLUX_isoconc_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- vacancyflux_'//VACANCYFLUX_isoconc_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
initializeInstances: do homog = 1_pInt, material_Nhomogenization
initializeInstances: do homog = 1_pInt, material_Nhomogenization
myhomog: if (vacancyflux_type(homog) == VACANCYFLUX_isoconc_ID) then
NofMyHomog = count(material_homog == homog)

View File

@ -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"
$DFORTLOWMP $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

View File

@ -1,704 +0,0 @@
#
# General definitions for the Marc 2011 version
#
# EM64T
# ( LP64 - i4 version)
# (ILP64 - i8 version)
#
# Linux RedHat 5.4
#
# 64 bit MPI version
#
# Intel(R) Fortran Compiler
# Version 12.0.4
#
# Intel(R) C Compiler
# Version 12.0.4
#
# DATE
#
# 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 4.0.1.007
# To check the mpi version, type:
# mpirun -version
#
# MKL Libraries:
# Intel(R) MKL 10.3.0.084
#
# 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
#
# settings for Metis
#
METIS="-I$METIS_SOURCE"
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
#
# select MPITYPE based upon what is installed
MPITYPE=none
if test -d $MARC_INTELMPI
then
MPITYPE=intelmpi
fi
if test -d $MARC_HPMPI
then
MPITYPE=hpmpi
fi
if test $AUTOFORGE
then
if test $AUTOFORGE = 1
then
MPITYPE=none
fi
fi
# uncomment one of the definitions of MPITYPE below to
# explicitly choose the type of MPI to use
#MPITYPE=none
#MPITYPE=hpmpi
#MPITYPE=intelmpi
MPI_DEFAULT=hpmpi
MPI_OTHER=intelmpi
INTELMPI_VERSION=HYDRA
# 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
#
# 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"
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
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 -n "
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra "
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
#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 lines to build with GPGPU version of BCS Solver for
# NVIDIA platforms
BCSGPUSOLVER=NONE
#BCSGPUSOLVER=BCSGPU
# 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
#
SOLVERFLAGS=
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 "$BCSGPUSOLVER" = BCSGPU
then
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU"
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
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
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 -DOPENMP -DMKL"
fi
# -D_MSCMARC
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT"
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource"
if test "$_OEM_NASTRAN" -ne 0
then
CINCL="$CINCL -I../../include"
fi
CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL"
if test "$MARCDEBUG" = "ON"
then
CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL"
fi
LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel"
CCT="$CC"
CCTLOW="$CCLOW"
CCTHIGH="$CCHIGH"
CC_CASI="$CC -c99 $I8CASIDEFS"
CCLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
CCT_CASI="$CCT -c99 $I8CASIDEFS"
CCTLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCTHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
#PROFILE="-Mprof=func"
#PROFILE="-Mprof=lines"
#PROFILE="-Mprof=func,mpi"
PROFILE=
FORTLOW="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTRAN="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTHIGH="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTNA="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr -save -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/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"'"
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3; removed -save for calls with openMP
DFORTLOW="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2011 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTLOWMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2011 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRAN="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2011 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRANMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2011 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGH="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2011 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGHMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2011 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
if test "$MARCDEBUG" = "ON"
then
FORTLOW="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTRAN="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTHIGH="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTNA="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr -save -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3; removed -save for calls with openMP
DFORTLOW="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2011 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTLOWMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2011 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRAN="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2011 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRANMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2011 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGH="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2011 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGHMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2011 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -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 -c -fpp -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}/bcsgpusolver/bcslib_csrc $CDEFINES $CINCL"
NVCC="nvcc -c -O3 -arch sm_13 -DLOWERCASE_ -I${MARC_SOURCE}/bcsgpusolver/bcslib_cuda/include "
BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/bcsgpusolver/common"
BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/bcsgpusolver/common"
BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/bcsgpusolver/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="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o "
LOADT="$MPI_ROOT/bin64/$FCOMPMPI $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_LIB/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 "$INTELSOLVER" = PARDISO
then
if test "$MARC_INTEGER_SIZE" = "i4" ; then
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a"
else
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a"
fi
else
INTELSOLVERLIBS=
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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $MARC_MKL/libmkl_blacs_ilp64.a"
fi
fi
else
MUMPSSOLVERLIBS=
MUMPSSOLVERLIBS2=
fi
if test "$BCSGPUSOLVER" = BCSGPU
then
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a -L/usr/local/cuda/lib -lcudart -lcublas -lcuda "
else
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
fi
if test "$MARC_INTEGER_SIZE" = "i4" ; then
MKLLIB=$MARC_MKL/libmkl_intel_lp64.a
else
MKLLIB=$MARC_MKL/libmkl_intel_ilp64.a
fi
SECLIBS="-L$MARC_LIB -llapi"
SOLVERLIBS="${BCSSOLVERLIBS} \
${INTELSOLVERLIBS} ${MUMPSSOLVERLIBS2} ${MF2SOLVERLIBS} \
-Wl,--start-group $MKLLIB $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group \
$MARC_MKL/libguide.a \
$MARC_LIB/blas_src.a ${VKISOLVERLIBS} ${CASISOLVERLIBS} "
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"
OPENMP="-openmp"
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 -lmpiif -lmpigi -lrt $OPENMP -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"
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 "
HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c"
MAXNUM=1000000

View File

@ -1,641 +0,0 @@
#
# General definitions for the Marc 2011 version
#
# EM64T
# ( LP64 - i4 version)
# (ILP64 - i8 version)
#
# Linux RedHat 5.4
#
# 64 bit MPI version
#
# Intel(R) Fortran Compiler
# Version 12.0.4
#
# Intel(R) C Compiler
# Version 12.0.4
#
# DATE
#
# 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 4.0.1.007
# To check the mpi version, type:
# mpirun -version
#
# MKL Libraries:
# Intel(R) MKL 10.3.0.084
#
# 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
#
# settings for Metis
#
METIS="-I$METIS_SOURCE"
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
#
# select MPITYPE based upon what is installed
MPITYPE=none
if test -d $MARC_INTELMPI
then
MPITYPE=intelmpi
fi
if test -d $MARC_HPMPI
then
MPITYPE=hpmpi
fi
if test $AUTOFORGE
then
if test $AUTOFORGE = 1
then
MPITYPE=none
fi
fi
# uncomment one of the definitions of MPITYPE below to
# explicitly choose the type of MPI to use
#MPITYPE=none
#MPITYPE=hpmpi
#MPITYPE=intelmpi
MPI_DEFAULT=hpmpi
MPI_OTHER=intelmpi
INTELMPI_VERSION=HYDRA
# 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
#
# 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"
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
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 -n "
RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra "
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
#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 lines to build with GPGPU version of BCS Solver for
# NVIDIA platforms
BCSGPUSOLVER=NONE
#BCSGPUSOLVER=BCSGPU
# 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
#
SOLVERFLAGS=
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 "$BCSGPUSOLVER" = BCSGPU
then
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU"
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
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
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 -DOPENMP -DMKL"
fi
# -D_MSCMARC
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT"
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource"
if test "$_OEM_NASTRAN" -ne 0
then
CINCL="$CINCL -I../../include"
fi
CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL"
if test "$MARCDEBUG" = "ON"
then
CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL"
CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL"
fi
LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel"
CCT="$CC"
CCTLOW="$CCLOW"
CCTHIGH="$CCHIGH"
CC_CASI="$CC -c99 $I8CASIDEFS"
CCLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
CCT_CASI="$CCT -c99 $I8CASIDEFS"
CCTLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCTHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
#PROFILE="-Mprof=func"
#PROFILE="-Mprof=lines"
#PROFILE="-Mprof=func,mpi"
PROFILE=
FORTLOW="$FCOMP -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTRAN="$FCOMP -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTHIGH="$FCOMP -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTNA="$FCOMP -c -assume byterecl -safe_cray_ptr -save -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
if test "$MARCDEBUG" = "ON"
then
FORTLOW="$FCOMP -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTRAN="$FCOMP -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTHIGH="$FCOMP -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
FORTNA="$FCOMP -c -assume byterecl -safe_cray_ptr -save -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
-I$MARC_SOURCE/bcssolver/common -I$MARC_SOURCE/mumpssolver/include $I8FFLAGS -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 -c -fpp -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}/bcsgpusolver/bcslib_csrc $CDEFINES $CINCL"
NVCC="nvcc -c -O3 -arch sm_13 -DLOWERCASE_ -I${MARC_SOURCE}/bcsgpusolver/bcslib_cuda/include "
BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/bcsgpusolver/common"
BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/bcsgpusolver/common"
BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/bcsgpusolver/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="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o "
LOADT="$MPI_ROOT/bin64/$FCOMPMPI $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_LIB/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 "$INTELSOLVER" = PARDISO
then
if test "$MARC_INTEGER_SIZE" = "i4" ; then
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a"
else
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a"
fi
else
INTELSOLVERLIBS=
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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $MARC_MKL/libmkl_blacs_ilp64.a"
fi
fi
else
MUMPSSOLVERLIBS=
MUMPSSOLVERLIBS2=
fi
if test "$BCSGPUSOLVER" = BCSGPU
then
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a -L/usr/local/cuda/lib -lcudart -lcublas -lcuda "
else
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
fi
if test "$MARC_INTEGER_SIZE" = "i4" ; then
MKLLIB=$MARC_MKL/libmkl_intel_lp64.a
else
MKLLIB=$MARC_MKL/libmkl_intel_ilp64.a
fi
SECLIBS="-L$MARC_LIB -llapi"
SOLVERLIBS="${BCSSOLVERLIBS} \
${INTELSOLVERLIBS} ${MUMPSSOLVERLIBS2} ${MF2SOLVERLIBS} \
-Wl,--start-group $MKLLIB $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group \
$MARC_MKL/libguide.a \
$MARC_LIB/blas_src.a ${VKISOLVERLIBS} ${CASISOLVERLIBS} "
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"
OPENMP="-openmp"
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 -lmpiif -lmpigi -lrt $OPENMP -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"
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 "
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

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

View File

@ -1,12 +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.
if [ "`uname`" = "SunOS" ]; then
dir=/usr/openwin/bin
else
dir=/usr/bin/X11
fi
# $dir/xterm -T "vi $*" -n "vi $*" -e vi $*
%EDITOR% $*

View File

@ -1,11 +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.
if [ "`uname`" = "SunOS" ]; then
dir=/usr/openwin/bin
else
dir=/usr/bin/X11
fi
$dir/xterm -T "vi $*" -n "vi $*" -e vi $*

View File

@ -1,156 +0,0 @@
#!/bin/sh
#
# The exit status of this script is read by Mentat.
# Normal exit status is 0.
#
DIR=/home/f.roters/msc/marc2011
if test $MARCDIR1
then
DIR=$MARCDIR1
fi
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
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$//"`
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 [ "$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
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 \
$nthread $nsolver $mode > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,157 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
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$//"`
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 [ "$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
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 \
$nthread $nsolver $mode > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,157 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
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$//"`
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 [ "$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
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" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$nthread $nsolver $mode > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,157 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
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$//"`
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 [ "$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
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 \
$nthread $nsolver $mode > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,157 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
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$//"`
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 [ "$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
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_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$nthread $nsolver $mode > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,157 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
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$//"`
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 [ "$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
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" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$nthread $nsolver $mode > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,157 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
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$//"`
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 [ "$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
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_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$nthread $nsolver $mode > /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

View File

@ -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"
$DFORTRAN $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

View File

@ -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"
$DFORTHIGH $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

View File

@ -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

View File

@ -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"
$DFORTLOW $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

View File

@ -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

View File

@ -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

View File

@ -1,703 +0,0 @@
#
# General definitions for the Marc 2011 version
#
# EM64T
# ( LP64 - i4 version)
# (ILP64 - i8 version)
#
# Linux RedHat 5.4
#
# 64 bit MPI version
#
# Intel(R) Fortran Compiler
# Version 12.0.4
#
# Intel(R) C Compiler
# Version 12.0.4
#
# DATE
#
# 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 4.0.1.007
# To check the mpi version, type:
# mpirun -version
#
# MKL Libraries:
# Intel(R) MKL 10.3.0.084
#
# 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
#
# settings for Metis
#
METIS="-I$METIS_SOURCE"
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
#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
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
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 -DOPENMP -DMKL"
fi
# -D_MSCMARC
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT"
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource"
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 -c99 $I8CASIDEFS"
CCLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
CCT_CASI="$CCT -c99 $I8CASIDEFS"
CCTLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCTHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
#PROFILE="-Mprof=func"
#PROFILE="-Mprof=lines"
#PROFILE="-Mprof=func,mpi"
PROFILE=
FORTLOW="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr -save -zero -mp1 -WB -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"'"
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3; removed -save for calls with openMP
DFORTLOW="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2012 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTLOWMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2012 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRAN="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2012 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRANMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2012 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGH="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2012 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGHMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2012 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-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 -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $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 -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $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 -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr -save -zero -mp1 -WB -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; removed -save for calls with openMP
DFORTLOW="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2012 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTLOWMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2012 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRAN="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2012 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTRANMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -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=2012 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGH="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
-fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2012 -DDAMASKVERSION=$DAMASKVERSION \
-I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS"
DFORTHIGHMP="$FCOMP -c -assume byterecl -stand f08 -standard-semantics -safe_cray_ptr $PROFILE -save -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=2012 -DDAMASKVERSION=$DAMASKVERSION \
-openmp -openmp_report2 \
-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 -c -fpp -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=gcc
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="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o "
LOADT="$MPI_ROOT/bin64/$FCOMPMPI $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_LIB/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 "$INTELSOLVER" = PARDISO
then
if test "$MARC_INTEGER_SIZE" = "i4" ; then
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a"
else
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a"
fi
else
INTELSOLVERLIBS=
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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $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_intel_lp64.a
else
MKLLIB=$MARC_MKL/libmkl_intel_ilp64.a
fi
SECLIBS="-L$MARC_LIB -llapi"
SOLVERLIBS="${BCSSOLVERLIBS} \
${INTELSOLVERLIBS} ${MUMPSSOLVERLIBS2} ${MF2SOLVERLIBS} \
-Wl,--start-group $MKLLIB $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group \
$MARC_MKL/libguide.a \
$MARC_LIB/blas_src.a ${VKISOLVERLIBS} ${CASISOLVERLIBS} "
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"
OPENMP="-openmp"
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 -lmpiif -lmpigi -lrt $OPENMP -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"
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 "
HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c"
MAXNUM=1000000

View File

@ -1,641 +0,0 @@
#
# General definitions for the Marc 2011 version
#
# EM64T
# ( LP64 - i4 version)
# (ILP64 - i8 version)
#
# Linux RedHat 5.4
#
# 64 bit MPI version
#
# Intel(R) Fortran Compiler
# Version 12.0.4
#
# Intel(R) C Compiler
# Version 12.0.4
#
# DATE
#
# 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 4.0.1.007
# To check the mpi version, type:
# mpirun -version
#
# MKL Libraries:
# Intel(R) MKL 10.3.0.084
#
# 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
#
# settings for Metis
#
METIS="-I$METIS_SOURCE"
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
#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
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
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 -DOPENMP -DMKL"
fi
# -D_MSCMARC
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT"
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource"
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 -c99 $I8CASIDEFS"
CCLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
CCT_CASI="$CCT -c99 $I8CASIDEFS"
CCTLOW_CASI="$CCLOW -c99 $I8CASIDEFS"
CCTHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS"
#PROFILE="-Mprof=func"
#PROFILE="-Mprof=lines"
#PROFILE="-Mprof=func,mpi"
PROFILE=
FORTLOW="$FCOMP -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -safe_cray_ptr -save -zero -mp1 -WB -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 -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $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 -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB $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 -c -assume byterecl -safe_cray_ptr $PROFILE -save -zero -mp1 -WB -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 -c -assume byterecl -safe_cray_ptr -save -zero -mp1 -WB -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 -c -fpp -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=gcc
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="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o "
LOADT="$MPI_ROOT/bin64/$FCOMPMPI $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_LIB/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 "$INTELSOLVER" = PARDISO
then
if test "$MARC_INTEGER_SIZE" = "i4" ; then
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a"
else
INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a"
fi
else
INTELSOLVERLIBS=
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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $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_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a"
else
MUMPSSOLVERLIBS2="$MARC_MKL/libmkl_scalapack_ilp64.a $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_intel_lp64.a
else
MKLLIB=$MARC_MKL/libmkl_intel_ilp64.a
fi
SECLIBS="-L$MARC_LIB -llapi"
SOLVERLIBS="${BCSSOLVERLIBS} \
${INTELSOLVERLIBS} ${MUMPSSOLVERLIBS2} ${MF2SOLVERLIBS} \
-Wl,--start-group $MKLLIB $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group \
$MARC_MKL/libguide.a \
$MARC_LIB/blas_src.a ${VKISOLVERLIBS} ${CASISOLVERLIBS} "
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"
OPENMP="-openmp"
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 -lmpiif -lmpigi -lrt $OPENMP -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"
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 "
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

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

View File

@ -1,12 +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.
if [ "`uname`" = "SunOS" ]; then
dir=/usr/openwin/bin
else
dir=/usr/bin/X11
fi
# $dir/xterm -T "vi $*" -n "vi $*" -e vi $*
%EDITOR% $*

View File

@ -1,11 +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.
if [ "`uname`" = "SunOS" ]; then
dir=/usr/openwin/bin
else
dir=/usr/bin/X11
fi
$dir/xterm -T "vi $*" -n "vi $*" -e vi $*

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

View File

@ -1,163 +0,0 @@
#!/bin/sh
#
# The exit status of this script is read by Mentat.
# Normal exit status is 0.
#
DIR=/msc/marc2012
if test $MARCDIR1
then
DIR=$MARCDIR1
fi
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
gpu=$3
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$//"`
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 [ "$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 \
$nthread $nsolver $mode $gpu > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,164 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
gpu=$3
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$//"`
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 [ "$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 \
$nthread $nsolver $mode $gpu > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,164 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
gpu=$3
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$//"`
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 [ "$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 \
$nthread $nsolver $mode $gpu > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,164 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
gpu=$3
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$//"`
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 [ "$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 \
$nthread $nsolver $mode $gpu > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,164 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
gpu=$3
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$//"`
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 [ "$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_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$nthread $nsolver $mode $gpu > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,164 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
gpu=$3
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$//"`
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 [ "$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" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$nthread $nsolver $mode $gpu > /dev/null 2>&1
sleep 1
exit 0

View File

@ -1,164 +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
SRCEXT=.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
nthread=$9
shift 9 # cannot use $10, $11, ...
nsolver=$1
mode=$2
gpu=$3
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$//"`
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 [ "$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_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$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

View File

@ -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"
$DFORTRAN $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

View File

@ -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"
$DFORTHIGH $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

View File

@ -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

View File

@ -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"
$DFORTLOW $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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: $0 job_name"
exit 1
fi
echo STOP > $1.cnt

Some files were not shown because too many files have changed in this diff Show More