From 093cf9233838d38020da2264484ee0a70f0952b7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 8 Jan 2013 22:11:59 +0000 Subject: [PATCH] remove omp statements during initialization, "line" for reading in from material.config now has a default (empty) value to prevent conditional jump depend on this value --- code/constitutive_dislotwin.f90 | 12 +++++------- code/constitutive_j2.f90 | 16 ++++++---------- code/constitutive_none.f90 | 18 +++++++----------- code/constitutive_nonlocal.f90 | 17 ++++++----------- code/constitutive_phenopowerlaw.f90 | 18 +++++++----------- code/constitutive_titanmod.f90 | 4 ++-- code/homogenization_RGC.f90 | 12 +++++------- code/homogenization_isostrain.f90 | 12 ++++++------ code/math.f90 | 4 ---- 9 files changed, 44 insertions(+), 69 deletions(-) diff --git a/code/constitutive_dislotwin.f90 b/code/constitutive_dislotwin.f90 index 3dcf35aa9..a9be85065 100644 --- a/code/constitutive_dislotwin.f90 +++ b/code/constitutive_dislotwin.f90 @@ -148,14 +148,12 @@ integer(pInt) :: section, maxNinstance,mySize,myStructure,maxTotalNslip,maxTotal f,i,j,k,l,m,n,o,p,q,r,s,ns,nt, & index_myFamily, index_otherFamily character(len=64) tag -character(len=1024) line - -!$OMP CRITICAL (write2out) - write(6,*) - write(6,*) '<<<+- constitutive_',trim(constitutive_dislotwin_label),' init -+>>>' - write(6,*) '$Id$' +character(len=1024) :: line = '' ! to start initialized + +write(6,*) +write(6,*) '<<<+- constitutive_',trim(constitutive_dislotwin_label),' init -+>>>' +write(6,*) '$Id$' #include "compilation_info.f90" -!$OMP END CRITICAL (write2out) maxNinstance = int(count(phase_plasticity == constitutive_dislotwin_label),pInt) if (maxNinstance == 0_pInt) return diff --git a/code/constitutive_j2.f90 b/code/constitutive_j2.f90 index bc82d7dc4..1384415a3 100644 --- a/code/constitutive_j2.f90 +++ b/code/constitutive_j2.f90 @@ -129,23 +129,19 @@ subroutine constitutive_j2_init(myFile) integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions integer(pInt) :: section = 0_pInt, maxNinstance, i,j,k,o, mySize character(len=64) :: tag - character(len=1024) :: line + character(len=1024) :: line = '' ! to start initialized - !$OMP CRITICAL (write2out) - write(6,*) - write(6,*) '<<<+- constitutive_',trim(constitutive_j2_label),' init -+>>>' - write(6,*) '$Id$' + write(6,*) + write(6,*) '<<<+- constitutive_',trim(constitutive_j2_label),' init -+>>>' + write(6,*) '$Id$' #include "compilation_info.f90" - !$OMP END CRITICAL (write2out) maxNinstance = int(count(phase_plasticity == constitutive_j2_label),pInt) if (maxNinstance == 0_pInt) return if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (write2out) - write(6,'(a16,1x,i5)') '# instances:',maxNinstance - write(6,*) - !$OMP END CRITICAL (write2out) + write(6,'(a16,1x,i5)') '# instances:',maxNinstance + write(6,*) endif allocate(constitutive_j2_sizeDotState(maxNinstance)) diff --git a/code/constitutive_none.f90 b/code/constitutive_none.f90 index afd5a4dff..9a00ee80a 100644 --- a/code/constitutive_none.f90 +++ b/code/constitutive_none.f90 @@ -109,23 +109,19 @@ subroutine constitutive_none_init(myFile) integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions integer(pInt) :: section = 0_pInt, maxNinstance, i,j,k, mySize, myStructure character(len=64) :: tag - character(len=1024) :: line - - !$OMP CRITICAL (write2out) - write(6,*) - write(6,*) '<<<+- constitutive_',trim(constitutive_none_label),' init -+>>>' - write(6,*) '$Id$' + character(len=1024) :: line = '' ! to start initialized + + write(6,*) + write(6,*) '<<<+- constitutive_',trim(constitutive_none_label),' init -+>>>' + write(6,*) '$Id$' #include "compilation_info.f90" - !$OMP END CRITICAL (write2out) maxNinstance = int(count(phase_plasticity == constitutive_none_label),pInt) if (maxNinstance == 0_pInt) return if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (write2out) - write(6,'(a16,1x,i5)') '# instances:',maxNinstance - write(6,*) - !$OMP END CRITICAL (write2out) + write(6,'(a16,1x,i5)') '# instances:',maxNinstance + write(6,*) endif allocate(constitutive_none_sizeDotState(maxNinstance)) diff --git a/code/constitutive_nonlocal.f90 b/code/constitutive_nonlocal.f90 index daac2427d..679900624 100644 --- a/code/constitutive_nonlocal.f90 +++ b/code/constitutive_nonlocal.f90 @@ -266,23 +266,18 @@ integer(pInt) section, & it, & ! index of my interaction type mySize character(len=64) tag -character(len=1024) line - - -!$OMP CRITICAL (write2out) - write(6,*) - write(6,*) '<<<+- constitutive_',trim(constitutive_nonlocal_label),' init -+>>>' - write(6,*) '$Id$' +character(len=1024) :: line = '' ! to start initialized + + write(6,*) + write(6,*) '<<<+- constitutive_',trim(constitutive_nonlocal_label),' init -+>>>' + write(6,*) '$Id$' #include "compilation_info.f90" -!$OMP END CRITICAL (write2out) maxNinstance = int(count(phase_plasticity == constitutive_nonlocal_label),pInt) if (maxNinstance == 0) return ! we don't have to do anything if there's no instance for this constitutive law if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (write2out) - write(6,'(a16,1x,i5)') '# instances:',maxNinstance - !$OMP END CRITICAL (write2out) + write(6,'(a16,1x,i5)') '# instances:',maxNinstance endif diff --git a/code/constitutive_phenopowerlaw.f90 b/code/constitutive_phenopowerlaw.f90 index 59fe3a4b2..0e0934c8f 100644 --- a/code/constitutive_phenopowerlaw.f90 +++ b/code/constitutive_phenopowerlaw.f90 @@ -142,23 +142,19 @@ subroutine constitutive_phenopowerlaw_init(myFile) integer(pInt) section, maxNinstance, i,j,k, f,o, & mySize, myStructure, index_myFamily, index_otherFamily character(len=64) :: tag - character(len=1024) :: line - - !$OMP CRITICAL (write2out) - write(6,*) - write(6,*) '<<<+- constitutive_',trim(constitutive_phenopowerlaw_label),' init -+>>>' - write(6,*) '$Id$' + character(len=1024) :: line = '' ! to start initialized + + write(6,*) + write(6,*) '<<<+- constitutive_',trim(constitutive_phenopowerlaw_label),' init -+>>>' + write(6,*) '$Id$' #include "compilation_info.f90" - !$OMP END CRITICAL (write2out) maxNinstance = int(count(phase_plasticity == constitutive_phenopowerlaw_label),pInt) if (maxNinstance == 0) return if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (write2out) - write(6,'(a16,1x,i5)') '# instances:',maxNinstance - write(6,*) - !$OMP END CRITICAL (write2out) + write(6,'(a16,1x,i5)') '# instances:',maxNinstance + write(6,*) endif allocate(constitutive_phenopowerlaw_sizeDotState(maxNinstance)) constitutive_phenopowerlaw_sizeDotState = 0_pInt diff --git a/code/constitutive_titanmod.f90 b/code/constitutive_titanmod.f90 index a345fc226..a87dfb032 100644 --- a/code/constitutive_titanmod.f90 +++ b/code/constitutive_titanmod.f90 @@ -252,8 +252,8 @@ integer(pInt) :: section,f,i,j,k,l,m,n,o,p,q,r,s,s1,s2,t,t1,t2,ns,nt,& mySize = 0_pInt,myStructure,maxTotalNslip,maxTotalNtwin integer :: maxNinstance !no pInt character(len=64) :: tag -character(len=1024) :: line - +character(len=1024) :: line = '' ! to start initialized + write(6,*) write(6,*) '<<<+- constitutive_',trim(constitutive_titanmod_label),' init -+>>>' write(6,*) '$Id$' diff --git a/code/homogenization_RGC.f90 b/code/homogenization_RGC.f90 index 3ee3c3b9b..78380d073 100644 --- a/code/homogenization_RGC.f90 +++ b/code/homogenization_RGC.f90 @@ -87,14 +87,12 @@ subroutine homogenization_RGC_init(& integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions integer(pInt) section, maxNinstance, i,j,e, output, mySize, myInstance character(len=64) tag - character(len=1024) line - -!$OMP CRITICAL (write2out) - write(6,*) - write(6,*) '<<<+- homogenization_',trim(homogenization_RGC_label),' init -+>>>' - write(6,*) '$Id$' + character(len=1024) :: line = '' ! to start initialized + + write(6,*) + write(6,*) '<<<+- homogenization_',trim(homogenization_RGC_label),' init -+>>>' + write(6,*) '$Id$' #include "compilation_info.f90" -!$OMP END CRITICAL (write2out) maxNinstance = int(count(homogenization_type == homogenization_RGC_label),pInt) if (maxNinstance == 0) return diff --git a/code/homogenization_isostrain.f90 b/code/homogenization_isostrain.f90 index 58cb7003e..71a60414b 100644 --- a/code/homogenization_isostrain.f90 +++ b/code/homogenization_isostrain.f90 @@ -75,14 +75,14 @@ subroutine homogenization_isostrain_init(myFile) ! fil integer(pInt) section, i, j, output, mySize integer :: maxNinstance, k !no pInt (stores a system dependen value from 'count' character(len=64) :: tag - character(len=1024) :: line + character(len=1024) :: line = '' ! to start initialized - !$OMP CRITICAL (write2out) - write(6,*) - write(6,*) '<<<+- homogenization_',trim(homogenization_isostrain_label),' init -+>>>' - write(6,*) '$Id$' + + write(6,*) + write(6,*) '<<<+- homogenization_',trim(homogenization_isostrain_label),' init -+>>>' + write(6,*) '$Id$' #include "compilation_info.f90" - !$OMP END CRITICAL (write2out) + maxNinstance = count(homogenization_type == homogenization_isostrain_label) if (maxNinstance == 0) return diff --git a/code/math.f90 b/code/math.f90 index 70b39f5d3..2651fcf2b 100644 --- a/code/math.f90 +++ b/code/math.f90 @@ -273,12 +273,10 @@ subroutine math_init ! comment the first random_seed call out, set randSize to 1, and use ifort character(len=64) :: error_msg - !$OMP CRITICAL (write2out) write(6,*) '' write(6,*) '<<<+- math init -+>>>' write(6,*) '$Id$' #include "compilation_info.f90" - !$OMP END CRITICAL (write2out) call random_seed(size=randSize) if (allocated(randInit)) deallocate(randInit) @@ -297,14 +295,12 @@ subroutine math_init call random_number(randTest(i)) enddo - !$OMP CRITICAL (write2out) write(6,*) 'size of random seed: ', randSize do i =1, randSize write(6,*) 'value of random seed: ', i, randInit(i) enddo write(6,'(a,4(/,26x,f17.14))') ' start of random sequence: ', randTest write(6,*) '' - !$OMP END CRITICAL (write2out) call random_seed(put = randInit)