Merge branch 'development'

This commit is contained in:
Martin Diehl 2017-04-15 12:08:37 +02:00
commit b792a5e22e
6 changed files with 34 additions and 23 deletions

View File

@ -34,7 +34,7 @@ variables:
#================================================================================================ #================================================================================================
# Shortcut names # Shortcut names
#================================================================================================ #================================================================================================
DAMASKROOT: "$HOME/GitlabCI_Pipeline_$CI_PIPELINE_ID/DAMASK" DAMASKROOT: "$HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
#================================================================================================ #================================================================================================
# Names of module files to load # Names of module files to load
@ -79,8 +79,8 @@ variables:
checkout: checkout:
stage: prepareAll stage: prepareAll
before_script: before_script:
- while [ -e $HOME/GitLabCI.lock ]; do sleep 5m; done - echo $CI_PIPELINE_ID >> $HOME/GitLabCI.queue
- echo $CI_PIPELINE_ID > $HOME/GitLabCI.lock - while [ "$(awk '/$CI_PIPELINE_ID/{print NR}' GitLabCI.queue)" -ne 1 ];do sleep 5m; done
script: script:
- mkdir -p $DAMASKROOT - mkdir -p $DAMASKROOT
- git clone -q git@magit1.mpie.de:damask/DAMASK.git $DAMASKROOT - git clone -q git@magit1.mpie.de:damask/DAMASK.git $DAMASKROOT
@ -435,6 +435,7 @@ mergeIntoMaster:
- git merge $UPDATEDREV - git merge $UPDATEDREV
- git push origin master # master is now tested version and has updated VERSION file - git push origin master # master is now tested version and has updated VERSION file
- git checkout development - git checkout development
- git pull
- git merge master -s ours # only possible conflict is in VERSION file - git merge master -s ours # only possible conflict is in VERSION file
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file - git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
only: only:
@ -483,7 +484,7 @@ removeLock:
before_script: before_script:
- echo 'Do nothing' - echo 'Do nothing'
when: always when: always
script: if grep -q $CI_PIPELINE_ID $HOME/GitLabCI.lock; then rm $HOME/GitLabCI.lock; fi script: sed -i '/$CI_PIPELINE_ID/d' GitLabCI.queue
except: except:
- master - master
- release - release

View File

@ -39,12 +39,15 @@ fi
# according to http://software.intel.com/en-us/forums/topic/501500 # according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size # this seems to make sense for the stack size
FREE=$(which free 2>/dev/null) FREE=$(type -p free 2>/dev/null)
if [ "x$FREE" != "x" ]; then if [ "x$FREE" != "x" ]; then
freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}') freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}')
# http://superuser.com/questions/220059/what-parameters-has-ulimit # http://superuser.com/questions/220059/what-parameters-has-ulimit
ulimit -d $(expr $freeMem / 2) 2>/dev/null # maximum heap size (kB) ulimit -d unlimited 2>/dev/null \
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 unlimited 2>/dev/null \
|| echo "cannot unlimit stack..." \
&& ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB)
fi fi
ulimit -v unlimited 2>/dev/null # maximum virtual memory size ulimit -v unlimited 2>/dev/null # maximum virtual memory size
ulimit -m unlimited 2>/dev/null # maximum physical memory size ulimit -m unlimited 2>/dev/null # maximum physical memory size

View File

@ -878,7 +878,7 @@ function IO_spotTagInPart(fileUnit,part,tag,Nsections)
IO_spotTagInPart = .false. ! assume to nowhere spot tag IO_spotTagInPart = .false. ! assume to nowhere spot tag
section = 0_pInt section = 0_pInt
line ='' line = ''
rewind(fileUnit) rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part

View File

