10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-26 15:12:14 +02:00

Fixed segfault

This commit is contained in:
Anthony Scemama 2017-05-10 21:33:53 +02:00
parent b3e3e926a5
commit 60c4bac5ce
2 changed files with 5 additions and 1 deletions

View File

@ -59,8 +59,8 @@ subroutine run_selection_slave(thread,iproc,energy)
end do
if(ctask > 0) then
call sort_selection_buffer(buf)
call push_selection_results(zmq_socket_push, pt2, buf, task_id(1), ctask)
call merge_selection_buffers(buf,buf2)
call push_selection_results(zmq_socket_push, pt2, buf, task_id(1), ctask)
buf%mini = buf2%mini
pt2 = 0d0
buf%cur = 0

View File

@ -64,6 +64,10 @@ subroutine merge_selection_buffers(b1, b2)
i2=1
do while (b1%val(b1%cur) > b2%mini)
b1%cur = b1%cur-1
if (b1%cur == 0) then
b1%cur = 1
return
endif
enddo
do i=1,nmwen
if ( (i1 > b1%cur).and.(i2 > b2%cur) ) then