mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 12:23:48 +01: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)
|
||||
|
||||
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),
|
||||
"\n"]
|
||||
|
||||
|
@ -56,6 +56,8 @@ END_PROVIDER
|
||||
|
||||
def set_write(self):
|
||||
self.write = ""
|
||||
if "size" in self.__dict__:
|
||||
return
|
||||
if self.type in self.write_correspondance:
|
||||
write = self.write_correspondance[self.type]
|
||||
output = self.output
|
||||
|
@ -10,6 +10,7 @@ subroutine $subroutine($params_main)
|
||||
|
||||
$decls_main
|
||||
|
||||
integer :: i
|
||||
integer :: i_generator
|
||||
double precision :: wall_0, wall_1
|
||||
integer(omp_lock_kind) :: lck
|
||||
@ -37,24 +38,22 @@ subroutine $subroutine($params_main)
|
||||
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||
enddo
|
||||
|
||||
integer(ZMQ_PTR) :: collector_thread
|
||||
external :: $subroutine_collector
|
||||
rc = pthread_create(collector_thread, $subroutine_collector)
|
||||
|
||||
!$OMP PARALLEL DEFAULT(private)
|
||||
!$OMP TASK PRIVATE(rc)
|
||||
rc = omp_get_thread_num()
|
||||
call $subroutine_slave_inproc(rc)
|
||||
!$OMP END TASK
|
||||
!$OMP TASKWAIT
|
||||
PROVIDE nproc
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i, pt2, norm_pert, H_pert_diag, N_st, n, task_id) &
|
||||
!$OMP SHARED(zmq_socket_pair) &
|
||||
!$OMP num_threads(nproc+1)
|
||||
i = omp_get_thread_num()
|
||||
if (i == 0) then
|
||||
call $subroutine_collector()
|
||||
integer :: 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
|
||||
|
||||
|
||||
integer :: n, task_id
|
||||
call pull_pt2(zmq_socket_pair, pt2, norm_pert, H_pert_diag, N_st, n, task_id)
|
||||
|
||||
rc = pthread_join(collector_thread)
|
||||
|
||||
call end_zmq_pair_socket(zmq_socket_pair)
|
||||
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)
|
||||
enddo
|
||||
|
||||
integer(ZMQ_PTR) :: collector_thread
|
||||
external :: ao_bielec_integrals_in_map_collector
|
||||
rc = pthread_create(collector_thread, ao_bielec_integrals_in_map_collector)
|
||||
|
||||
!$OMP PARALLEL DEFAULT(private)
|
||||
!$OMP TASK PRIVATE(i)
|
||||
PROVIDE nproc
|
||||
!$OMP PARALLEL DEFAULT(private) num_threads(nproc+1)
|
||||
i = omp_get_thread_num()
|
||||
call ao_bielec_integrals_in_map_slave_inproc(i)
|
||||
!$OMP END TASK
|
||||
!$OMP TASKWAIT
|
||||
if (i==0) then
|
||||
call ao_bielec_integrals_in_map_collector(i)
|
||||
else
|
||||
call ao_bielec_integrals_in_map_slave_inproc(i)
|
||||
endif
|
||||
!$OMP END PARALLEL
|
||||
|
||||
rc = pthread_join(collector_thread)
|
||||
|
||||
call end_parallel_job(zmq_to_qp_run_socket, 'ao_integrals')
|
||||
|
||||
|
||||
|
@ -295,18 +295,6 @@ BEGIN_PROVIDER [ integer, nproc ]
|
||||
!$OMP END PARALLEL
|
||||
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)
|
||||
implicit none
|
||||
|
Loading…
Reference in New Issue
Block a user