@ -758,7 +758,7 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
allocate(microstructure_elemhomo(Nsections), source=.false.) allocate(microstructure_elemhomo(Nsections), source=.false.)
if(any(mesh_element(4,1:mesh_NcpElems) > Nsections)) & if(any(mesh_element(4,1:mesh_NcpElems) > Nsections)) &
call IO_error(155_pInt,ext_msg='Microstructure in geometry > Sections in material.config') call IO_error(155_pInt,ext_msg='More microstructures in geometry than sections in material.config')
forall (e = 1_pInt:mesh_NcpElems) microstructure_active(mesh_element(4,e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements forall (e = 1_pInt:mesh_NcpElems) microstructure_active(mesh_element(4,e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements
@ -801,7 +801,7 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
microstructure_crystallite(section) = IO_intValue(line,chunkPos,2_pInt) microstructure_crystallite(section) = IO_intValue(line,chunkPos,2_pInt)
case ('(constituent)') case ('(constituent)')
constituent = constituent + 1_pInt constituent = constituent + 1_pInt
do i=2_pInt,6_pInt,2_pInt do i = 2_pInt,6_pInt,2_pInt
tag = IO_lc(IO_stringValue(line,chunkPos,i)) tag = IO_lc(IO_stringValue(line,chunkPos,i))
select case (tag) select case (tag)
case('phase') case('phase')
@ -816,6 +816,11 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
endif endif
enddo enddo
!sanity check
do section = 1_pInt, Nsections
if (sum(microstructure_fraction(:,section)) /= 1.0_pReal) &
call IO_error(153_pInt,ext_msg=microstructure_name(section))
enddo
end subroutine material_parseMicrostructure end subroutine material_parseMicrostructure

View File

@ -153,34 +153,31 @@ parser.add_option("-p", "--port", type="int", dest="port", metavar='int',
help="Mentat connection port [%default]") help="Mentat connection port [%default]")
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", parser.add_option("-v", "--verbose", action="store_true", dest="verbose",
help="write Mentat command stream also to stdout [%default]") help="write Mentat command stream also to stdout [%default]")
parser.set_defaults(port = 40007) parser.set_defaults(port = 40007,
parser.set_defaults(verbose = False) verbose = False)
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
if options.verbose:
file={'croak':sys.stderr}
else:
file={'croak':sys.stdout}
try: try:
import py_mentat import py_mentat
except: except:
file['croak'].write('error: no valid Mentat release found') damask.util.croak('error: no valid Mentat release found')
sys.exit(-1) sys.exit(-1)
outputLocals = {} outputLocals = {}
file['croak'].write('\033[1m'+scriptName+'\033[0m\n\n') damask.util.report(scriptName,'waiting to connect...')
file['croak'].write( 'waiting to connect...\n')
try: try:
py_mentat.py_connect('',options.port) py_mentat.py_connect('',options.port)
# prevent redrawing in Mentat, should be much faster. Since py_connect has no return value, try this to determine if failed or not # prevent redrawing in Mentat, should be much faster.
# Since py_connect has no return value, try this to determine if failed or not
output(['*draw_manual'],outputLocals,'Mentat') output(['*draw_manual'],outputLocals,'Mentat')
except: except:
file['croak'].write('Could not connect. Set Tools/Python/"Run as Separate Process" & "Initiate"...\n') damask.util.croak('Could not connect. Set Tools/Python/"Run as Separate Process" & "Initiate"...')
sys.exit() sys.exit()
file['croak'].write( 'connected...\n')
damask.util.croak('connected...')
output(['*remove_all_servos', output(['*remove_all_servos',
'*sweep_all', '*sweep_all',
@ -190,6 +187,10 @@ output(['*remove_all_servos',
cmds = servoLink() cmds = servoLink()
output(cmds,outputLocals,'Mentat') output(cmds,outputLocals,'Mentat')
output(['*draw_automatic',
],outputLocals,'Mentat') # script depends on consecutive numbering of nodes
py_mentat.py_disconnect() py_mentat.py_disconnect()
if options.verbose: if options.verbose:

View File

@ -247,6 +247,7 @@ for name in filenames:
'*identify_sets', '*identify_sets',
'*show_model', '*show_model',
'*redraw', '*redraw',
'*draw_automatic',
] ]
outputLocals = {} outputLocals = {}