10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-08 07:03:57 +01:00

Solve OpenMP segfault lock init

This commit is contained in:
TApplencourt 2016-02-08 09:49:40 +01:00
parent 5d2434e19c
commit ad21a3b8ce

View File

@ -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