mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-31 08:33:40 +02:00
Solve OpenMP segfault lock init
This commit is contained in:
parent
5d2434e19c
commit
ad21a3b8ce
@ -69,7 +69,6 @@ subroutine cache_map_init(map,sze)
|
|||||||
implicit none
|
implicit none
|
||||||
type (cache_map_type), intent(inout) :: map
|
type (cache_map_type), intent(inout) :: map
|
||||||
integer(cache_map_size_kind) :: sze
|
integer(cache_map_size_kind) :: sze
|
||||||
call omp_init_lock(map%lock)
|
|
||||||
call omp_set_lock(map%lock)
|
call omp_set_lock(map%lock)
|
||||||
map%n_elements = 0_8
|
map%n_elements = 0_8
|
||||||
map%map_size = 0_8
|
map%map_size = 0_8
|
||||||
@ -101,6 +100,9 @@ subroutine map_init(map,keymax)
|
|||||||
stop 5
|
stop 5
|
||||||
endif
|
endif
|
||||||
sze = 2
|
sze = 2
|
||||||
|
do i=0_8,map%map_size
|
||||||
|
call omp_init_lock(map%map(i)%lock)
|
||||||
|
enddo
|
||||||
!$OMP PARALLEL DEFAULT(NONE) SHARED(map,sze) PRIVATE(i)
|
!$OMP PARALLEL DEFAULT(NONE) SHARED(map,sze) PRIVATE(i)
|
||||||
!$OMP DO SCHEDULE(STATIC,512)
|
!$OMP DO SCHEDULE(STATIC,512)
|
||||||
do i=0_8,map%map_size
|
do i=0_8,map%map_size
|
||||||
|
Loading…
Reference in New Issue
Block a user