Skip to content

Commit

Permalink
[skip ci] Add some timing and other info to std out.
Browse files Browse the repository at this point in the history
  • Loading branch information
raback committed Nov 7, 2024
1 parent a1bb065 commit cd675de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
3 changes: 3 additions & 0 deletions fem/src/MeshUtils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,10 @@ SUBROUTINE PrepareMesh( Model, Mesh, Parallel, Def_Dofs, mySolver )
CALL NonNodalElements()

IF( Parallel ) THEN
CALL Info(Caller,'Generating parallel communications for the non-nodal mesh',Level=20)
CALL ResetTimer('ParallelNonNodal')
CALL ParallelNonNodalElements()
CALL CheckTimer('ParallelNonNodal',Level=7,Delete=.TRUE.)
END IF

CALL EnlargeCoordinates( Mesh )
Expand Down
25 changes: 10 additions & 15 deletions fem/src/SParIterSolver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,10 @@ END SUBROUTINE SolveTrilinos4
!
!------------------------------------------------------------------

CALL Info(Caller,'Copying Matrix values into SplittedMatrix',Level=20)
CALL ResetTimer('SplittedMatrix')


GT => SplittedMatrix % GlueTable
DO i = 1, SourceMatrix % NumberOfRows
GRow = ParallelInfo % GlobalDOFs(i)
Expand Down Expand Up @@ -2154,12 +2158,14 @@ END SUBROUTINE SolveTrilinos4
END DO

CALL GlueFinalize( SourceMatrix, SplittedMatrix, ParallelInfo )
CALL CheckTimer('SplittedMatrix',Level=7,Delete=.TRUE.)


!------------------------------------------------------------------
!
! Call the actual solver routine (based on older design)
!
!------------------------------------------------------------------
CALL Info(Caller,'Going into actual parallel solution',Level=20)

CALL Solve( SourceMatrix, SParMatrixDesc % SplittedMatrix, &
ParallelInfo, RHSVec, XVec, Solver, Errinfo )

Expand Down Expand Up @@ -2436,9 +2442,7 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &
PIGpntr => GlobalData

!----------------------------------------------------------------------
!
! Initialize Right-Hand-Side
!
!----------------------------------------------------------------------
ALLOCATE(TmpRHSVec(SplittedMatrix % InsideMatrix % NumberOfRows))
TmpRHSVec = 0
Expand Down Expand Up @@ -2495,12 +2499,10 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &

GlobalMatrix % Ematrix => SourceMatrix
GlobalMatrix % COMPLEX = SourceMatrix % COMPLEX

!----------------------------------------------------------------------
!
! Set up the preconditioner
!
!----------------------------------------------------------------------

IF (SplittedMatrix % InsideMatrix % NumberOFRows>0) THEN
! IF (SplittedMatrix % InsideMatrix % Diag(1)==0) THEN
DO i = 1, SplittedMatrix % InsideMatrix % NumberOfRows
Expand Down Expand Up @@ -2533,11 +2535,8 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &


!----------------------------------------------------------------------
!
! Call the main iterator routine
!
!----------------------------------------------------------------------

CM => SourceMatrix % ConstraintMatrix
IF (ASSOCIATED(CM)) THEN
ALLOCATE(SPerm(SourceMatrix % NumberOfRows)); SPerm=0
Expand Down Expand Up @@ -2576,9 +2575,7 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &
GlobalMatrix => SaveMatrix

!----------------------------------------------------------------------
!
! Collect the result
!
!----------------------------------------------------------------------
ALLOCATE( VecEPerNB( ParEnv % PEs ) )
VecEPerNB = 0
Expand Down Expand Up @@ -2609,12 +2606,10 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &
END DO

CALL ExchangeResult( SourceMatrix,SplittedMatrix,ParallelInfo,XVec )

!----------------------------------------------------------------------
!
! Clean the work space
!
!----------------------------------------------------------------------

DEALLOCATE( TmpXVec, TmpRHSVec, VecEPerNB )
!----------------------------------------------------------------------
END SUBROUTINE Solve
Expand Down

0 comments on commit cd675de

Please sign in to comment.