fixed over-sensitive error in homogeniztion and ifort option in makefile

This commit is contained in:
Martin Diehl 2013-12-19 08:49:47 +00:00
parent 4483223958
commit 61c6839723
10 changed files with 128 additions and 47 deletions

View File

@ -42,11 +42,11 @@ SHELL = /bin/sh
#any values will be overwritten by configure.py
FFTWROOT ?= /usr/local
IMKLROOT ?=
ACMLROOT ?=
ACMLROOT ?= /opt/acml5.3.0
LAPACKROOT ?= /usr
HDF5ROOT ?=
F90 ?= ifort
F90 ?= gfortran
########################################################################################
COMPILERNAME ?= $(F90)
@ -163,13 +163,13 @@ COMPILE_OPTIONS_ifort +=-diag-enable sc3\
-warn interfaces\
-warn ignore_loc\
-warn alignments\
-warn unused\
-warn errors
-warn unused
endif
###################################################################################################
#COMPILE SWITCHES
#-fpp: preprocessor
#-ftz: flush unterflow to zero, automatically set if O<0,1,2,3> >0
#-assume byterecl record length is given in bytes (also set by -standard-semantics)
#-fimplicit-none: assume "implicit-none" even if not present in source
#-diag-disable: disables warnings, where
# warning ID 5268: the text exceeds right hand column allowed on the line (we have only comments there)
@ -181,7 +181,6 @@ endif
# ignore_loc: %LOC is stripped from an actual argument
# alignments: data that is not naturally aligned
# unused: declared variables that are never used
# errors: warnings are changed to errors
# stderrors: warnings about Fortran standard violations are changed to errors (STANDARD_CHECK)
#
###################################################################################################
@ -197,7 +196,8 @@ DEBUG_OPTIONS_ifort :=-g\
-gen-interfaces\
-fp-stack-check\
-check bounds,format,output_conversion,pointers,uninit\
-fpe-all0
-fpe-all0\
-warn errors
###################################################################################################
#COMPILE SWITCHES FOR RUNTIME DEBUGGING
#-g: Generate symbolic debugging information in the object file
@ -211,6 +211,8 @@ DEBUG_OPTIONS_ifort :=-g\
# pointers: Checking for certain disassociated or uninitialized pointers or unallocated allocatable objects.
# uninit: Checking for uninitialized variables.
#-fpe-all0 capture all floating-point exceptions, sets -ftz automatically
#-warn: enables warnings, where
# errors: warnings are changed to errors
# information on http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors/
###################################################################################################
#MORE OPTIONS FOR RUNTIME DEBUGGING
@ -247,7 +249,8 @@ endif
#-Wimplicit-procedure
#-Wall: sets the following Fortran options:
# -Waliasing: warn about possible aliasing of dummy arguments. Specifically, it warns if the same actual argument is associated with a dummy argument with "INTENT(IN)" and a dummy argument with "INTENT(OUT)" in a call with an explicit interface.
# -Wampersand: checks if a character expression is continued proberly by an ampersand at the end of the line and at the beginning of the new line#-Warray-bounds: checks if array reference is out of bounds at compile time. use -fcheck-bounds to also check during runtime
# -Wampersand: checks if a character expression is continued proberly by an ampersand at the end of the line and at the beginning of the new line
# -Warray-bounds: checks if array reference is out of bounds at compile time. use -fcheck-bounds to also check during runtime
# -Wconversion: warn about implicit conversions between different type
# -Wsurprising: warn when "suspicious" code constructs are encountered. While technically legal these usually indicate that an error has been made.
# -Wc-binding-type:

View File

@ -204,8 +204,27 @@ subroutine constitutive_dislotwin_init(fileUnit)
use mesh, only: &
mesh_maxNips, &
mesh_NcpElems
use IO
use material
use IO, only: &
IO_read, &
IO_lc, &
IO_getTag, &
IO_isBlank, &
IO_stringPos, &
IO_stringValue, &
IO_floatValue, &
IO_intValue, &
IO_warning, &
IO_error, &
IO_timeStamp, &
IO_EOF
use material, only: &
homogenization_maxNgrains, &
phase_plasticity, &
phase_plasticityInstance, &
phase_Noutput, &
PLASTICITY_DISLOTWIN_label, &
PLASTICITY_DISLOTWIN_ID, &
MATERIAL_partPhase
use lattice
implicit none
@ -314,7 +333,7 @@ subroutine constitutive_dislotwin_init(fileUnit)
rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= 'phase') ! wind forward to <phase>
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= MATERIAL_partPhase) ! wind forward to <phase>
line = IO_read(fileUnit)
enddo

View File

