Skip to content

Commit

Permalink
Merge pull request #902 from andrew-platt/b/IntelBugFixes
Browse files Browse the repository at this point in the history
Fixes for Intel in debug mode
  • Loading branch information
andrew-platt authored Nov 8, 2021
2 parents 34ef10e + 0f93a7f commit a5637c9
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 109 deletions.
20 changes: 10 additions & 10 deletions modules/elastodyn/src/ElastoDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2460,18 +2460,18 @@ END SUBROUTINE Alloc_CoordSys
SUBROUTINE SetBladeParameters( p, BladeInData, BladeMeshData, ErrStat, ErrMsg )
!..................................................................................................................................

TYPE(ED_ParameterType), INTENT(INOUT) :: p !< The parameters of the structural dynamics module
TYPE(BladeInputData), INTENT(IN) :: BladeInData(:) !< Program input data for all blades
TYPE(ED_BladeMeshInputData), INTENT(IN) :: BladeMeshData(:) !< Program input mesh data for all blades
INTEGER(IntKi), INTENT(OUT) :: ErrStat !< Error status
CHARACTER(*), INTENT(OUT) :: ErrMsg !< Error message
TYPE(ED_ParameterType), INTENT(INOUT) :: p !< The parameters of the structural dynamics module
TYPE(BladeInputData), ALLOCATABLE, INTENT(IN) :: BladeInData(:) !< Program input data for all blades
TYPE(ED_BladeMeshInputData), ALLOCATABLE, INTENT(IN) :: BladeMeshData(:) !< Program input mesh data for all blades
INTEGER(IntKi), INTENT(OUT) :: ErrStat !< Error status
CHARACTER(*), INTENT(OUT) :: ErrMsg !< Error message

! Local variables:
REAL(ReKi) :: x ! Fractional location between two points in linear interpolation
INTEGER(IntKi ) :: K ! Blade number
INTEGER(IntKi ) :: J ! Index for the node arrays
INTEGER(IntKi) :: InterpInd ! Index for the interpolation routine
LOGICAL :: SetAdmVals ! Logical to determine if Adams inputs should be set
REAL(ReKi) :: x ! Fractional location between two points in linear interpolation
INTEGER(IntKi ) :: K ! Blade number
INTEGER(IntKi ) :: J ! Index for the node arrays
INTEGER(IntKi) :: InterpInd ! Index for the interpolation routine
LOGICAL :: SetAdmVals ! Logical to determine if Adams inputs should be set

