Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
52
Issues
52
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
ee77d973
Commit
ee77d973
authored
May 09, 2019
by
Matthias Redies
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more information to parallel check
parent
733e098e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
9 deletions
+43
-9
juDFT/check_para.f90
juDFT/check_para.f90
+43
-9
No files found.
juDFT/check_para.f90
View file @
ee77d973
...
...
@@ -6,6 +6,39 @@ CONTAINS
call
check_omp_para
()
end
subroutine
juDFT_check_para
!subroutine check_mpi_para(mpi)
!use m_judft_string
!use m_judft_stop
!implicit none
!TYPE(t_mpi) ,INTENT(IN) :: mpi
!real(8) :: summe, summe_seq, t_mpi, t_seq
!integer(4) :: rank, size, ierr
!integer :: i, omp_threads
!integer, parameter :: loop_end = 300000000
!t_mpi = MPI_Wtime()
!summe = 0.0
!do i = 1, loop_end*omp_threads
!summe = summe + 1.0
!enddo
!t_mpi = MPI_Wtime() - t_mpi
!call MPI_Reduce(summe, summe_seq, 1, MPI_REAL8, MPI_SUM, 0, mpi%mpi_comm)
!if(mpi%irank == 0) then
!summe = summe / mpi%isize
!t_seq = MPI_Wtime()
!summe = 0.0
!do i = 1, loop_end*omp_threads
!summe = summe + 1.0
!enddo
!t_seq = MPI_Wtime() - t_seq
!endif
!end subroutine check_mpi_para
subroutine
check_omp_para
()
use
omp_lib
use
m_judft_string
...
...
@@ -18,14 +51,14 @@ CONTAINS
summe
=
0.0
!$omp parallel reduction(+: t_omp)
omp_threads
=
OMP_GET_NUM_THREADS
()
t_omp
=
OMP_GET_WTIME
()
!$omp do reduction(+:summe)
do
i
=
1
,
loop_end
*
omp_threads
summe
=
summe
+
1.0
enddo
!$omp end do
t_omp
=
OMP_GET_WTIME
()
-
t_omp
omp_threads
=
OMP_GET_NUM_THREADS
()
t_omp
=
OMP_GET_WTIME
()
!$omp do reduction(+:summe)
do
i
=
1
,
loop_end
*
omp_threads
summe
=
summe
+
1.0
enddo
!$omp end do
t_omp
=
OMP_GET_WTIME
()
-
t_omp
!$omp end parallel
t_omp
=
t_omp
/
omp_threads
...
...
@@ -41,12 +74,13 @@ CONTAINS
if
(
abs
(
t_seq
/
t_omp
-1.0
)
<
0.1
)
then
write
(
*
,
*
)
"Parallelization OK"
else
write
(
*
,
*
)
"number of OMPs = "
,
omp_threads
write
(
*
,
*
)
"t_omp = "
,
t_omp
write
(
*
,
*
)
"t_seq = "
,
t_seq
write
(
*
,
*
)
"Summe = "
,
summe
call
juDFT_warn
(
"OMP parallelization underperform with a parallel efficiency of "
//
&
float2str
(
t_seq
/
t_omp
),
hint
=
"check if your slurm files is set properly"
)
float2str
(
t_seq
/
t_omp
),
hint
=
"check if your slurm files is set properly"
)
endif
end
subroutine
check_omp_para
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment