mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-12 06:08:30 +02:00
Bug in ei_handler
This commit is contained in:
parent
1354ab86fb
commit
078ee95e12
@ -345,7 +345,7 @@ def save_ezfio_provider(path_head, dict_code_provider):
|
|||||||
path = "{0}/ezfio_interface.irp.f".format(path_head)
|
path = "{0}/ezfio_interface.irp.f".format(path_head)
|
||||||
|
|
||||||
l_output = ["! DO NOT MODIFY BY HAND",
|
l_output = ["! DO NOT MODIFY BY HAND",
|
||||||
"! Created by $QP_ROOT/scripts/ezfio_interface.py",
|
"! Created by $QP_ROOT/scripts/ezfio_interface/ei_handler.py",
|
||||||
"! from file {0}/EZFIO.cfg".format(path_head),
|
"! from file {0}/EZFIO.cfg".format(path_head),
|
||||||
"\n"]
|
"\n"]
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ END_PROVIDER
|
|||||||
|
|
||||||
def set_write(self):
|
def set_write(self):
|
||||||
self.write = ""
|
self.write = ""
|
||||||
|
if "size" in self.__dict__:
|
||||||
|
return
|
||||||
if self.type in self.write_correspondance:
|
if self.type in self.write_correspondance:
|
||||||
write = self.write_correspondance[self.type]
|
write = self.write_correspondance[self.type]
|
||||||
output = self.output
|
output = self.output
|
||||||
|
@ -10,6 +10,7 @@ subroutine $subroutine($params_main)
|
|||||||
|
|
||||||
$decls_main
|
$decls_main
|
||||||
|
|
||||||
|
integer :: i
|
||||||
integer :: i_generator
|
integer :: i_generator
|
||||||
double precision :: wall_0, wall_1
|
double precision :: wall_0, wall_1
|
||||||
integer(omp_lock_kind) :: lck
|
integer(omp_lock_kind) :: lck
|
||||||
@ -37,23 +38,21 @@ subroutine $subroutine($params_main)
|
|||||||
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
integer(ZMQ_PTR) :: collector_thread
|
PROVIDE nproc
|
||||||
external :: $subroutine_collector
|
!$OMP PARALLEL DEFAULT(NONE) &
|
||||||
rc = pthread_create(collector_thread, $subroutine_collector)
|
!$OMP PRIVATE(i, pt2, norm_pert, H_pert_diag, N_st, n, task_id) &
|
||||||
|
!$OMP SHARED(zmq_socket_pair) &
|
||||||
!$OMP PARALLEL DEFAULT(private)
|
!$OMP num_threads(nproc+1)
|
||||||
!$OMP TASK PRIVATE(rc)
|
i = omp_get_thread_num()
|
||||||
rc = omp_get_thread_num()
|
if (i == 0) then
|
||||||
call $subroutine_slave_inproc(rc)
|
call $subroutine_collector()
|
||||||
!$OMP END TASK
|
|
||||||
!$OMP TASKWAIT
|
|
||||||
!$OMP END PARALLEL
|
|
||||||
|
|
||||||
|
|
||||||
integer :: n, task_id
|
integer :: n, task_id
|
||||||
call pull_pt2(zmq_socket_pair, pt2, norm_pert, H_pert_diag, N_st, n, task_id)
|
call pull_pt2(zmq_socket_pair, pt2, norm_pert, H_pert_diag, N_st, n, task_id)
|
||||||
|
else
|
||||||
|
call $subroutine_slave_inproc(i)
|
||||||
|
endif
|
||||||
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
rc = pthread_join(collector_thread)
|
|
||||||
|
|
||||||
call end_zmq_pair_socket(zmq_socket_pair)
|
call end_zmq_pair_socket(zmq_socket_pair)
|
||||||
call end_parallel_job(zmq_to_qp_run_socket,'$subroutine')
|
call end_parallel_job(zmq_to_qp_run_socket,'$subroutine')
|
||||||
|
@ -374,20 +374,16 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ]
|
|||||||
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
integer(ZMQ_PTR) :: collector_thread
|
PROVIDE nproc
|
||||||
external :: ao_bielec_integrals_in_map_collector
|
!$OMP PARALLEL DEFAULT(private) num_threads(nproc+1)
|
||||||
rc = pthread_create(collector_thread, ao_bielec_integrals_in_map_collector)
|
|
||||||
|
|
||||||
!$OMP PARALLEL DEFAULT(private)
|
|
||||||
!$OMP TASK PRIVATE(i)
|
|
||||||
i = omp_get_thread_num()
|
i = omp_get_thread_num()
|
||||||
|
if (i==0) then
|
||||||
|
call ao_bielec_integrals_in_map_collector(i)
|
||||||
|
else
|
||||||
call ao_bielec_integrals_in_map_slave_inproc(i)
|
call ao_bielec_integrals_in_map_slave_inproc(i)
|
||||||
!$OMP END TASK
|
endif
|
||||||
!$OMP TASKWAIT
|
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
rc = pthread_join(collector_thread)
|
|
||||||
|
|
||||||
call end_parallel_job(zmq_to_qp_run_socket, 'ao_integrals')
|
call end_parallel_job(zmq_to_qp_run_socket, 'ao_integrals')
|
||||||
|
|
||||||
|
|
||||||
|
@ -295,18 +295,6 @@ BEGIN_PROVIDER [ integer, nproc ]
|
|||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ integer, iproc_save, (nproc) ]
|
|
||||||
implicit none
|
|
||||||
BEGIN_DOC
|
|
||||||
! iproc_save(i) = i-1. Used to start threads with pthreads.
|
|
||||||
END_DOC
|
|
||||||
integer :: i
|
|
||||||
do i=1,nproc
|
|
||||||
iproc_save(i) = i-1
|
|
||||||
enddo
|
|
||||||
|
|
||||||
END_PROVIDER
|
|
||||||
|
|
||||||
|
|
||||||
double precision function u_dot_v(u,v,sze)
|
double precision function u_dot_v(u,v,sze)
|
||||||
implicit none
|
implicit none
|
||||||
|
Loading…
Reference in New Issue
Block a user