Hi,
The function generate_spline_matrix in fouriertransform.C in the dmft
folder shows the comments as follows:
// A is the matrix whose inverse defines spline_matrix
//
// 6 6
// 1 4 1
// 1 4 1
// A = ...
//
// 1 4 1
// -2 0 0 2
However, the following codes,
dense_matrix A =
4*dt/6.*boost::numeric::ublas::identity_matrix<double>(Np1);
for (int i=1; i<Np1-1; i++) {
A(i,i-…
[View More]1) = dt/6.;
A(i,i+1) = dt/6.;
}
A(0,0) = 1.;
A(0, Np1-1) = 1.;
A(Np1-1, 0) = -2.*dt/6.;
A(Np1-1, 1) = -1.*dt/6.;
A(Np1-1, Np1-2) = 1*dt/6.;
A(Np1-1, Np1-1) = 2*dt/6.;
the red lines will make the matrix looks like
// 6 6
// 1 4 1
// 1 4 1
// A = ...
//
// 1 4 1
// -2 *-1* *1* 2
Is the comment correct or the code correct? Any reference for this
algorithm?
Thank you,
Kuang-Shing Chen
[View Less]
Dear all,
right now I'm working on a LDA+DMFT code and want to use the Hybridization
Impurity Solver from the ALPS package.
I have two questions regarding the implementation of the Impurity solver
and would be very glad if you could provide me with some guidiance:
My first question is, what is the best way to implement the impurity
solver in a C++ code?
What I've done so far is the following:
I'm using the newest ALPS code version 2.1.1-r6176. By modifying the
CMakeLists.txt files I compiled …
[View More]the code from the hybridization2 folder
into a static library libhybridization_impl2.a which I planned to use. I
included the impurity.h header file in my code and added the following
Include- and Library-paths into my makefile:
-L$(ALPS_DIR)/alps/src/boost -lboost \
-L$(ALPS_DIR)/alps/src/alps -lalps \
-L$(ALPS_DIR)/alps/applications/dmft/qmc -lhybridization_impl2 \
-L$(HOME)/local/lib/hdf5 -lsz \
-L$(HOME)/GotoBLAS2/current -lgoto2 \
-L/usr/lib/openmpi/lib -lmpi -lmpi_cxx \
-L/opt/intel/Compiler/11.1/046/lib/intel64 -limf -lirc -lifcore -lsvml
-I$(ALPS_DIR)/alps/src \
-I$(ALPS_DIR)/alps/src/alps/ngs/lib \
-I$(ALPS_DIR)/alps/applications/dmft/qmc \
-I$(ALPS_DIR)/alps/applications/dmft/qmc/hybridization2 \
-I/usr/lib/openmpi/include
As a reference I used the main.C file in the hybridization2 folder.
Therefore, calling the impurity solver looks like this:
int main(int argc, char *argv[])
{
...
#ifdef USE_MPI
boost::mpi::environment env(argc, argv);
boost::mpi::communicator world;
#endif
...
//Do all initalization, generate intial Weiss-Field/Bath-GF
//Enter DMFT loop
while(!converged)
{
//Save Weiss-Field/Bath-GF into HDF5 file for the solver
...
alps::mcoptions options(argc, argv);
if (options.valid)
{
alps::parameters_type<hybridization>::type
parms(alps::hdf5::archive(options.input_file, "r"));
alps::parallel<hybridization> s(parms, world);
if(options.time_limit!=0)
throw std::invalid_argument("time limit is passed in the parameter
file!");
if(!parms.defined("MAX_TIME"))
throw std::runtime_error("parameter MAX_TIME is not defined. How long
do you want to run the code for? (in seconds)");
s.run(boost::bind(&stop_callback,
boost::posix_time::second_clock::local_time() +
boost::posix_time::seconds((int)parms["MAX_TIME"])));
if (world.rank()==0)
{
alps::results_type<hybridization>::type results = collect_results(s);
save_results(results, parms, options.output_file,
"/simulation/results");
}
...
//Read the results from the output file and convert
//the Impurity GF from Legendre representation to
//Matsubara representation.
}
//Do remaining DMFT steps:
//Get Selfenergy
//Hilbert-Transformation
//Get new bath GF
//check convergence
} //end of DMFT loop
}
Everything seems to work quite well but I would also like to use the
functions that print information about the percentage of work done and I
want to feed and read my data directly in/to the impurity solver without
writing them into a file.
So the way I currently do it is far away from optimal. Can you give me a
general advice on how you intended the impurity solver to be used in a C++
code?
Another problem that I have, but want to adress after I resolved my first
question, is that the GF from the Impurity Solver is not decaying like
1/w_n but with some factor ~ 1/1.5w_n. I'm using the Legendre
representation of the GF and transform it back for further use in the DMFT
cycle.
Do you know a possible reason for this? Is this simply caused by too few
Sweeps or Legendre coefficients?
I'd greatly appreciate your help.
Sincerely,
Steffen Backes
[View Less]
Dear ALPS users and developers,
I am using the ALPS' DMRG application to run some simulations on a
Heisenberg chain. Is there any way to output in the hdf file, or an
external file, a certain number of eigenvalues of the reduced density
matrix at each step?
I know setting VERBOSE to 1 it prints in shell all the density matrix
eigenvalues, and I could script this output. But is extremely long and not
very convenient, so I am wandering if there is a better way of doing it.
I thank you in advance …
[View More]for any help.
Kindest regards.
--
Emanuele Levi
emanuele.levi(a)gmail.com
[View Less]
Dear all,
I have been doing some tests for the Bose Hubbard model in 1D with
dirloop_sse and I find that the the output density and the value of the
Green's function at (0,0) do not coincide, as I would expect.
I understand that when measuring Green's functions for the Bose-Hubbard
model the output is that of <b^\dagger_0 b_j> with j going over all lattice
points. b^\dagger_i is a creation operator and b_j is a destruction at
sites i and j respectively. If that is correct, then, the …
[View More]following should
be correct too and I should get <b^\dagger_0 b_0>=<n_0>=\rho. Where I
denote the density by \rho.
When I do the calculation, using the following input:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="ALPS.xsl"?>
<SIMULATION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xml.comp-phys.org/2003/8/QMCXML.xsd">
<PARAMETERS>
<PARAMETER name="MEASURE[Green Function]">True</PARAMETER>
<PARAMETER name="MEASURE[Correlations]">True</PARAMETER>
<PARAMETER name="L">64</PARAMETER>
<PARAMETER name="LATTICE">chain lattice</PARAMETER>
<PARAMETER name="SEED">189185290</PARAMETER>
<PARAMETER name="U">10.0</PARAMETER>
<PARAMETER name="T">0.5</PARAMETER>
<PARAMETER name="MODEL">boson Hubbard</PARAMETER>
<PARAMETER name="Nmax">3</PARAMETER>
<PARAMETER name="THERMALIZATION">1000</PARAMETER>
<PARAMETER name="SWEEPS">50000</PARAMETER>
<PARAMETER name="NONLOCAL">0</PARAMETER>
<PARAMETER name="mu">0.4</PARAMETER>
<PARAMETER name="t">0.5</PARAMETER>
</PARAMETERS>
</SIMULATION>
The output I get is:
<SCALAR_AVERAGE name="Density">
<COUNT>55257</COUNT>
<MEAN method="simple">0.6790808</MEAN>
<ERROR converged="yes" method="binning">0.000306</ERROR>
<VARIANCE method="simple">0.00258</VARIANCE>
<AUTOCORR method="binning">0.505</AUTOCORR>
<VECTOR_AVERAGE name="Green's Function" nvalues="64">
<SCALAR_AVERAGE indexvalue="( 0 ) -- ( 0 )">
<COUNT>55257</COUNT>
<MEAN method="simple">1.178037</MEAN>
<ERROR converged="yes" method="binning">0.000505</ERROR>
<VARIANCE method="simple">0.0117</VARIANCE>
<AUTOCORR method="binning">0.103</AUTOCORR>
Which is very different. Am I interpreting the output correctly or am I
just not running it long enough?
Also, what is the meaning of the last three fields in the xml output field?
n,n^2 and n^4? Because my initial guess would be to interpret n as the
number of particles but it is not consistent with the density and the
lattice size.
Thank you very much,
Francisco Cordobes
.
[View Less]
Dear All,
I am compiling alps and I am stuct at 64%.
The error message is at the very bottom.
My cmake line is :
cmake28 -DCMAKE_INSTALL_PREFIX=~/opt/alps -D
Boost_ROOT_DIR:PATH=~/opt/alps-2.1.1-r6176-src-with-boost/boost/
-DCMAKE_CXX_COMPILER=/opt/intel/composer_xe_2011_sp1.7.256/bin/intel64/icpc
-DCMAKE_C_COMPILER=/opt/intel/composer_xe_2011_sp1.7.256/bin/intel64/icc -D
LAPACK_64_BIT=ON -D HDF5_LIBRARIES=/opt/hdf5-1.8.8-intel/lib/libhdf5.so -D
HDF5_INCLUDE_DIR=/opt/hdf5-1.8.8-intel/…
[View More]include/ -DALPS_BUILD_FORTRAN=ON
~/opt/alps-2.1.1-r6176-src-with-boost/alps/
compliler lines:
-- The C compiler identification is Intel 12.1.0.20111011
-- The CXX compiler identification is Intel 12.1.0.20111011
-- The Fortran compiler identification is Intel
What could be wrong ? I am using version alps-2.1.1-r6176-src-with-boost
(straing from the web page, with FindLapack taken from the
alps-2.1.1-r6670-src-with-boost).
The version alps-2.1.1-r6670-src-with-boost fails at exactly the same point
with exactly the same error message.
Regards,
Mateusz Lacki
[ 64%] Building CXX object
example/ietl/CMakeFiles/jacobidavidson2.dir/jacobidavidson2.cpp.o
/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/boost/numeric/bindings/lapack/computational/getrf.hpp(197):
error: no instance of overloaded function
"boost::numeric::bindings::lapack::detail::getrf" matches the argument list
argument types are: (order, ptrdiff_t, ptrdiff_t, double *,
ptrdiff_t, int *)
return detail::getrf( order(), bindings::size_row(a),
^
detected during:
instantiation of "ptrdiff_t={long}
boost::numeric::bindings::lapack::getrf_impl<Value>::invoke(MatrixA &,
VectorIPIV &) [with Value=double,
MatrixA=boost::numeric::ublas::matrix<double,
boost::numeric::ublas::column_major,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>>>,
VectorIPIV=std::vector<int, std::allocator<int>>]" at line 220
instantiation of "ptrdiff_t={long}
boost::numeric::bindings::lapack::getrf(MatrixA &, VectorIPIV &) [with
MatrixA=boost::numeric::ublas::matrix<double,
boost::numeric::ublas::column_major,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>>>,
VectorIPIV=std::vector<int, std::allocator<int>>]" at line 285 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/ietl/jd.h"
instantiation of "void ietl::solver::left_prec_solver<SOLV,
MATRIX, VS,
PREC>::operator()(ietl::real_type<ietl::vectorspace_traits<VS>::scalar_type>::type,
ietl::vectorspace_traits<VS>::vector_type &,
ietl::vectorspace_traits<VS>::vector_type &, IT &) [with
SOLV=ietl::gmres_wrapper, MATRIX=matrix_t, VS=ietl::vectorspace<vector_t>,
PREC=jacobi_prec<matrix_t, double>, IT=ietl::jd_iteration<double>]" at line
611 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/ietl/jd.h"
instantiation of "void ietl::jd<MATRIX, VS>::jdqr(SOLVER &, IT
&, GEN &, ietl::vectorspace_traits<VS>::size_type, bool) [with
MATRIX=matrix_t, VS=ietl::vectorspace<vector_t>,
SOLVER=ietl::solver::left_prec_solver<ietl::gmres_wrapper, matrix_t,
ietl::vectorspace<vector_t>, jacobi_prec<matrix_t, double>>,
IT=ietl::jd_iteration<double>, GEN=gen_t]" at line 384 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/ietl/jd.h"
instantiation of "void ietl::jd<MATRIX, VS>::eigensystem(IT &,
GEN &, ietl::vectorspace_traits<VS>::size_type, PREC &, SOLV, bool) [with
MATRIX=matrix_t, VS=ietl::vectorspace<vector_t>, SOLV=ietl::gmres_wrapper,
IT=ietl::jd_iteration<double>, GEN=gen_t, PREC=jacobi_prec<matrix_t,
double>]" at line 165 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/example/ietl/jacobidavidson2.cpp"
/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/boost/numeric/bindings/lapack/computational/getrs.hpp(222):
error: no instance of overloaded function
"boost::numeric::bindings::lapack::detail::getrs" matches the argument list
argument types are: (order, trans, ptrdiff_t, ptrdiff_t, const
double *, ptrdiff_t, const int *, double *, ptrdiff_t)
return detail::getrs( order(), trans(),
bindings::size_column_op(a,
^
detected during:
instantiation of "ptrdiff_t={long}
boost::numeric::bindings::lapack::getrs_impl<Value>::invoke(const MatrixA
&, const VectorIPIV &, MatrixB &) [with Value=double,
MatrixA=boost::numeric::ublas::matrix<double,
boost::numeric::ublas::column_major,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>>>,
VectorIPIV=std::vector<int, std::allocator<int>>,
MatrixB=boost::numeric::ublas::vector<double,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>>>]"
at line 247
instantiation of "ptrdiff_t={long}
boost::numeric::bindings::lapack::getrs(const MatrixA &, const VectorIPIV
&, MatrixB &) [with MatrixA=boost::numeric::ublas::matrix<double,
boost::numeric::ublas::column_major,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>>>,
VectorIPIV=std::vector<int, std::allocator<int>>,
MatrixB=boost::numeric::ublas::vector<double,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>>>]"
at line 294 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/ietl/jd.h"
instantiation of "void ietl::solver::left_prec_solver<SOLV,
MATRIX, VS,
PREC>::operator()(ietl::real_type<ietl::vectorspace_traits<VS>::scalar_type>::type,
ietl::vectorspace_traits<VS>::vector_type &,
ietl::vectorspace_traits<VS>::vector_type &, IT &) [with
SOLV=ietl::gmres_wrapper, MATRIX=matrix_t, VS=ietl::vectorspace<vector_t>,
PREC=jacobi_prec<matrix_t, double>, IT=ietl::jd_iteration<double>]" at line
611 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/ietl/jd.h"
instantiation of "void ietl::jd<MATRIX, VS>::jdqr(SOLVER &, IT
&, GEN &, ietl::vectorspace_traits<VS>::size_type, bool) [with
MATRIX=matrix_t, VS=ietl::vectorspace<vector_t>,
SOLVER=ietl::solver::left_prec_solver<ietl::gmres_wrapper, matrix_t,
ietl::vectorspace<vector_t>, jacobi_prec<matrix_t, double>>,
IT=ietl::jd_iteration<double>, GEN=gen_t]" at line 384 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/src/ietl/jd.h"
instantiation of "void ietl::jd<MATRIX, VS>::eigensystem(IT &,
GEN &, ietl::vectorspace_traits<VS>::size_type, PREC &, SOLV, bool) [with
MATRIX=matrix_t, VS=ietl::vectorspace<vector_t>, SOLV=ietl::gmres_wrapper,
IT=ietl::jd_iteration<double>, GEN=gen_t, PREC=jacobi_prec<matrix_t,
double>]" at line 165 of
"/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/example/ietl/jacobidavidson2.cpp"
compilation aborted for
/home/lkb/lacki/opt/alps-2.1.1-r6176-src-with-boost/alps/example/ietl/jacobidavidson2.cpp
(code 2)
make[2]: ***
[example/ietl/CMakeFiles/jacobidavidson2.dir/jacobidavidson2.cpp.o] Erreur 2
make[1]: *** [example/ietl/CMakeFiles/jacobidavidson2.dir/all] Erreur 2
make: *** [all] Erreur 2
[View Less]
Dear All
I have found the following code in FindLapack.cmake trying to do
installation of new alps:
IF($ENV{MKL} MATCHES "mkl")
MESSAGE(STATUS "Using intel/mkl library: $ENV{MKL}")
#look for the path where the mkl is installed
43: STRING(REGEX MATCHALL "[-][L]([^ ;])+" MKL_PATH_WITH_PREFIX
"$ENV{MKL}")
STRING(REGEX REPLACE "[-][L]" "" MKL_PATHS ${MKL_PATH_WITH_PREFIX})
ENDIF($ENV{MKL} MATCHES "mkl")
If I assume correctly this code assumes that there is an environment
variable dalled …
[View More]MKL which contains something like
"-L/path/to/mkl"
on my platform it is set by default to
"/path/to/mkl"
If I understand it correctly at the line 43, the $MKL gets stripped of "-L"
part and the ${MKL_PATH_WITH_PREFIX} then
will contain just "/path/to/mkl".
I think that perhaps some sort of conditional clause could be added so that
both
$MKL = /path/to/mkl
and
$MKL = -L/path/to/mkl
worked.
Regards,
Mateusz Lacki
[View Less]
Dear All,
I would like to ask about the lapack library used by alps:
I have a following output:
-- Using intel/mkl library: -L/opt/intel/composer_xe_2011_sp1.7.256/mkl
MKL_PATH_WITH_PREFIX -L/opt/intel/composer_xe_2011_sp1.7.256/mkl
-- Looking for intel/mkl library in
/opt/intel/composer_xe_2011_sp1/mkl//lib/intel64;/opt/intel/composer_xe_2011_sp1/mkl//lib/emt;/opt/intel/composer_xe_2011_sp1/mkl//lib/;/opt/intel/composer_xe_2011_sp1/mkl//lib;/opt/intel/composer_xe_2011_sp1.7.256/mkl
Falling …
[View More]back to CMake provied LAPACK/BLAS detection.
-- A library with BLAS API found.
-- A library with BLAS API found.
-- A library with LAPACK API not found. Please specify library location.
(i have uncommented debug messages)
so my mkl is located in: /opt/intel/composer_xe_2011_sp1/mkl//lib/intel64
which is btw the default localtion of mkl library in newer versions of the
compiler
in the FindLapack.cmake the lines 61-65 are:
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" MKL_VERSION "$ENV{MKL_HOME}")
SET(LINK_LAPACK_DEFAULT 1)
IF(${MKL_VERSION} MATCHES "10\\.0\\.[0-2]")
SET(LINK_LAPACK_DEFAULT 0)
ENDIF(${MKL_VERSION} MATCHES "10\\.0\\.[0-2]")
I think (but I have never ever used cmake in my project) that this lines
assume that mkl s installed in a directory that that contains specific
version:
/opt/intel/Compiler/11.5.6/mkl (then MKL_Version becomes 11.5.6)
which is often not the case.
I will try to fix this cmake file as well as I can...
Regards,
Mateusz Lacki
[View Less]
Dear all,
It seems that the alps src-with-boost downloads still contain an old
(1.40) version of the boost src, which will not allow to compile ALPS.
Best regards,
Erik
Dear ALPS users,
I want to run some DMRG simulations on 1D Fermi Hubbard models. I
tried to work in the gran canonical ensemble, giving the chemical
potential mu instead of the density and without specifying that Nup
and Ndown are conserved quantities.
The code is running but it produces strange results, in particular the
calculated energy is varying a lot within the same sweep and the error
oscillates from 10-15 to 10-2. Any ideas why ?
Puzzled by that, I tried to do the same for the Bose …
[View More]Hubbard model,
but there everything works perfectly. Can you help me on that ?
My best regards,
Giuliano
[View Less]