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

Merge pull request #44 from scemama/master

Fix IRPF90 variable
This commit is contained in:
Anthony Scemama 2015-03-27 18:14:15 +01:00
commit e7f0704365
6 changed files with 59 additions and 4 deletions

View File

@ -2,10 +2,10 @@ sudo: true
before_script:
- sudo apt-get update
- sudo apt-get install gfortran liblapack-dev zip
- sudo apt-get install gfortran liblapack-dev
script:
- ./setup_environment.sh --robot
- ./setup_environment.sh --robot
- source ./quantum_package.rc
- cp ./src/Makefile.config.gfortran ./src/Makefile.config
- make build

View File

@ -18,6 +18,8 @@ source ${QPACKAGE_ROOT}/scripts/qp_include.sh
check_current_dir_is_src
IRPF90="${QPACKAGE_ROOT}/bin/irpf90 ${IRPF90_FLAGS}"
# Check if the user's config exists
if [[ ! -f ${QPACKAGE_ROOT}/src/Makefile.config ]]

View File

@ -41,7 +41,6 @@ then
exit 1
fi
if [[ ! -x ${QPACKAGE_ROOT}/bin/irpman ]]
then
echo $RED "Error in IRPF90 installation" $BLACK

View File

@ -0,0 +1,10 @@
spindeterminants
n_det_alpha integer
n_det_beta integer
n_int integer
bit_kind integer
n_states integer
psi_det_alpha integer*8 (spindeterminants_n_int*spindeterminants_bit_kind/8,spindeterminants_n_det_alpha)
psi_det_beta integer*8 (spindeterminants_n_int*spindeterminants_bit_kind/8,spindeterminants_n_det_beta)
psi_coef_matrix double precision (spindeterminants_n_det_alpha,spindeterminants_n_det_beta,spindeterminants_n_states)

View File

@ -0,0 +1,44 @@
subroutine write_spindeterminants
use bitmasks
implicit none
integer*8, allocatable :: tmpdet(:,:)
integer :: N_int2
integer :: i,j,k
integer*8 :: det_8(100)
integer(bit_kind) :: det_bk((100*8)/bit_kind)
equivalence (det_8, det_bk)
N_int2 = (N_int*bit_kind)/8
call ezfio_set_spindeterminants_n_det_alpha(N_det_alpha_unique)
call ezfio_set_spindeterminants_n_det_beta(N_det_beta_unique)
call ezfio_set_spindeterminants_n_int(N_int)
call ezfio_set_spindeterminants_bit_kind(bit_kind)
call ezfio_set_spindeterminants_n_states(N_states)
allocate(tmpdet(N_int2,N_det_alpha_unique))
do i=1,N_det_alpha_unique
do k=1,N_int
det_bk(k) = psi_det_alpha_unique(k,i)
enddo
do k=1,N_int2
tmpdet(k,i) = det_8(k)
enddo
enddo
call ezfio_set_spindeterminants_psi_det_alpha(psi_det_alpha_unique)
deallocate(tmpdet)
allocate(tmpdet(N_int2,N_det_beta_unique))
do i=1,N_det_beta_unique
do k=1,N_int
det_bk(k) = psi_det_beta_unique(k,i)
enddo
do k=1,N_int2
tmpdet(k,i) = det_8(k)
enddo
enddo
call ezfio_set_spindeterminants_psi_det_beta(psi_det_beta_unique)
deallocate(tmpdet)
call ezfio_set_spindeterminants_psi_coef_matrix(psi_svd_matrix)
end

View File

@ -21,7 +21,7 @@ $(ALL_MODULES): ezfio
$(QPACKAGE_ROOT)/scripts/build_modules.sh $@
# Define the EZFIO rules
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/EZFIO.cfg)
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/EZFIO.cfg)
$(QPACKAGE_ROOT)/scripts/prepare_ezfio.sh
cd $(EZFIO_DIR);\
export FC="$(FC)" ; export FCFLAGS="$(FCFLAGS)" ; export IRPF90="$(IRPF90)" ;\