10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-04 21:24:02 +01:00
quantum_package/plugins/Full_CI_ZMQ/run_pt2_slave.irp.f

205 lines
5.2 KiB
Fortran
Raw Normal View History

2017-01-12 15:46:10 +01:00
subroutine run_pt2_slave(thread,iproc,energy)
use f77_zmq
use selection_types
implicit none
double precision, intent(in) :: energy(N_states_diag)
integer, intent(in) :: thread, iproc
integer :: rc, i
2017-11-27 19:44:29 +01:00
integer :: worker_id, ctask, ltask
character*(512), allocatable :: task(:)
integer, allocatable :: task_id(:)
2017-01-12 15:46:10 +01:00
integer(ZMQ_PTR),external :: new_zmq_to_qp_run_socket
integer(ZMQ_PTR) :: zmq_to_qp_run_socket
integer(ZMQ_PTR), external :: new_zmq_push_socket
integer(ZMQ_PTR) :: zmq_socket_push
2017-05-05 15:08:51 +02:00
type(selection_buffer) :: buf
2017-01-12 15:46:10 +01:00
logical :: done
2017-11-27 19:44:29 +01:00
double precision,allocatable :: pt2(:,:)
Squashed commit of the following: commit 4b9c435dce0f3b3078d573e66fd32b40fca26497 Merge: 74e559c8 093e3fd0 Author: Anthony Scemama <scemama@irsamc.ups-tlse.fr> Date: Tue Sep 4 16:58:51 2018 +0200 Merge branch 'thesis' of git://github.com/garniron/quantum_package into garniron-thesis commit 093e3fd021ca5ed73fe3be530fa18e79ceb0085e Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 16:13:00 2018 +0200 removed ungodly hack commit 8529a0f3f66d2f1ba9d717b0de60b268a4a821a7 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:57:19 2018 +0200 reduced prints in pt2_stoch commit 03b8f353bd94b837c02e570a8d3fb68689003135 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:41:46 2018 +0200 teeth building check for pt2_stoch commit 0d91b9310a7d580e8bc97a6a0af7a62a8506f8c0 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:35:04 2018 +0200 timestamp of first pull commit 34d9fa01657ed5d159a1c62f8f24cdb266d48153 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:27:10 2018 +0200 potential numerical precision bug commit 9a0f900d8c57bcbca36a09c11616e234528e1643 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:09:51 2018 +0200 tests if teeth can be built commit dda0dc34df82a59fac3c3abb2b14943fdb23c0f8 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 17:48:04 2018 +0200 corrected pt2_find_sample commit a521f0cb82bd333ce9879b4dfd87ae1abcf2baaa Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 16:08:02 2018 +0200 tasks get by batches of Nproc commit 997a5a1265951394753d3154a6136ca40177ba8d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 14:18:04 2018 +0200 buffered task_id send commit 99ea7948e0d58023f7ce02386014c8c3d493deb4 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 12:29:12 2018 +0200 unbalanced fragmentation commit abb3b7e08bebdcaf84208ebbe404441d3571b1f9 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 17:18:44 2018 +0200 overflow of pt2_J commit 8df49f394b588ca304ce2ee7d8f8095455573784 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:58:48 2018 +0200 removed useless computation of intermediate checkpoints commit 4ba5b79eb391819a4966c7cd19b2e2fdf2ed5129 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:50:14 2018 +0200 dressing only sent for chosen checkpoint commit a4a6a69459321b1b210c2f51ffbef4f792943919 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 17:01:56 2018 +0200 cumulative dot_F commit 6a7f04cb79ec921d5829a011aa8d8b2ea224760d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 16:58:07 2018 +0200 simpler purge commit 168ca2f2e29b902ab37afc58672b678998f0212a Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 21:07:01 2018 +0200 task list optimized commit de4a0d0caf0e1d441e0244a9ba7c65ae535d58b1 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:57:03 2018 +0200 removed print commit fee31d4e3e70c2edf1aeda202d3f067eddc17532 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:56:23 2018 +0200 dress fragmentation commit 02893a419de07c922708fe8ee2b828d9ebfd2e9b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 15:52:16 2018 +0200 bug in blocked search - replaced with thesis version commit bb6e073cf10039f8a333d120b88dda109169528b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 21:24:45 2018 +0200 ungodly hack to prevent double providing commit 0609e8c627ea7bf88d617e45dffeb64c9aea37b6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 20:52:05 2018 +0200 debugging commit a254fdd7cffd8348846c910f240965104c969a09 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 15:24:07 2018 +0200 parallel bug commit 2a6c1941d45be78083ec8c1dccb453f51a12c338 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 11:43:11 2018 +0200 corrected when relative_error=0d0 commit bac039bdf1bd00673c0795b1cb23adb593e9d426 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:58:17 2018 +0200 relative error 1d-5 commit aae9d203ecbf8d53accc6bc35c2ab56aeeae78a6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:07:02 2018 +0200 potential fragmentation bug commit ad69f39f99d0b0dd73f556fb13d1d55337c5b066 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 20:54:58 2018 +0200 dress_zmq re-implemented commit d78f64732a5493d7f10c7c80b564005e63a133fc Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 11:30:19 2018 +0200 pt2_stoch re-implemented commit 4b9b54e19ac7459589681e5ff7aa358dde9f5fd5 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Aug 28 10:24:38 2018 +0200 removed test for phase_mask_bit commit 3abccca5e35948e54a659cacccea42fbfcf4c296 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 3 23:44:05 2018 +0200 phasemask_bit
2018-09-04 17:31:45 +02:00
integer :: n_tasks, k
2017-11-27 19:44:29 +01:00
integer, allocatable :: i_generator(:), subset(:)
2017-01-12 15:46:10 +01:00
Squashed commit of the following: commit 4b9c435dce0f3b3078d573e66fd32b40fca26497 Merge: 74e559c8 093e3fd0 Author: Anthony Scemama <scemama@irsamc.ups-tlse.fr> Date: Tue Sep 4 16:58:51 2018 +0200 Merge branch 'thesis' of git://github.com/garniron/quantum_package into garniron-thesis commit 093e3fd021ca5ed73fe3be530fa18e79ceb0085e Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 16:13:00 2018 +0200 removed ungodly hack commit 8529a0f3f66d2f1ba9d717b0de60b268a4a821a7 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:57:19 2018 +0200 reduced prints in pt2_stoch commit 03b8f353bd94b837c02e570a8d3fb68689003135 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:41:46 2018 +0200 teeth building check for pt2_stoch commit 0d91b9310a7d580e8bc97a6a0af7a62a8506f8c0 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:35:04 2018 +0200 timestamp of first pull commit 34d9fa01657ed5d159a1c62f8f24cdb266d48153 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:27:10 2018 +0200 potential numerical precision bug commit 9a0f900d8c57bcbca36a09c11616e234528e1643 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:09:51 2018 +0200 tests if teeth can be built commit dda0dc34df82a59fac3c3abb2b14943fdb23c0f8 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 17:48:04 2018 +0200 corrected pt2_find_sample commit a521f0cb82bd333ce9879b4dfd87ae1abcf2baaa Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 16:08:02 2018 +0200 tasks get by batches of Nproc commit 997a5a1265951394753d3154a6136ca40177ba8d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 14:18:04 2018 +0200 buffered task_id send commit 99ea7948e0d58023f7ce02386014c8c3d493deb4 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 12:29:12 2018 +0200 unbalanced fragmentation commit abb3b7e08bebdcaf84208ebbe404441d3571b1f9 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 17:18:44 2018 +0200 overflow of pt2_J commit 8df49f394b588ca304ce2ee7d8f8095455573784 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:58:48 2018 +0200 removed useless computation of intermediate checkpoints commit 4ba5b79eb391819a4966c7cd19b2e2fdf2ed5129 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:50:14 2018 +0200 dressing only sent for chosen checkpoint commit a4a6a69459321b1b210c2f51ffbef4f792943919 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 17:01:56 2018 +0200 cumulative dot_F commit 6a7f04cb79ec921d5829a011aa8d8b2ea224760d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 16:58:07 2018 +0200 simpler purge commit 168ca2f2e29b902ab37afc58672b678998f0212a Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 21:07:01 2018 +0200 task list optimized commit de4a0d0caf0e1d441e0244a9ba7c65ae535d58b1 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:57:03 2018 +0200 removed print commit fee31d4e3e70c2edf1aeda202d3f067eddc17532 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:56:23 2018 +0200 dress fragmentation commit 02893a419de07c922708fe8ee2b828d9ebfd2e9b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 15:52:16 2018 +0200 bug in blocked search - replaced with thesis version commit bb6e073cf10039f8a333d120b88dda109169528b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 21:24:45 2018 +0200 ungodly hack to prevent double providing commit 0609e8c627ea7bf88d617e45dffeb64c9aea37b6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 20:52:05 2018 +0200 debugging commit a254fdd7cffd8348846c910f240965104c969a09 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 15:24:07 2018 +0200 parallel bug commit 2a6c1941d45be78083ec8c1dccb453f51a12c338 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 11:43:11 2018 +0200 corrected when relative_error=0d0 commit bac039bdf1bd00673c0795b1cb23adb593e9d426 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:58:17 2018 +0200 relative error 1d-5 commit aae9d203ecbf8d53accc6bc35c2ab56aeeae78a6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:07:02 2018 +0200 potential fragmentation bug commit ad69f39f99d0b0dd73f556fb13d1d55337c5b066 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 20:54:58 2018 +0200 dress_zmq re-implemented commit d78f64732a5493d7f10c7c80b564005e63a133fc Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 11:30:19 2018 +0200 pt2_stoch re-implemented commit 4b9b54e19ac7459589681e5ff7aa358dde9f5fd5 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Aug 28 10:24:38 2018 +0200 removed test for phase_mask_bit commit 3abccca5e35948e54a659cacccea42fbfcf4c296 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 3 23:44:05 2018 +0200 phasemask_bit
2018-09-04 17:31:45 +02:00
allocate(task_id(pt2_n_tasks_max), task(pt2_n_tasks_max))
allocate(pt2(N_states,pt2_n_tasks_max), i_generator(pt2_n_tasks_max), subset(pt2_n_tasks_max))
2017-11-29 15:15:10 +01:00
2017-01-12 15:46:10 +01:00
zmq_to_qp_run_socket = new_zmq_to_qp_run_socket()
2017-11-29 15:15:10 +01:00
integer, external :: connect_to_taskserver
if (connect_to_taskserver(zmq_to_qp_run_socket,worker_id,thread) == -1) then
2017-01-12 15:46:10 +01:00
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
return
2017-11-29 15:15:10 +01:00
endif
zmq_socket_push = new_zmq_push_socket(thread)
2017-01-12 15:46:10 +01:00
buf%N = 0
2018-06-06 13:09:30 +02:00
n_tasks = 1
call create_selection_buffer(0, 0, buf)
2017-11-27 19:44:29 +01:00
done = .False.
do while (.not.done)
2018-07-02 14:29:35 +02:00
n_tasks = max(1,n_tasks)
Squashed commit of the following: commit 4b9c435dce0f3b3078d573e66fd32b40fca26497 Merge: 74e559c8 093e3fd0 Author: Anthony Scemama <scemama@irsamc.ups-tlse.fr> Date: Tue Sep 4 16:58:51 2018 +0200 Merge branch 'thesis' of git://github.com/garniron/quantum_package into garniron-thesis commit 093e3fd021ca5ed73fe3be530fa18e79ceb0085e Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 16:13:00 2018 +0200 removed ungodly hack commit 8529a0f3f66d2f1ba9d717b0de60b268a4a821a7 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:57:19 2018 +0200 reduced prints in pt2_stoch commit 03b8f353bd94b837c02e570a8d3fb68689003135 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:41:46 2018 +0200 teeth building check for pt2_stoch commit 0d91b9310a7d580e8bc97a6a0af7a62a8506f8c0 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:35:04 2018 +0200 timestamp of first pull commit 34d9fa01657ed5d159a1c62f8f24cdb266d48153 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:27:10 2018 +0200 potential numerical precision bug commit 9a0f900d8c57bcbca36a09c11616e234528e1643 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:09:51 2018 +0200 tests if teeth can be built commit dda0dc34df82a59fac3c3abb2b14943fdb23c0f8 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 17:48:04 2018 +0200 corrected pt2_find_sample commit a521f0cb82bd333ce9879b4dfd87ae1abcf2baaa Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 16:08:02 2018 +0200 tasks get by batches of Nproc commit 997a5a1265951394753d3154a6136ca40177ba8d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 14:18:04 2018 +0200 buffered task_id send commit 99ea7948e0d58023f7ce02386014c8c3d493deb4 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 12:29:12 2018 +0200 unbalanced fragmentation commit abb3b7e08bebdcaf84208ebbe404441d3571b1f9 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 17:18:44 2018 +0200 overflow of pt2_J commit 8df49f394b588ca304ce2ee7d8f8095455573784 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:58:48 2018 +0200 removed useless computation of intermediate checkpoints commit 4ba5b79eb391819a4966c7cd19b2e2fdf2ed5129 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:50:14 2018 +0200 dressing only sent for chosen checkpoint commit a4a6a69459321b1b210c2f51ffbef4f792943919 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 17:01:56 2018 +0200 cumulative dot_F commit 6a7f04cb79ec921d5829a011aa8d8b2ea224760d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 16:58:07 2018 +0200 simpler purge commit 168ca2f2e29b902ab37afc58672b678998f0212a Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 21:07:01 2018 +0200 task list optimized commit de4a0d0caf0e1d441e0244a9ba7c65ae535d58b1 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:57:03 2018 +0200 removed print commit fee31d4e3e70c2edf1aeda202d3f067eddc17532 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:56:23 2018 +0200 dress fragmentation commit 02893a419de07c922708fe8ee2b828d9ebfd2e9b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 15:52:16 2018 +0200 bug in blocked search - replaced with thesis version commit bb6e073cf10039f8a333d120b88dda109169528b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 21:24:45 2018 +0200 ungodly hack to prevent double providing commit 0609e8c627ea7bf88d617e45dffeb64c9aea37b6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 20:52:05 2018 +0200 debugging commit a254fdd7cffd8348846c910f240965104c969a09 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 15:24:07 2018 +0200 parallel bug commit 2a6c1941d45be78083ec8c1dccb453f51a12c338 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 11:43:11 2018 +0200 corrected when relative_error=0d0 commit bac039bdf1bd00673c0795b1cb23adb593e9d426 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:58:17 2018 +0200 relative error 1d-5 commit aae9d203ecbf8d53accc6bc35c2ab56aeeae78a6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:07:02 2018 +0200 potential fragmentation bug commit ad69f39f99d0b0dd73f556fb13d1d55337c5b066 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 20:54:58 2018 +0200 dress_zmq re-implemented commit d78f64732a5493d7f10c7c80b564005e63a133fc Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 11:30:19 2018 +0200 pt2_stoch re-implemented commit 4b9b54e19ac7459589681e5ff7aa358dde9f5fd5 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Aug 28 10:24:38 2018 +0200 removed test for phase_mask_bit commit 3abccca5e35948e54a659cacccea42fbfcf4c296 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 3 23:44:05 2018 +0200 phasemask_bit
2018-09-04 17:31:45 +02:00
n_tasks = min(n_tasks,pt2_n_tasks_max)
2017-01-12 15:46:10 +01:00
2017-11-29 15:15:10 +01:00
integer, external :: get_tasks_from_taskserver
if (get_tasks_from_taskserver(zmq_to_qp_run_socket,worker_id, task_id, task, n_tasks) == -1) then
exit
endif
2017-11-27 19:44:29 +01:00
done = task_id(n_tasks) == 0
if (done) n_tasks = n_tasks-1
2017-11-27 23:18:18 +01:00
if (n_tasks == 0) exit
2017-11-27 19:44:29 +01:00
do k=1,n_tasks
read (task(k),*) subset(k), i_generator(k)
enddo
2018-06-28 10:38:57 +02:00
double precision :: time0, time1
call wall_time(time0)
2017-11-27 19:44:29 +01:00
do k=1,n_tasks
pt2(:,k) = 0.d0
buf%cur = 0
Squashed commit of the following: commit 4b9c435dce0f3b3078d573e66fd32b40fca26497 Merge: 74e559c8 093e3fd0 Author: Anthony Scemama <scemama@irsamc.ups-tlse.fr> Date: Tue Sep 4 16:58:51 2018 +0200 Merge branch 'thesis' of git://github.com/garniron/quantum_package into garniron-thesis commit 093e3fd021ca5ed73fe3be530fa18e79ceb0085e Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 16:13:00 2018 +0200 removed ungodly hack commit 8529a0f3f66d2f1ba9d717b0de60b268a4a821a7 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:57:19 2018 +0200 reduced prints in pt2_stoch commit 03b8f353bd94b837c02e570a8d3fb68689003135 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:41:46 2018 +0200 teeth building check for pt2_stoch commit 0d91b9310a7d580e8bc97a6a0af7a62a8506f8c0 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:35:04 2018 +0200 timestamp of first pull commit 34d9fa01657ed5d159a1c62f8f24cdb266d48153 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:27:10 2018 +0200 potential numerical precision bug commit 9a0f900d8c57bcbca36a09c11616e234528e1643 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:09:51 2018 +0200 tests if teeth can be built commit dda0dc34df82a59fac3c3abb2b14943fdb23c0f8 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 17:48:04 2018 +0200 corrected pt2_find_sample commit a521f0cb82bd333ce9879b4dfd87ae1abcf2baaa Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 16:08:02 2018 +0200 tasks get by batches of Nproc commit 997a5a1265951394753d3154a6136ca40177ba8d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 14:18:04 2018 +0200 buffered task_id send commit 99ea7948e0d58023f7ce02386014c8c3d493deb4 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 12:29:12 2018 +0200 unbalanced fragmentation commit abb3b7e08bebdcaf84208ebbe404441d3571b1f9 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 17:18:44 2018 +0200 overflow of pt2_J commit 8df49f394b588ca304ce2ee7d8f8095455573784 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:58:48 2018 +0200 removed useless computation of intermediate checkpoints commit 4ba5b79eb391819a4966c7cd19b2e2fdf2ed5129 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:50:14 2018 +0200 dressing only sent for chosen checkpoint commit a4a6a69459321b1b210c2f51ffbef4f792943919 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 17:01:56 2018 +0200 cumulative dot_F commit 6a7f04cb79ec921d5829a011aa8d8b2ea224760d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 16:58:07 2018 +0200 simpler purge commit 168ca2f2e29b902ab37afc58672b678998f0212a Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 21:07:01 2018 +0200 task list optimized commit de4a0d0caf0e1d441e0244a9ba7c65ae535d58b1 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:57:03 2018 +0200 removed print commit fee31d4e3e70c2edf1aeda202d3f067eddc17532 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:56:23 2018 +0200 dress fragmentation commit 02893a419de07c922708fe8ee2b828d9ebfd2e9b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 15:52:16 2018 +0200 bug in blocked search - replaced with thesis version commit bb6e073cf10039f8a333d120b88dda109169528b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 21:24:45 2018 +0200 ungodly hack to prevent double providing commit 0609e8c627ea7bf88d617e45dffeb64c9aea37b6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 20:52:05 2018 +0200 debugging commit a254fdd7cffd8348846c910f240965104c969a09 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 15:24:07 2018 +0200 parallel bug commit 2a6c1941d45be78083ec8c1dccb453f51a12c338 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 11:43:11 2018 +0200 corrected when relative_error=0d0 commit bac039bdf1bd00673c0795b1cb23adb593e9d426 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:58:17 2018 +0200 relative error 1d-5 commit aae9d203ecbf8d53accc6bc35c2ab56aeeae78a6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:07:02 2018 +0200 potential fragmentation bug commit ad69f39f99d0b0dd73f556fb13d1d55337c5b066 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 20:54:58 2018 +0200 dress_zmq re-implemented commit d78f64732a5493d7f10c7c80b564005e63a133fc Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 11:30:19 2018 +0200 pt2_stoch re-implemented commit 4b9b54e19ac7459589681e5ff7aa358dde9f5fd5 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Aug 28 10:24:38 2018 +0200 removed test for phase_mask_bit commit 3abccca5e35948e54a659cacccea42fbfcf4c296 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 3 23:44:05 2018 +0200 phasemask_bit
2018-09-04 17:31:45 +02:00
call select_connected(i_generator(k),energy,pt2(1,k),buf,subset(k),pt2_F(i_generator(k)))
2017-11-27 19:44:29 +01:00
enddo
2018-06-28 10:38:57 +02:00
call wall_time(time1)
2017-11-29 15:15:10 +01:00
integer, external :: tasks_done_to_taskserver
if (tasks_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id,n_tasks) == -1) then
done = .true.
endif
2017-11-27 19:44:29 +01:00
call push_pt2_results(zmq_socket_push, i_generator, pt2, task_id, n_tasks)
2018-06-06 13:09:30 +02:00
2018-06-28 10:38:57 +02:00
! Try to adjust n_tasks around 1 second per job
n_tasks = min(n_tasks,int( 1.d0*dble(n_tasks) / (time1 - time0 + 1.d-9)))+1
! n_tasks = n_tasks+1
2017-01-12 15:46:10 +01:00
end do
2017-11-29 15:15:10 +01:00
integer, external :: disconnect_from_taskserver
2018-06-08 02:09:42 +02:00
do i=1,300
if (disconnect_from_taskserver(zmq_to_qp_run_socket,worker_id) /= -2) exit
call sleep(1)
print *, 'Retry disconnect...'
end do
2017-11-29 15:15:10 +01:00
2017-01-12 15:46:10 +01:00
call end_zmq_push_socket(zmq_socket_push,thread)
2018-06-05 17:51:10 +02:00
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
2017-11-27 19:44:29 +01:00
call delete_selection_buffer(buf)
2017-01-12 15:46:10 +01:00
end subroutine
2017-11-27 19:44:29 +01:00
subroutine push_pt2_results(zmq_socket_push, index, pt2, task_id, n_tasks)
2017-01-12 15:46:10 +01:00
use f77_zmq
use selection_types
implicit none
integer(ZMQ_PTR), intent(in) :: zmq_socket_push
2017-11-27 19:44:29 +01:00
double precision, intent(in) :: pt2(N_states,n_tasks)
integer, intent(in) :: n_tasks, index(n_tasks), task_id(n_tasks)
2017-01-12 15:46:10 +01:00
integer :: rc
2017-11-27 19:44:29 +01:00
rc = f77_zmq_send( zmq_socket_push, n_tasks, 4, ZMQ_SNDMORE)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
return
endif
2017-11-24 01:02:53 +01:00
if(rc /= 4) stop 'push'
2017-01-12 15:46:10 +01:00
2017-11-27 19:44:29 +01:00
rc = f77_zmq_send( zmq_socket_push, index, 4*n_tasks, ZMQ_SNDMORE)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
return
endif
2017-11-27 19:44:29 +01:00
if(rc /= 4*n_tasks) stop 'push'
2017-01-12 15:46:10 +01:00
2017-11-27 19:44:29 +01:00
rc = f77_zmq_send( zmq_socket_push, pt2, 8*N_states*n_tasks, ZMQ_SNDMORE)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
return
endif
2017-11-27 19:44:29 +01:00
if(rc /= 8*N_states*n_tasks) stop 'push'
2017-01-12 15:46:10 +01:00
2017-11-27 19:44:29 +01:00
rc = f77_zmq_send( zmq_socket_push, task_id, n_tasks*4, 0)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
return
endif
2017-11-27 19:44:29 +01:00
if(rc /= 4*n_tasks) stop 'push'
2017-01-12 15:46:10 +01:00
! Activate is zmq_socket_push is a REQ
2017-05-16 16:31:35 +02:00
IRP_IF ZMQ_PUSH
IRP_ELSE
character*(2) :: ok
rc = f77_zmq_recv( zmq_socket_push, ok, 2, 0)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
return
endif
2017-11-24 01:02:53 +01:00
if ((rc /= 2).and.(ok(1:2) /= 'ok')) then
print *, irp_here//': error in receiving ok'
stop -1
endif
2017-05-16 16:31:35 +02:00
IRP_ENDIF
2017-01-12 15:46:10 +01:00
end subroutine
2017-11-27 19:44:29 +01:00
subroutine pull_pt2_results(zmq_socket_pull, index, pt2, task_id, n_tasks)
2017-01-12 15:46:10 +01:00
use f77_zmq
use selection_types
implicit none
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
2017-11-27 19:44:29 +01:00
double precision, intent(inout) :: pt2(N_states,*)
integer, intent(out) :: index(*)
integer, intent(out) :: n_tasks, task_id(*)
2017-01-12 15:46:10 +01:00
integer :: rc, rn, i
2017-11-27 19:44:29 +01:00
rc = f77_zmq_recv( zmq_socket_pull, n_tasks, 4, 0)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
n_tasks = 1
task_id(1) = 0
endif
2017-11-24 01:02:53 +01:00
if(rc /= 4) stop 'pull'
2017-01-12 15:46:10 +01:00
2017-11-27 19:44:29 +01:00
rc = f77_zmq_recv( zmq_socket_pull, index, 4*n_tasks, 0)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
n_tasks = 1
task_id(1) = 0
endif
2017-11-27 19:44:29 +01:00
if(rc /= 4*n_tasks) stop 'pull'
2017-01-12 15:46:10 +01:00
2017-11-27 19:44:29 +01:00
rc = f77_zmq_recv( zmq_socket_pull, pt2, N_states*8*n_tasks, 0)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
n_tasks = 1
task_id(1) = 0
endif
2017-11-27 19:44:29 +01:00
if(rc /= 8*N_states*n_tasks) stop 'pull'
2017-01-12 15:46:10 +01:00
2017-11-27 19:44:29 +01:00
rc = f77_zmq_recv( zmq_socket_pull, task_id, n_tasks*4, 0)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
n_tasks = 1
task_id(1) = 0
endif
2017-11-27 19:44:29 +01:00
if(rc /= 4*n_tasks) stop 'pull'
2017-01-12 15:46:10 +01:00
! Activate is zmq_socket_pull is a REP
2017-05-16 16:31:35 +02:00
IRP_IF ZMQ_PUSH
IRP_ELSE
rc = f77_zmq_send( zmq_socket_pull, 'ok', 2, 0)
2017-11-27 23:18:18 +01:00
if (rc == -1) then
n_tasks = 1
task_id(1) = 0
endif
2017-11-24 01:02:53 +01:00
if (rc /= 2) then
print *, irp_here//': error in sending ok'
stop -1
endif
2017-05-16 16:31:35 +02:00
IRP_ENDIF
2017-01-12 15:46:10 +01:00
end subroutine
Squashed commit of the following: commit 4b9c435dce0f3b3078d573e66fd32b40fca26497 Merge: 74e559c8 093e3fd0 Author: Anthony Scemama <scemama@irsamc.ups-tlse.fr> Date: Tue Sep 4 16:58:51 2018 +0200 Merge branch 'thesis' of git://github.com/garniron/quantum_package into garniron-thesis commit 093e3fd021ca5ed73fe3be530fa18e79ceb0085e Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 16:13:00 2018 +0200 removed ungodly hack commit 8529a0f3f66d2f1ba9d717b0de60b268a4a821a7 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:57:19 2018 +0200 reduced prints in pt2_stoch commit 03b8f353bd94b837c02e570a8d3fb68689003135 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:41:46 2018 +0200 teeth building check for pt2_stoch commit 0d91b9310a7d580e8bc97a6a0af7a62a8506f8c0 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:35:04 2018 +0200 timestamp of first pull commit 34d9fa01657ed5d159a1c62f8f24cdb266d48153 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:27:10 2018 +0200 potential numerical precision bug commit 9a0f900d8c57bcbca36a09c11616e234528e1643 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Sep 4 14:09:51 2018 +0200 tests if teeth can be built commit dda0dc34df82a59fac3c3abb2b14943fdb23c0f8 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 17:48:04 2018 +0200 corrected pt2_find_sample commit a521f0cb82bd333ce9879b4dfd87ae1abcf2baaa Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 16:08:02 2018 +0200 tasks get by batches of Nproc commit 997a5a1265951394753d3154a6136ca40177ba8d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 14:18:04 2018 +0200 buffered task_id send commit 99ea7948e0d58023f7ce02386014c8c3d493deb4 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Mon Sep 3 12:29:12 2018 +0200 unbalanced fragmentation commit abb3b7e08bebdcaf84208ebbe404441d3571b1f9 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 17:18:44 2018 +0200 overflow of pt2_J commit 8df49f394b588ca304ce2ee7d8f8095455573784 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:58:48 2018 +0200 removed useless computation of intermediate checkpoints commit 4ba5b79eb391819a4966c7cd19b2e2fdf2ed5129 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sun Sep 2 15:50:14 2018 +0200 dressing only sent for chosen checkpoint commit a4a6a69459321b1b210c2f51ffbef4f792943919 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 17:01:56 2018 +0200 cumulative dot_F commit 6a7f04cb79ec921d5829a011aa8d8b2ea224760d Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Sat Sep 1 16:58:07 2018 +0200 simpler purge commit 168ca2f2e29b902ab37afc58672b678998f0212a Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 21:07:01 2018 +0200 task list optimized commit de4a0d0caf0e1d441e0244a9ba7c65ae535d58b1 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:57:03 2018 +0200 removed print commit fee31d4e3e70c2edf1aeda202d3f067eddc17532 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 18:56:23 2018 +0200 dress fragmentation commit 02893a419de07c922708fe8ee2b828d9ebfd2e9b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 31 15:52:16 2018 +0200 bug in blocked search - replaced with thesis version commit bb6e073cf10039f8a333d120b88dda109169528b Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 21:24:45 2018 +0200 ungodly hack to prevent double providing commit 0609e8c627ea7bf88d617e45dffeb64c9aea37b6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 20:52:05 2018 +0200 debugging commit a254fdd7cffd8348846c910f240965104c969a09 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 15:24:07 2018 +0200 parallel bug commit 2a6c1941d45be78083ec8c1dccb453f51a12c338 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 11:43:11 2018 +0200 corrected when relative_error=0d0 commit bac039bdf1bd00673c0795b1cb23adb593e9d426 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:58:17 2018 +0200 relative error 1d-5 commit aae9d203ecbf8d53accc6bc35c2ab56aeeae78a6 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Thu Aug 30 10:07:02 2018 +0200 potential fragmentation bug commit ad69f39f99d0b0dd73f556fb13d1d55337c5b066 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 20:54:58 2018 +0200 dress_zmq re-implemented commit d78f64732a5493d7f10c7c80b564005e63a133fc Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Wed Aug 29 11:30:19 2018 +0200 pt2_stoch re-implemented commit 4b9b54e19ac7459589681e5ff7aa358dde9f5fd5 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Tue Aug 28 10:24:38 2018 +0200 removed test for phase_mask_bit commit 3abccca5e35948e54a659cacccea42fbfcf4c296 Author: Yann Garniron <yann.garniron@yahoo.fr> Date: Fri Aug 3 23:44:05 2018 +0200 phasemask_bit
2018-09-04 17:31:45 +02:00
2017-01-12 15:46:10 +01:00