mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 04:14:07 +01:00
Updated install scripts
This commit is contained in:
parent
d45d53be71
commit
07b48ef2f7
@ -24,7 +24,7 @@ Demo
|
||||
* Python >= 2.6
|
||||
* GNU make
|
||||
* Bash
|
||||
* Blast/Lapack
|
||||
* Blas/Lapack
|
||||
* unzip
|
||||
* g++ (For ninja)
|
||||
|
||||
|
13
configure
vendored
13
configure
vendored
@ -70,9 +70,10 @@ d_dependency = {
|
||||
"resultsFile": ["python"],
|
||||
"emsl": ["python"],
|
||||
"gcc": [],
|
||||
"gmp": [ "gcc", "make" ],
|
||||
"g++": [],
|
||||
"zeromq" : [ "g++" ],
|
||||
"f77zmq" : [ "zeromq", "python" ],
|
||||
"zeromq" : [ "g++", "make" ],
|
||||
"f77zmq" : [ "zeromq", "python", "make" ],
|
||||
"python": [],
|
||||
"ninja": ["g++", "python"],
|
||||
"make": [],
|
||||
@ -131,6 +132,11 @@ ninja = Info(
|
||||
description=' ninja',
|
||||
default_path=join(QP_ROOT_BIN, "ninja"))
|
||||
|
||||
gmp = Info(
|
||||
url='https://gmplib.org/download/gmp/gmp-6.1.1.tar.bz2',
|
||||
description=' GMP library',
|
||||
default_path=join(QP_ROOT_LIB, "libgmp.so"))
|
||||
|
||||
emsl = Info(
|
||||
url='{head}/LCPQ/EMSL_Basis_Set_Exchange_Local/{tail}'.format(**path_github),
|
||||
description=' EMSL basis set library',
|
||||
@ -166,7 +172,7 @@ d_info = dict()
|
||||
|
||||
for m in ["ocaml", "m4", "curl", "zlib", "patch", "irpf90", "docopt",
|
||||
"resultsFile", "ninja", "emsl", "ezfio", "p_graphviz",
|
||||
"zeromq", "f77zmq","bats" ]:
|
||||
"zeromq", "f77zmq","bats", "gmp" ]:
|
||||
exec ("d_info['{0}']={0}".format(m))
|
||||
|
||||
|
||||
@ -495,6 +501,7 @@ def create_ninja_and_rc(l_installed):
|
||||
'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"',
|
||||
'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"',
|
||||
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', "",
|
||||
'export C_INCLUDE_PATH="${C_INCLUDE_PATH}":"${QP_ROOT}"/include',
|
||||
'source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh', "",
|
||||
'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',
|
||||
'',
|
||||
|
0
include/.empty
Normal file
0
include/.empty
Normal file
@ -4,7 +4,11 @@
|
||||
BUILD=_build/${TARGET}
|
||||
rm -rf -- ${BUILD}
|
||||
mkdir ${BUILD} || exit 1
|
||||
if [[ -f Downloads/${TARGET}.tar.gz ]] ; then
|
||||
tar -zxf Downloads/${TARGET}.tar.gz --strip-components=1 --directory=${BUILD} || exit 1
|
||||
elif [[ -f Downloads/${TARGET}.tar.bz2 ]] ; then
|
||||
tar -jxf Downloads/${TARGET}.tar.bz2 --strip-components=1 --directory=${BUILD} || exit 1
|
||||
fi
|
||||
_install || exit 1
|
||||
rm -rf -- ${BUILD} _build/${TARGET}.log
|
||||
exit 0
|
||||
|
@ -10,10 +10,4 @@ function _install()
|
||||
mv curl.ermine ${QP_ROOT}/bin/curl || return 1
|
||||
}
|
||||
|
||||
BUILD=_build/${TARGET}
|
||||
rm -rf -- ${BUILD}
|
||||
mkdir ${BUILD} || exit 1
|
||||
tar -xvjf Downloads/${TARGET}.tar.bz2 --strip-components=1 --directory=${BUILD} || exit 1
|
||||
_install || exit 1
|
||||
rm -rf -- ${BUILD} _build/${TARGET}.log
|
||||
exit 0
|
||||
source scripts/build.sh
|
||||
|
@ -7,10 +7,9 @@ function _install()
|
||||
cd ..
|
||||
QP_ROOT=$PWD
|
||||
cd -
|
||||
export C_INCLUDE_PATH="${C_INCLUDE_PATH}":"${QP_ROOT}"/lib
|
||||
set -e
|
||||
set -u
|
||||
export ZMQ_H="${QP_ROOT}"/lib/zmq.h
|
||||
export ZMQ_H="${QP_ROOT}"/include/zmq.h
|
||||
cd "${BUILD}"
|
||||
make -j 8 || exit 1
|
||||
mv libf77zmq.a "${QP_ROOT}"/lib || exit 1
|
||||
|
17
install/scripts/install_gmp.sh
Executable file
17
install/scripts/install_gmp.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
TARGET=gmp
|
||||
|
||||
function _install()
|
||||
{
|
||||
rm -rf -- ${TARGET}
|
||||
mkdir ${TARGET} || exit 1
|
||||
cd ..
|
||||
QP_ROOT=$PWD
|
||||
cd -
|
||||
cd ${BUILD}
|
||||
./configure --prefix=$QP_ROOT && make || exit 1
|
||||
make install || exit 1
|
||||
}
|
||||
|
||||
source scripts/build.sh
|
@ -8,8 +8,7 @@ function _install()
|
||||
QP_ROOT=$PWD
|
||||
cd -
|
||||
cd ${BUILD}
|
||||
./configure && make || exit 1
|
||||
ln -sf ${PWD}/src/m4 ${QP_ROOT}/bin || exit 1
|
||||
./configure --prefix=$QP_ROOT && make || exit 1
|
||||
}
|
||||
|
||||
source scripts/build.sh
|
||||
|
@ -9,7 +9,7 @@ function _install()
|
||||
QP_ROOT=$PWD
|
||||
cd -
|
||||
cd ${BUILD}
|
||||
./configure --prefix=${QP_ROOT}/install/${TARGET} && make || exit 1
|
||||
./configure --prefix=${QP_ROOT} && make || exit 1
|
||||
make install || exit 1
|
||||
cd -
|
||||
cp ${TARGET}/bin/${TARGET} ${QP_ROOT}/bin || exit 1
|
||||
|
@ -7,22 +7,13 @@ function _install()
|
||||
cd ..
|
||||
QP_ROOT=$PWD
|
||||
cd -
|
||||
export C_INCLUDE_PATH="${C_INCLUDE_PATH}":./
|
||||
set -e
|
||||
set -u
|
||||
ORIG=$(pwd)
|
||||
cd "${BUILD}"
|
||||
./configure --without-libsodium || exit 1
|
||||
./configure --prefix=$QP_ROOT --without-libsodium || exit 1
|
||||
make -j 8 || exit 1
|
||||
rm -f -- "${QP_ROOT}"/lib/libzmq.a "${QP_ROOT}"/lib/libzmq.so "${QP_ROOT}"/lib/libzmq.so.?
|
||||
cp .libs/libzmq.a "${QP_ROOT}"/lib
|
||||
cp .libs/libzmq.so "${QP_ROOT}"/lib/libzmq.so.5
|
||||
# cp src/.libs/libzmq.a "${QP_ROOT}"/lib
|
||||
# cp src/.libs/libzmq.so "${QP_ROOT}"/lib/libzmq.so.4
|
||||
cp include/{zmq.h,zmq_utils.h} "${QP_ROOT}"/lib
|
||||
cd "${QP_ROOT}"/lib
|
||||
ln -s libzmq.so.5 libzmq.so
|
||||
# ln -s libzmq.so.4 libzmq.so
|
||||
make install || exit 1
|
||||
cd ${ORIG}
|
||||
return 0
|
||||
}
|
||||
|
@ -11,11 +11,8 @@ function _install()
|
||||
cd -
|
||||
cd ${BUILD}
|
||||
./configure && make || exit 1
|
||||
make install prefix=$QP_ROOT/install/${TARGET} || exit 1
|
||||
ln -s -f $QP_ROOT/install/${TARGET}/lib/libz.so $QP_ROOT/lib || exit 1
|
||||
ln -s -f $QP_ROOT/install/${TARGET}/lib/libz.a $QP_ROOT/lib || exit 1
|
||||
ln -s -f $QP_ROOT/install/${TARGET}/include/zlib.h $QP_ROOT/lib || exit 1
|
||||
ln -s -f $QP_ROOT/install/${TARGET}/include/zconf.h $QP_ROOT/lib || exit 1
|
||||
./configure --prefix=$QP_ROOT && make || exit 1
|
||||
make install || exit 1
|
||||
}
|
||||
|
||||
source scripts/build.sh
|
||||
|
@ -174,43 +174,45 @@ END_PROVIDER
|
||||
call u_0_S2_u_0(CI_eigenvectors_s2_dressed,CI_eigenvectors_dressed,N_det,psi_det,N_int,&
|
||||
N_states_diag,size(CI_eigenvectors_dressed,1))
|
||||
|
||||
double precision :: u_dot_u
|
||||
double precision, allocatable :: h(:,:), s(:,:)
|
||||
allocate (h(N_states,N_states), s(N_states,N_states))
|
||||
do i=1,N_states
|
||||
do j=1,N_states
|
||||
s(i,j) = u_dot_v(CI_eigenvectors_dressed(1,i),CI_eigenvectors_dressed(1,j),N_det)
|
||||
print *, 'S(',i,',',j,')', s(i,j)
|
||||
enddo
|
||||
enddo
|
||||
! double precision :: u_dot_u
|
||||
! double precision, allocatable :: h(:,:,:), s(:,:)
|
||||
! allocate (h(N_states,N_states,N_states), s(N_states,N_states))
|
||||
! do i=1,N_states
|
||||
! do j=1,N_states
|
||||
! s(i,j) = u_dot_v(CI_eigenvectors_dressed(1,i),CI_eigenvectors_dressed(1,j),N_det)
|
||||
! print *, 'S(',i,',',j,')', s(i,j)
|
||||
! enddo
|
||||
! enddo
|
||||
!
|
||||
! do i=1,N_states
|
||||
! h(i,i) = CI_electronic_energy_dressed(i)
|
||||
! do j=i+1,N_states
|
||||
! h(j,i) = (CI_electronic_energy_dressed(j)-CI_electronic_energy_dressed(i)) * s(i,j)
|
||||
! h(i,j) = -h(j,i)
|
||||
! print *, 'h(',i,',',i,')', h(i,j)
|
||||
! enddo
|
||||
! print *, 'h(',i,',',i,')', h(i,i)
|
||||
! enddo
|
||||
! call lapack_diag(eigenvalues,eigenvectors, h,size(h,1),N_states)
|
||||
! do i=1,N_states
|
||||
! CI_electronic_energy_dressed(i) = eigenvalues(i)
|
||||
! do j=1,N_states
|
||||
! h(i,j) = eigenvectors(i,j)
|
||||
! enddo
|
||||
! enddo
|
||||
! do k=1,N_states
|
||||
! eigenvectors(1:N_det,k) = 0.d0
|
||||
! do i=1,N_states
|
||||
! eigenvectors(1:N_det,k) += CI_eigenvectors_dressed(1:N_det,k) * h(k,i)
|
||||
! enddo
|
||||
! enddo
|
||||
! deallocate(h,s)
|
||||
!
|
||||
|
||||
do i=1,N_states
|
||||
h(i,i) = CI_electronic_energy_dressed(i)
|
||||
do j=i+1,N_states
|
||||
h(j,i) = (CI_electronic_energy_dressed(j)-CI_electronic_energy_dressed(i)) * s(i,j)
|
||||
h(i,j) = -h(j,i)
|
||||
print *, 'h(',i,',',i,')', h(i,j)
|
||||
enddo
|
||||
print *, 'h(',i,',',i,')', h(i,i)
|
||||
enddo
|
||||
call lapack_diag(eigenvalues,eigenvectors, h,size(h,1),N_states)
|
||||
do i=1,N_states
|
||||
CI_electronic_energy_dressed(i) = eigenvalues(i)
|
||||
do j=1,N_states
|
||||
h(i,j) = eigenvectors(i,j)
|
||||
enddo
|
||||
enddo
|
||||
do k=1,N_states
|
||||
eigenvectors(1:N_det,k) = 0.d0
|
||||
do i=1,N_states
|
||||
eigenvectors(1:N_det,k) += CI_eigenvectors_dressed(1:N_det,k) * h(k,i)
|
||||
enddo
|
||||
enddo
|
||||
deallocate(h,s)
|
||||
call multi_state(CI_electronic_energy_dressed,CI_eigenvectors_dressed,size(CI_eigenvectors_dressed,1))
|
||||
|
||||
deallocate (eigenvectors,eigenvalues)
|
||||
|
||||
|
||||
else if (diag_algorithm == "Lapack") then
|
||||
|
||||
allocate (eigenvectors(size(H_matrix_dressed,1),N_det))
|
||||
|
@ -344,7 +344,7 @@ subroutine H_S2_u_0_nstates(v_0,s_0,u_0,H_jj,S2_jj,n,keys_tmp,Nint,N_st,sze_8)
|
||||
Vt = 0.d0
|
||||
St = 0.d0
|
||||
|
||||
!$OMP DO SCHEDULE(static,1)
|
||||
!$OMP DO SCHEDULE(dynamic)
|
||||
do sh=1,shortcut(0,2)
|
||||
do i=shortcut(sh,2),shortcut(sh+1,2)-1
|
||||
org_i = sort_idx(i,2)
|
||||
@ -369,7 +369,7 @@ subroutine H_S2_u_0_nstates(v_0,s_0,u_0,H_jj,S2_jj,n,keys_tmp,Nint,N_st,sze_8)
|
||||
enddo
|
||||
!$OMP END DO NOWAIT
|
||||
do sh=1,shortcut(0,1)
|
||||
!$OMP DO SCHEDULE(static,1)
|
||||
!$OMP DO SCHEDULE(dynamic)
|
||||
do sh2=sh,shortcut(0,1)
|
||||
exa = 0
|
||||
do ni=1,Nint
|
||||
|
Loading…
Reference in New Issue
Block a user