@ -99,6 +99,10 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine constitutive_j2_init(fileUnit)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use debug, only: &
debug_level, &
debug_constitutive, &
debug_levelBasic
use math, only: &
math_Mandel3333to66, &
math_Voigt66to3333
@ -113,11 +117,14 @@ subroutine constitutive_j2_init(fileUnit)
IO_error, &
IO_timeStamp, &
IO_EOF
use material
use debug, only: &
debug_level, &
debug_constitutive, &
debug_levelBasic
use material, only: &
homogenization_maxNgrains, &
phase_plasticity, &
phase_plasticityInstance, &
phase_Noutput, &
PLASTICITY_J2_label, &
PLASTICITY_J2_ID, &
MATERIAL_partPhase
use lattice
implicit none
@ -169,7 +176,7 @@ subroutine constitutive_j2_init(fileUnit)
allocate(constitutive_j2_tausat_SinhFitD(maxNinstance), source=0.0_pReal)
rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= 'phase') ! wind forward to <phase>
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= material_partPhase) ! wind forward to <phase>
line = IO_read(fileUnit)
enddo

View File

@ -59,6 +59,10 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine constitutive_none_init(fileUnit)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use debug, only: &
debug_level, &
debug_constitutive, &
debug_levelBasic
use math, only: &
math_Mandel3333to66, &
math_Voigt66to3333
@ -73,11 +77,15 @@ subroutine constitutive_none_init(fileUnit)
IO_error, &
IO_timeStamp, &
IO_EOF
use material
use debug, only: &
debug_level, &
debug_constitutive, &
debug_levelBasic
use material, only: &
homogenization_maxNgrains, &
phase_plasticity, &
phase_plasticityInstance, &
phase_Noutput, &
PLASTICITY_NONE_label, &
PLASTICITY_NONE_ID, &
MATERIAL_partPhase
use lattice
implicit none
@ -111,7 +119,7 @@ subroutine constitutive_none_init(fileUnit)
allocate(constitutive_none_Cslip_66(6,6,maxNinstance), source=0.0_pReal)
rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= 'phase') ! wind forward to <phase>
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= material_partPhase) ! wind forward to <phase>
line = IO_read(fileUnit)
enddo

View File

@ -311,8 +311,8 @@ use IO, only: IO_read, &
IO_stringValue, &
IO_floatValue, &
IO_intValue, &
IO_error, &
IO_warning, &
IO_error, &
IO_timeStamp, &
IO_EOF
use debug, only: debug_level, &
@ -326,7 +326,8 @@ use material, only: homogenization_maxNgrains, &
phase_plasticityInstance, &
phase_Noutput, &
PLASTICITY_NONLOCAL_label, &
PLASTICITY_NONLOCAL_ID
PLASTICITY_NONLOCAL_ID, &
MATERIAL_partPhase
use lattice
integer(pInt), intent(in) :: fileUnit
@ -439,7 +440,7 @@ allocate(nonSchmidCoeff(lattice_maxNnonSchmid,maxNmatIDs), sour
!*** readout data from material.config file
rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= 'phase') ! wind forward to <phase>
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= MATERIAL_partPhase) ! wind forward to <phase>
line = IO_read(fileUnit)
enddo

View File

@ -131,15 +131,34 @@ subroutine constitutive_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: &
tol_math_check
use math, only: &
math_Mandel3333to66, &
math_Voigt66to3333
use IO
use material
use debug, only: &
debug_level, &
debug_constitutive,&
debug_levelBasic
use math, only: &
math_Mandel3333to66, &
math_Voigt66to3333
use IO, only: &
IO_read, &
IO_lc, &
IO_getTag, &
IO_isBlank, &
IO_stringPos, &
IO_stringValue, &
IO_floatValue, &
IO_intValue, &
IO_warning, &
IO_error, &
IO_timeStamp, &
IO_EOF
use material, only: &
homogenization_maxNgrains, &
phase_plasticity, &
phase_plasticityInstance, &
phase_Noutput, &
PLASTICITY_PHENOPOWERLAW_label, &
PLASTICITY_PHENOPOWERLAW_ID, &
MATERIAL_partPhase
use lattice
implicit none
@ -232,7 +251,7 @@ subroutine constitutive_phenopowerlaw_init(fileUnit)
source=0.0_pReal)
rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= 'phase') ! wind forward to <phase>
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= material_partPhase) ! wind forward to <phase>
line = IO_read(fileUnit)
enddo

View File

