From d31cca38df6f9b78ec1b5e1444e2cb32f6fd45a6 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 12 Jan 2018 21:42:37 +0100 Subject: [PATCH] Fixes #223 --- plugins/GPI2/NEEDED_CHILDREN_MODULES | 1 - plugins/GPI2/README.rst | 14 ---- plugins/GPI2/gpi_test.irp.f | 13 ---- plugins/GPI2/utils.irp.f | 76 ------------------- .../read_integral/print_integrals_mo.irp.f | 6 +- plugins/read_integral/read_integrals_mo.irp.f | 3 +- 6 files changed, 5 insertions(+), 108 deletions(-) delete mode 100644 plugins/GPI2/NEEDED_CHILDREN_MODULES delete mode 100644 plugins/GPI2/README.rst delete mode 100644 plugins/GPI2/gpi_test.irp.f delete mode 100644 plugins/GPI2/utils.irp.f diff --git a/plugins/GPI2/NEEDED_CHILDREN_MODULES b/plugins/GPI2/NEEDED_CHILDREN_MODULES deleted file mode 100644 index aae89501..00000000 --- a/plugins/GPI2/NEEDED_CHILDREN_MODULES +++ /dev/null @@ -1 +0,0 @@ -Determinants diff --git a/plugins/GPI2/README.rst b/plugins/GPI2/README.rst deleted file mode 100644 index d6be4958..00000000 --- a/plugins/GPI2/README.rst +++ /dev/null @@ -1,14 +0,0 @@ -===== -GASPI -===== - -Providers for GASPI programs (with the GPI2 library). - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. diff --git a/plugins/GPI2/gpi_test.irp.f b/plugins/GPI2/gpi_test.irp.f deleted file mode 100644 index 1fc109e6..00000000 --- a/plugins/GPI2/gpi_test.irp.f +++ /dev/null @@ -1,13 +0,0 @@ -program test - double precision :: energy(N_states) - if (is_gaspi_master) then - energy = 1.d0 - else - energy = 0.d0 - endif - call broadcast_wf(energy) - print *, 'energy (1.d0) :', GASPI_rank, energy(1) - print *, 'coef :', GASPI_rank, psi_coef(1,1) - print *, 'det :', GASPI_rank, psi_det (1,1,1) - call gaspi_finalize -end diff --git a/plugins/GPI2/utils.irp.f b/plugins/GPI2/utils.irp.f deleted file mode 100644 index cfb17b75..00000000 --- a/plugins/GPI2/utils.irp.f +++ /dev/null @@ -1,76 +0,0 @@ - BEGIN_PROVIDER [ logical, GASPI_is_initialized ] -&BEGIN_PROVIDER [ logical, has_gaspi ] - implicit none - BEGIN_DOC -! This is true when GASPI_Init has been called - END_DOC - - has_gaspi = .False. - IRP_IF GASPI - use GASPI - integer(gaspi_return_t) :: res - res = gaspi_proc_init(GASPI_BLOCK) - if (res /= GASPI_SUCCESS) then - print *, res - print *, 'GASPI failed to initialize' - stop -1 - endif - has_gaspi = .True. - IRP_ENDIF - GASPI_is_initialized = .True. -END_PROVIDER - - - BEGIN_PROVIDER [ integer, GASPI_rank ] -&BEGIN_PROVIDER [ integer, GASPI_size ] -&BEGIN_PROVIDER [ logical, is_GASPI_master ] - implicit none - BEGIN_DOC -! Usual GASPI variables - END_DOC - - PROVIDE GASPI_is_initialized - - IRP_IF GASPI - use GASPI - integer(gaspi_return_t) :: res - integer(gaspi_rank_t) :: n - res = gaspi_proc_num(n) - GASPI_size = n - if (res /= GASPI_SUCCESS) then - print *, res - print *, 'Unable to get GASPI_size' - stop -1 - endif - res = gaspi_proc_rank(n) - GASPI_rank = n - if (res /= GASPI_SUCCESS) then - print *, res - print *, 'Unable to get GASPI_rank' - stop -1 - endif - is_GASPI_master = (GASPI_rank == 0) - IRP_ELSE - GASPI_rank = 0 - GASPI_size = 1 - is_GASPI_master = .True. - IRP_ENDIF - - -END_PROVIDER - -subroutine gaspi_finalize() - implicit none - PROVIDE GASPI_is_initialized - IRP_IF GASPI - use GASPI - integer(gaspi_return_t) :: res - res = gaspi_proc_term(GASPI_BLOCK) - if (res /= GASPI_SUCCESS) then - print *, res - print *, 'Unable to finalize GASPI' - stop -1 - endif - IRP_ENDIF -end subroutine - diff --git a/plugins/read_integral/print_integrals_mo.irp.f b/plugins/read_integral/print_integrals_mo.irp.f index 18795249..45745c13 100644 --- a/plugins/read_integral/print_integrals_mo.irp.f +++ b/plugins/read_integral/print_integrals_mo.irp.f @@ -45,13 +45,13 @@ program print_integrals do k=1,mo_tot_num do j=l,mo_tot_num do i=k,mo_tot_num - !if (i>=j) then + if (i>=j) then double precision :: get_mo_bielec_integral integral = get_mo_bielec_integral(i,j,k,l,mo_integrals_map) if (dabs(integral) > mo_integrals_threshold) then - write (iunit,'(4(I6,X),F20.15)') i,j,k,l, integral + write (iunit,'(4(I6,X),E25.15)') i,j,k,l, integral endif - !end if + end if enddo enddo enddo diff --git a/plugins/read_integral/read_integrals_mo.irp.f b/plugins/read_integral/read_integrals_mo.irp.f index 06db0ddf..a2d1cb6b 100644 --- a/plugins/read_integral/read_integrals_mo.irp.f +++ b/plugins/read_integral/read_integrals_mo.irp.f @@ -69,9 +69,10 @@ subroutine run 13 continue close(iunit) - call insert_into_mo_integrals_map(n_integrals,buffer_i,buffer_values,0.d0) + call map_append(mo_integrals_map, buffer_i, buffer_values, n_integrals) call map_sort(mo_integrals_map) + call map_unique(mo_integrals_map) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints',mo_integrals_map) call ezfio_set_integrals_bielec_disk_access_mo_integrals("Read")