! initialize variables
ErrStat = ErrID_None
Expand Down
38 changes: 19 additions & 19 deletions modules/hydrodyn/src/HydroDyn_Output.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1127,25 +1127,25 @@ SUBROUTINE HDOut_MapOutputs( CurrentTime, p, y, m_WAMIT, m_WAMIT2, NWaveElev, Wa
! This subroutine writes the data stored in the y variable to the correct indexed postions in WriteOutput
! This is called by HydroDyn_CalcOutput() at each time step.
!----------------------------------------------------------------------------------------------------
REAL(DbKi), INTENT( IN ) :: CurrentTime ! Current simulation time in seconds
TYPE(HydroDyn_ParameterType), INTENT( IN ) :: p ! HydroDyn's parameter data
TYPE(HydroDyn_OutputType), INTENT( INOUT ) :: y ! HydroDyn's output data
type(WAMIT_MiscVarType), intent( in ) :: m_WAMIT(:) ! WAMIT object's MiscVar data
type(WAMIT2_MiscVarType), intent( in ) :: m_WAMIT2(:) ! WAMIT2 object's MiscVar data
INTEGER, INTENT( IN ) :: NWaveElev ! Number of wave elevation locations to output
REAL(ReKi), INTENT( IN ) :: WaveElev(:) ! Instantaneous total elevation of incident waves at each of the NWaveElev points where the incident wave elevations can be output (meters)
REAL(ReKi), INTENT( IN ) :: WaveElev1(:) ! Instantaneous first order elevation of incident waves at each of the NWaveElev points where the incident wave elevations can be output (meters)
REAL(ReKi), INTENT( IN ) :: WaveElev2(:) ! Instantaneous second order elevation of incident waves at each of the NWaveElev points where the incident wave elevations can be output (meters)
REAL(ReKi), INTENT( IN ) :: F_Add(:)
REAL(ReKi), INTENT( IN ) :: F_Waves(:)
REAL(ReKi), INTENT( IN ) :: F_Hydro(:) ! All hydrodynamic loads integrated at (0,0,0) in the global coordinate system
type(MeshType), INTENT( IN ) :: PRPmesh ! the PRP mesh -- for motions output
REAL(ReKi), INTENT( IN ) :: q(:) ! WAMIT body translations and rotations
REAL(ReKi), INTENT( IN ) :: qdot(:) ! WAMIT body translational and rotational velocities
REAL(ReKi), INTENT( IN ) :: qdotdot(:) ! WAMIT body translational and rotational accelerations
REAL(ReKi), INTENT( OUT ) :: AllOuts(MaxHDOutputs)
INTEGER(IntKi), INTENT( OUT ) :: ErrStat ! Error status of the operation
CHARACTER(*), INTENT( OUT ) :: ErrMsg ! Error message if ErrStat /= ErrID_None
REAL(DbKi), INTENT( IN ) :: CurrentTime ! Current simulation time in seconds
TYPE(HydroDyn_ParameterType), INTENT( IN ) :: p ! HydroDyn's parameter data
TYPE(HydroDyn_OutputType), INTENT( INOUT ) :: y ! HydroDyn's output data
type(WAMIT_MiscVarType), ALLOCATABLE, intent( in ) :: m_WAMIT(:) ! WAMIT object's MiscVar data
type(WAMIT2_MiscVarType), ALLOCATABLE, intent( in ) :: m_WAMIT2(:) ! WAMIT2 object's MiscVar data
INTEGER, INTENT( IN ) :: NWaveElev ! Number of wave elevation locations to output
REAL(ReKi), INTENT( IN ) :: WaveElev(:) ! Instantaneous total elevation of incident waves at each of the NWaveElev points where the incident wave elevations can be output (meters)
REAL(ReKi), INTENT( IN ) :: WaveElev1(:) ! Instantaneous first order elevation of incident waves at each of the NWaveElev points where the incident wave elevations can be output (meters)
REAL(ReKi), INTENT( IN ) :: WaveElev2(:) ! Instantaneous second order elevation of incident waves at each of the NWaveElev points where the incident wave elevations can be output (meters)
REAL(ReKi), ALLOCATABLE, INTENT( IN ) :: F_Add(:)
REAL(ReKi), ALLOCATABLE, INTENT( IN ) :: F_Waves(:)
REAL(ReKi), INTENT( IN ) :: F_Hydro(:) ! All hydrodynamic loads integrated at (0,0,0) in the global coordinate system
type(MeshType), INTENT( IN ) :: PRPmesh ! the PRP mesh -- for motions output
REAL(ReKi), INTENT( IN ) :: q(:) ! WAMIT body translations and rotations
REAL(ReKi), INTENT( IN ) :: qdot(:) ! WAMIT body translational and rotational velocities
REAL(ReKi), INTENT( IN ) :: qdotdot(:) ! WAMIT body translational and rotational accelerations
REAL(ReKi), INTENT( OUT ) :: AllOuts(MaxHDOutputs)
INTEGER(IntKi), INTENT( OUT ) :: ErrStat ! Error status of the operation
CHARACTER(*), INTENT( OUT ) :: ErrMsg ! Error message if ErrStat /= ErrID_None

INTEGER :: I, iBody, startIndx, endIndx
integer(IntKi) :: ErrStat2
Expand Down
96 changes: 48 additions & 48 deletions modules/hydrodyn/src/Morison.f90
Original file line number Diff line number Diff line change
Expand Up @@ -519,27 +519,27 @@ SUBROUTINE WriteSummaryFile( UnSum, g, MSL2SWL, WtrDpth, numJoints, numNodes, no
NOutputs, OutParam, NMOutputs, MOutLst, NJOutputs, JOutLst, uMesh, yMesh, &
p, m, errStat, errMsg )

INTEGER, INTENT ( IN ) :: UnSum
REAL(ReKi), INTENT ( IN ) :: g ! gravity
REAL(ReKi), INTENT ( IN ) :: MSL2SWL
REAL(ReKi), INTENT ( IN ) :: WtrDpth
INTEGER, INTENT ( IN ) :: numJoints
INTEGER, INTENT ( IN ) :: numNodes
TYPE(Morison_NodeType), INTENT ( IN ) :: nodes(:)
INTEGER, INTENT ( IN ) :: numMembers
TYPE(Morison_MemberType), INTENT ( IN ) :: members(:)
INTEGER, INTENT ( IN ) :: NOutputs
TYPE(OutParmType), INTENT ( IN ) :: OutParam(:)
INTEGER, INTENT ( IN ) :: NMOutputs
TYPE(Morison_MOutput), INTENT ( IN ) :: MOutLst(:)
INTEGER, INTENT ( IN ) :: NJOutputs
TYPE(Morison_JOutput), INTENT ( IN ) :: JOutLst(:)
TYPE(MeshType), INTENT ( INOUT ) :: uMesh
TYPE(MeshType), INTENT ( INOUT ) :: yMesh
TYPE(Morison_ParameterType), INTENT ( IN ) :: p
TYPE(Morison_MiscVarType), INTENT ( IN ) :: m
INTEGER, INTENT ( OUT ) :: errStat ! returns a non-zero value when an error occurs
CHARACTER(*), INTENT ( OUT ) :: errMsg ! Error message if errStat /= ErrID_None
INTEGER, INTENT ( IN ) :: UnSum
REAL(ReKi), INTENT ( IN ) :: g ! gravity
REAL(ReKi), INTENT ( IN ) :: MSL2SWL
REAL(ReKi), INTENT ( IN ) :: WtrDpth
INTEGER, INTENT ( IN ) :: numJoints
INTEGER, INTENT ( IN ) :: numNodes
TYPE(Morison_NodeType), ALLOCATABLE, INTENT ( IN ) :: nodes(:)
INTEGER, INTENT ( IN ) :: numMembers
TYPE(Morison_MemberType), ALLOCATABLE, INTENT ( IN ) :: members(:)
INTEGER, INTENT ( IN ) :: NOutputs
TYPE(OutParmType), ALLOCATABLE, INTENT ( IN ) :: OutParam(:)
INTEGER, INTENT ( IN ) :: NMOutputs
TYPE(Morison_MOutput), ALLOCATABLE, INTENT ( IN ) :: MOutLst(:)
INTEGER, INTENT ( IN ) :: NJOutputs
TYPE(Morison_JOutput), ALLOCATABLE, INTENT ( IN ) :: JOutLst(:)
TYPE(MeshType), INTENT ( INOUT ) :: uMesh
TYPE(MeshType), INTENT ( INOUT ) :: yMesh
TYPE(Morison_ParameterType), INTENT ( IN ) :: p
TYPE(Morison_MiscVarType), INTENT ( IN ) :: m
INTEGER, INTENT ( OUT ) :: errStat ! returns a non-zero value when an error occurs
CHARACTER(*), INTENT ( OUT ) :: errMsg ! Error message if errStat /= ErrID_None

INTEGER :: I, J
REAL(ReKi) :: l ! length of an element
Expand Down Expand Up @@ -1119,27 +1119,27 @@ SUBROUTINE SetExternalHydroCoefs( MSL2SWL, MCoefMod, MmbrCoefIDIndx, SimplCd, S
! This private subroutine generates the Cd, Ca, Cp, CdMG, CaMG and CpMG coefs for the member based on
! the input data.
!----------------------------------------------------------------------------------------------------
real(ReKi), intent(in ) :: MSL2SWL
integer(IntKi), intent(in ) :: MCoefMod
integer(IntKi), intent(in ) :: MmbrCoefIDIndx
real(ReKi), intent(in ) :: SimplCd
real(ReKi), intent(in ) :: SimplCdMG
real(ReKi), intent(in ) :: SimplCa
real(ReKi), intent(in ) :: SimplCaMG
real(ReKi), intent(in ) :: SimplCp
real(ReKi), intent(in ) :: SimplCpMG
real(ReKi), intent(in ) :: SimplAxCd
real(ReKi), intent(in ) :: SimplAxCdMG
real(ReKi), intent(in ) :: SimplAxCa
real(ReKi), intent(in ) :: SimplAxCaMG
real(ReKi), intent(in ) :: SimplAxCp
real(ReKi), intent(in ) :: SimplAxCpMG
type(Morison_CoefMembers), intent(in ) :: CoefMembers(:)
integer(IntKi), intent(in ) :: NCoefDpth
type(Morison_CoefDpths), intent(in ) :: CoefDpths(:)
integer(IntKi), intent(in ) :: numNodes
type(Morison_NodeType), intent(in ) :: nodes(:)
type(Morison_MemberType), intent(inout) :: member
real(ReKi), intent(in ) :: MSL2SWL
integer(IntKi), intent(in ) :: MCoefMod
integer(IntKi), intent(in ) :: MmbrCoefIDIndx
real(ReKi), intent(in ) :: SimplCd
real(ReKi), intent(in ) :: SimplCdMG
real(ReKi), intent(in ) :: SimplCa
real(ReKi), intent(in ) :: SimplCaMG
real(ReKi), intent(in ) :: SimplCp
real(ReKi), intent(in ) :: SimplCpMG
real(ReKi), intent(in ) :: SimplAxCd
real(ReKi), intent(in ) :: SimplAxCdMG
real(ReKi), intent(in ) :: SimplAxCa
real(ReKi), intent(in ) :: SimplAxCaMG
real(ReKi), intent(in ) :: SimplAxCp
real(ReKi), intent(in ) :: SimplAxCpMG
type(Morison_CoefMembers), allocatable, intent(in ) :: CoefMembers(:)
integer(IntKi), intent(in ) :: NCoefDpth
type(Morison_CoefDpths), allocatable, intent(in ) :: CoefDpths(:)
integer(IntKi), intent(in ) :: numNodes
type(Morison_NodeType), allocatable, intent(in ) :: nodes(:)
type(Morison_MemberType), intent(inout) :: member

type(Morison_NodeType) :: node, node1, node2
integer(IntKi) :: i, j
Expand Down Expand Up @@ -1199,12 +1199,12 @@ end subroutine SetExternalHydroCoefs

SUBROUTINE SetNodeMG( numMGDepths, MGDepths, node, MSL2SWL, tMG, MGdensity )
! sets the margine growth thickness of a single node (previously all nodes)
INTEGER, INTENT( IN ) :: numMGDepths
TYPE(Morison_MGDepthsType), INTENT( IN ) :: MGDepths(:)
TYPE(Morison_NodeType), INTENT( IN ) :: node
real(ReKi), intent( in ) :: MSL2SWL
real(ReKi), intent( inout ) :: tMG
real(ReKi), intent( inout ) :: MGdensity
INTEGER, INTENT( IN ) :: numMGDepths
TYPE(Morison_MGDepthsType), ALLOCATABLE, INTENT( IN ) :: MGDepths(:)
TYPE(Morison_NodeType), INTENT( IN ) :: node
real(ReKi), intent( in ) :: MSL2SWL
real(ReKi), intent( inout ) :: tMG
real(ReKi), intent( inout ) :: MGdensity

INTEGER :: I, J
REAL(ReKi) :: z
Expand Down
8 changes: 4 additions & 4 deletions modules/map/src/map.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1061,16 +1061,16 @@ SUBROUTINE map_set_input_file_contents(InitInp, p)

SELECT CASE( p%InputLineType(iLine) )
CASE('C')
InitInp%C_obj%library_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%library_input_str )
InitInp%C_obj%library_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%library_input_str, SIZE(InitInp%C_obj%library_input_str) )
CALL MAP_SetCableLibraryData(InitInp%C_obj)
CASE ('N')
InitInp%C_obj%node_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%node_input_str )
InitInp%C_obj%node_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%node_input_str, SIZE(InitInp%C_obj%library_input_str) )
CALL MAP_SetNodeData(InitInp%C_obj)
CASE ('E')
InitInp%C_obj%line_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%line_input_str )
InitInp%C_obj%line_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%line_input_str, SIZE(InitInp%C_obj%library_input_str) )
CALL MAP_SetElementData(InitInp%C_obj)
CASE ('S')
InitInp%C_obj%option_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%option_input_str )
InitInp%C_obj%option_input_str = TRANSFER(TRIM(p%InputLines(iLine))//" "//C_NULL_CHAR, InitInp%C_obj%option_input_str, SIZE(InitInp%C_obj%library_input_str) )
CALL MAP_SetSolverOptions(InitInp%C_obj)
END SELECT

Expand Down
2 changes: 1 addition & 1 deletion modules/openfast-library/src/FAST_Solver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3669,7 +3669,7 @@ SUBROUTINE Create_FullOpt1_UVector(u, ED_PlatformPtMesh, SD_TPMesh, SD_LMesh, HD
TYPE(MeshType) , INTENT(IN ) :: HD_M_Mesh !< HydroDyn Morison Lumped mesh
TYPE(MeshType) , INTENT(IN ) :: HD_WAMIT_Mesh !< HydroDyn WAMIT mesh
TYPE(MeshType) , INTENT(IN ) :: ED_HubPtLoad !< ElastoDyn HubPt mesh
TYPE(MeshType) , INTENT(IN ) :: BD_RootMotion(:) !< BeamDyn RootMotion meshes
TYPE(MeshType), ALLOCATABLE , INTENT(IN ) :: BD_RootMotion(:) !< BeamDyn RootMotion meshes
TYPE(MeshType) , INTENT(IN ) :: Orca_PtfmMesh !< OrcaFlex interface PtfmMesh
TYPE(MeshType) , INTENT(IN ) :: ExtPtfm_PtfmMesh !< ExtPtfm interface PtfmMesh
TYPE(StC_InputType), ALLOCATABLE , INTENT(IN ) :: SrvD_u_SStC(:) !< ServoDyn SStC inputs (this will be changed later to mesh)
Expand Down
Loading

0 comments on commit a5637c9

Please sign in to comment.