Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions ED/src/driver/edmain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ program main
integer :: num_procs !<= omp_get_num_procs()
integer :: thread
integer :: cpu
integer, dimension(64) :: thread_use
integer, dimension(64) :: cpu_use
integer, dimension(:), allocatable :: thread_use
integer, dimension(:), allocatable :: cpu_use
integer, external :: findmycpu
!---------------------------------------------------------------------------------------!

Expand Down Expand Up @@ -187,10 +187,12 @@ program main
num_procs = 1
thread = 1
cpu = 1
thread_use(:) = 0
cpu_use(:) = 0
!$ max_threads = omp_get_max_threads()
!$ num_procs = omp_get_num_procs()
allocate(thread_use(max_threads))
allocate(cpu_use(num_procs))
thread_use(:) = 0
cpu_use(:) = 0

!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(thread,cpu)
do n = 1,max_threads
Expand Down Expand Up @@ -308,6 +310,12 @@ program main
end select
!---------------------------------------------------------------------------------------!


!----- Deallocate arrays ---------------------------------------------------------------!
deallocate(thread_use)
deallocate(cpu_use)
!---------------------------------------------------------------------------------------!

stop
end program main
!==========================================================================================!
Expand Down
Loading