avoid issues with unsufficient length of strings

This commit is contained in:
Martin Diehl 2020-01-26 13:18:29 +01:00
parent 3b8dd17e5b
commit decf9371ea
2 changed files with 9 additions and 6 deletions

View File

@ -86,12 +86,14 @@ subroutine DAMASK_interface_init
===================================================================================================
#endif
character(len=1024) :: &
commandLine, & !< command line call as string
character(len=pPathLen*3+pStringLen) :: &
commandLine !< command line call as string
character(len=pPathLen) :: &
arg, & !< individual argument
loadCaseArg = '', & !< -l argument given to the executable
geometryArg = '', & !< -g argument given to the executable
workingDirArg = '', & !< -w argument given to the executable
workingDirArg = '' !< -w argument given to the executable
character(len=pStringLen) :: &
userName !< name of user calling the executable
integer :: &
stat, &
@ -295,7 +297,7 @@ end subroutine DAMASK_interface_init
subroutine setWorkingDirectory(workingDirectoryArg)
character(len=*), intent(in) :: workingDirectoryArg !< working directory argument
character(len=1024) :: workingDirectory !< working directory argument
character(len=pPathLen) :: workingDirectory
logical :: error
external :: quit

View File

@ -89,7 +89,7 @@ module numerics
structOrder = 2 !< order of displacement shape functions
logical, protected, public :: &
BBarStabilisation = .false.
character(len=4096), protected, public :: &
character(len=*), parameter, public :: &
petsc_defaultOptions = '-mech_snes_type newtonls &
&-mech_snes_linesearch_type cp &
&-mech_snes_ksp_ew &
@ -100,7 +100,8 @@ module numerics
&-mech_pc_type ml &
&-mech_mg_levels_ksp_type chebyshev &
&-mech_mg_levels_pc_type sor &
&-mech_pc_ml_nullspace user ',&
&-mech_pc_ml_nullspace user'
character(len=pStringLen), protected, public :: &
petsc_options = ''
#endif