@ -202,16 +202,35 @@ module constitutive_titanmod
!--------------------------------------------------------------------------------------------------
subroutine constitutive_titanmod_init(fileUnit)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use math, only: &
math_Mandel3333to66,&
math_Voigt66to3333,&
math_mul3x3
use IO
use material
use debug, only: &
debug_level,&
debug_constitutive,&
debug_levelBasic
use math, only: &
math_Mandel3333to66,&
math_Voigt66to3333,&
math_mul3x3
use IO, only: &
IO_read, &
IO_lc, &
IO_getTag, &
IO_isBlank, &
IO_stringPos, &
IO_stringValue, &
IO_floatValue, &
IO_intValue, &
IO_warning, &
IO_error, &
IO_timeStamp, &
IO_EOF
use material, only: &
homogenization_maxNgrains, &
phase_plasticity, &
phase_plasticityInstance, &
phase_Noutput, &
PLASTICITY_TITANMOD_label, &
PLASTICITY_TITANMOD_ID, &
MATERIAL_partPhase
use lattice
implicit none
@ -393,11 +412,11 @@ subroutine constitutive_titanmod_init(fileUnit)
constitutive_titanmod_interactionTwinTwin = 0.0_pReal
rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= 'phase') ! wind forward to <phase>
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= MATERIAL_partPhase) ! wind forward to <phase>
line = IO_read(fileUnit)
enddo
do while (trim(line) /= IO_EOF) ! read through sections of phase part
do while (trim(line) /= IO_EOF) ! read through sections of phase part
line = IO_read(fileUnit)
if (IO_isBlank(line)) cycle ! skip empty lines
if (IO_getTag(line,'<','>') /= '') then ! stop at next part

View File

@ -161,6 +161,7 @@ subroutine homogenization_RGC_init(fileUnit)
if (IO_getTag(line,'[',']') /= '') then ! next section
section = section + 1_pInt
output = 0_pInt ! reset output counter
cycle
endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
if (homogenization_type(section) == HOMOGENIZATION_RGC_ID) then ! one of my sections
@ -168,6 +169,8 @@ subroutine homogenization_RGC_init(fileUnit)
positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
select case(tag)
case ('type')
cycle
case ('(output)')
output = output + 1_pInt
homogenization_RGC_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))

View File

@ -108,7 +108,7 @@ subroutine homogenization_isostrain_init(fileUnit)
source=undefined_ID)
rewind(fileUnit)
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= material_partHomogenization) ! wind forward to <homogenization>
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= material_partHomogenization)! wind forward to <homogenization>
line = IO_read(fileUnit)
enddo
@ -122,6 +122,7 @@ subroutine homogenization_isostrain_init(fileUnit)
if (IO_getTag(line,'[',']') /= '') then ! next section
section = section + 1_pInt
output = 0_pInt ! reset output counter
cycle
endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
if (homogenization_type(section) == HOMOGENIZATION_ISOSTRAIN_ID) then ! one of my sections
@ -129,6 +130,8 @@ subroutine homogenization_isostrain_init(fileUnit)
positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
select case(tag)
case('type')
cycle
case ('(output)')
output = output + 1_pInt
homogenization_isostrain_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))
@ -148,7 +151,7 @@ subroutine homogenization_isostrain_init(fileUnit)
' ('//HOMOGENIZATION_isostrain_label//')')
end select
case ('nconstituents','ngrains')
homogenization_isostrain_Ngrains(i) = IO_intValue(line,positions,2_pInt)
homogenization_isostrain_Ngrains(i) = IO_intValue(line,positions,2_pInt)
case ('mapping')
select case(IO_lc(IO_stringValue(line,positions,2_pInt)))
case ('parallel','sum')

View File

@ -318,7 +318,7 @@ subroutine material_parseHomogenization(fileUnit,myPart)
rewind(fileUnit)
line = '' ! to have it initialized
section = 0_pInt ! - " -
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to <homogenization>
line = IO_read(fileUnit)
enddo
if (echo) write(6,'(/,1x,a)') trim(line) ! echo part header
@ -409,7 +409,7 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
section = 0_pInt ! - " -
constituent = 0_pInt ! - " -
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to <microstructure>
line = IO_read(fileUnit)
enddo
if (echo) write(6,'(/,1x,a)') trim(line) ! echo part header
@ -491,7 +491,7 @@ subroutine material_parseCrystallite(fileUnit,myPart)
rewind(fileUnit)
line = '' ! to have it initialized
section = 0_pInt ! - " -
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to <Crystallite>
line = IO_read(fileUnit)
enddo
if (echo) write(6,'(/,1x,a)') trim(line) ! echo part header
@ -563,7 +563,7 @@ subroutine material_parsePhase(fileUnit,myPart)
rewind(fileUnit)
line = '' ! to have it initialized
section = 0_pInt ! - " -
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to <Phase>
line = IO_read(fileUnit)
enddo
if (echo) write(6,'(/,1x,a)') trim(line) ! echo part header
@ -680,8 +680,7 @@ subroutine material_parseTexture(fileUnit,myPart)
section = 0_pInt ! - " -
gauss = 0_pInt ! - " -
fiber = 0_pInt ! - " -
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to <texture>
line = IO_read(fileUnit)
enddo
if (echo) write(6,'(/,1x,a)') trim(line) ! echo part header