Page 1 of 1

compiling triqs

Posted: Thu Apr 20, 2017 6:30 pm
by juan f rivas-silva
Hello everybody,

I got the 8.2.2 version of abinit. After compile it with some flavors ( dft: lxc, ..) i tried to do it with triqs-ext --enable-triqs.
Firstly, I downloaded the triqs code for githup and installing it apparently well, without errors.
After I tried the make in abinit directory. Some things happened:
1) The expected sites for needed programs of triqs did not matched, and I should add files in the abinit directory.
2) After did those changes I got finally errors related with the
triqs_cthyb_qmc.cpp and triqs_cthyb_qmc.hpp files, as:

triqs_cthyb_qmc.hpp:13:23: error: ‘triqs::utility::many_body_operator’ has not been declared
using triqs::utility::many_body_operator;

triqs_cthyb_qmc.hpp:22:5: error: ‘many_body_operator’ does not name a type
many_body_operator<double> init_Hamiltonian( double *eps, int nflavor, double *U );

triqs_cthyb_qmc.cpp:23:23: error: ‘triqs::utility::n’ has not been declared
using triqs::utility::n;

triqs_cthyb_qmc.cpp:25:38: error: ‘many_body_operator’ in namespace ‘triqs::utility’ does not name a template type
using indices_type = triqs::utility::many_body_operator<double>::indices_t;

etc.

Please tell me if I need some options to be used in Makefile or so..

Thank you in advance, and receive best regards for Puebla, Mexico.

jf rivas

Re: compiling triqs

Posted: Fri Apr 21, 2017 9:02 am
by amadon
Hello

I think you are using the version 1.4 of TRIQS whereas, as emphasized in http://www.abinit.org/doc/helpfiles/for ... #dmft_solv, the current implementation in ABINIT is valid for version 1.3.
The link with version 1.4 is a minor modification of the interface, but it is not done for the moment.
So you have to download the version 1.3, compile it and link it with ABINIT.

Best regards
Bernard

compiling triqs 2

Posted: Sat Apr 22, 2017 4:51 pm
by juan f rivas-silva
Dear Prof. Amadon,
Thank you for your attention.
I compiled and installed now the 1.3 versions of triqs and cthyb, and compiled again the 8.2.2 version of abinit.
After arrange dirs and some files.h, i got to the same errors than before, related to triqs_cthyb_qmc hpp and cpp, ( please let me send all of them):
***
make[3]: Entering directory '/home/rivas/Desktop/abinit-8.2.2p/src/01_triqs_ext'
/opt/openmpi-1.6.3/bin/mpicxx -std=c++14 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -I/home/rivas/Desktop/abinit-8.2.2p/fallbacks/exports/include -g -O2 -mtune=native -march=native -std=c++14 -MT triqs_cthyb_qmc.o -MD -MP -MF .deps/triqs_cthyb_qmc.Tpo -c -o triqs_cthyb_qmc.o triqs_cthyb_qmc.cpp
In file included from triqs_cthyb_qmc.cpp:16:0:
triqs_cthyb_qmc.hpp:13:23: error: ‘triqs::utility::many_body_operator’ has not been declared
using triqs::utility::many_body_operator;
^
In file included from triqs_cthyb_qmc.cpp:16:0:
triqs_cthyb_qmc.hpp:22:5: error: ‘many_body_operator’ does not name a type
many_body_operator<double> init_Hamiltonian( double *eps, int nflavor, double *U );
^
triqs_cthyb_qmc.hpp:24:5: error: ‘many_body_operator’ does not name a type
many_body_operator<double> init_fullHamiltonian( double *eps, int nflavor, double *U );
^
triqs_cthyb_qmc.hpp:26:5: error: ‘many_body_operator’ does not name a type
many_body_operator<double> init_fullHamiltonianUpDown( double *eps, int nflavor, double *U );
^
triqs_cthyb_qmc.cpp:20:23: error: ‘triqs::utility::many_body_operator’ has not been declared
using triqs::utility::many_body_operator;
^
triqs_cthyb_qmc.cpp:21:23: error: ‘triqs::utility::c’ has not been declared
using triqs::utility::c;
^
triqs_cthyb_qmc.cpp:22:23: error: ‘triqs::utility::c_dag’ has not been declared
using triqs::utility::c_dag;
^
triqs_cthyb_qmc.cpp:23:23: error: ‘triqs::utility::n’ has not been declared
using triqs::utility::n;
^
triqs_cthyb_qmc.cpp:25:38: error: ‘many_body_operator’ in namespace ‘triqs::utility’ does not name a template type
using indices_type = triqs::utility::many_body_operator<double>::indices_t;
^
triqs_cthyb_qmc.cpp: In function ‘void ctqmc_triqs_run(bool, bool, bool, bool, bool, int, int, int, int, int, int, int, int, int, double, double*, double*, double*, std::complex<double>*, std::complex<double>*, double*, double*, int*)’:
triqs_cthyb_qmc.cpp:39:3: error: ‘environment’ is not a member of ‘boost::mpi’
boost::mpi::environment env;
^
triqs_cthyb_qmc.cpp:39:3: note: suggested alternative:
In file included from ./triqs/mc_tools/mc_generic.hpp:27:0,
from ./triqs/mc_tools.hpp:24,
from ./solver_core.hpp:22,
from triqs_cthyb_qmc.cpp:5:
./triqs/mpi/base.hpp:40:9: note: ‘triqs::mpi::environment’
struct environment {
^
triqs_cthyb_qmc.cpp:42:30: error: aggregate ‘boost::mpi::communicator c’ has incomplete type and cannot be defined
boost::mpi::communicator c;
^
triqs_cthyb_qmc.cpp:97:3: error: ‘triqs::operators::many_body_operator {aka triqs::operators::many_body_operator_generic<triqs::utility::real_or_complex>}’ is not a template
many_body_operator<double> H;
^
triqs_cthyb_qmc.cpp:107:59: error: ‘init_Hamiltonian’ was not declared in this scope
H = init_Hamiltonian( epsi, num_orbitals, umat_ij );
^
triqs_cthyb_qmc.cpp:117:66: error: ‘init_fullHamiltonian’ was not declared in this scope
H = init_fullHamiltonian( epsi, num_orbitals, umat_ijkl );
^
triqs_cthyb_qmc.cpp:119:65: error: ‘init_fullHamiltonianUpDown’ was not declared in this scope
H = init_fullHamiltonianUpDown( epsi, num_orbitals, umat_ijkl );
^
triqs_cthyb_qmc.cpp:285:23: error: cannot convert ‘std::complex<double>’ to ‘double’ in assignment
g_tau[compteur]= solver.G_tau()[0].data()(tau,o,oo);
^
triqs_cthyb_qmc.cpp:304:22: error: cannot convert ‘std::complex<double>’ to ‘double’ in assignment
gl[compteur]= solver.G_l()[0].data()(l,o,oo);
^
triqs_cthyb_qmc.cpp: At global scope:
triqs_cthyb_qmc.cpp:399:1: error: ‘triqs::operators::many_body_operator {aka triqs::operators::many_body_operator_generic<triqs::utility::real_or_complex>}’ is not a template
many_body_operator<double> init_Hamiltonian( double *eps, int nflavor, double *U){
^
triqs_cthyb_qmc.cpp: In function ‘triqs::operators::many_body_operator init_Hamiltonian(double*, int, double*)’:
triqs_cthyb_qmc.cpp:401:3: error: ‘triqs::operators::many_body_operator {aka triqs::operators::many_body_operator_generic<triqs::utility::real_or_complex>}’ is not a template
many_body_operator<double> H; double coeff;
^
triqs_cthyb_qmc.cpp: At global scope:
triqs_cthyb_qmc.cpp:425:1: error: ‘triqs::operators::many_body_operator {aka triqs::operators::many_body_operator_generic<triqs::utility::real_or_complex>}’ is not a template
many_body_operator<double> init_fullHamiltonian( double *eps, int nflavor, double *U){
^
triqs_cthyb_qmc.cpp: In function ‘triqs::operators::many_body_operator init_fullHamiltonian(double*, int, double*)’:
triqs_cthyb_qmc.cpp:427:3: error: ‘triqs::operators::many_body_operator {aka triqs::operators::many_body_operator_generic<triqs::utility::real_or_complex>}’ is not a template
many_body_operator<double> H; double coeff;
^
triqs_cthyb_qmc.cpp: At global scope:
triqs_cthyb_qmc.cpp:450:1: error: ‘triqs::operators::many_body_operator {aka triqs::operators::many_body_operator_generic<triqs::utility::real_or_complex>}’ is not a template
many_body_operator<double> init_fullHamiltonianUpDown( double *eps, int nflavor, double *U ){
^
triqs_cthyb_qmc.cpp: In function ‘triqs::operators::many_body_operator init_fullHamiltonianUpDown(double*, int, double*)’:
triqs_cthyb_qmc.cpp:452:3: error: ‘triqs::operators::many_body_operator {aka triqs::operators::many_body_operator_generic<triqs::utility::real_or_complex>}’ is not a template
many_body_operator<double> H; double coeff;
^
Makefile:940: recipe for target 'triqs_cthyb_qmc.o' failed
make[3]: *** [triqs_cthyb_qmc.o] Error 1
make[3]: Leaving directory '/home/rivas/Desktop/abinit-8.2.2p/src/01_triqs_ext'
Makefile:922: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/rivas/Desktop/abinit-8.2.2p/src'
Makefile:2248: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/rivas/Desktop/abinit-8.2.2p'
Makefile:2176: recipe for target 'all' failed
make: *** [all] Error 2

***
Unfortunately, my knowledge in c++ is less than regular to solve this questions.
Thank you again,
juan f rivas

Re: compiling triqs

Posted: Mon Apr 24, 2017 10:09 pm
by jbeuken
Hi,
make[3]: Entering directory '/home/rivas/Desktop/abinit-8.2.2p/src/01_triqs_ext'
/opt/openmpi-1.6.3/bin/mpicxx -std=c++14 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -I/home/rivas/Desktop/abinit-8.2.2p/fallbacks/exports/include -g -O2 -mtune=native -march=native -std=c++14 -MT triqs_cthyb_qmc.o -MD -MP -MF .deps/triqs_cthyb_qmc.Tpo -c -o triqs_cthyb_qmc.o triqs_cthyb_qmc.cpp


I do not really know why but I have not managed to run triqs 1.3 with openmpi and the boost package on ubuntu 16.04 ...

Then, I use my MPICH 3.2 and I recompile boost_1_59_0
I also compiled my own version of netcdf + hdf5 with the same version of MPICH

this is the used ac file :

Code: Select all

CPP="cpp"
CXXFLAGS="-std=c++1y"
enable_mpi="yes"
enable_mpi_io="yes"
with_mpi_prefix="${MPI_HOME}"
with_trio_flavor="netcdf"
with_netcdf_incs="-I/usr/local/netcdf/include -I/usr/local/hdf5_mpich/include"
with_netcdf_libs="-L/usr/local/netcdf/lib -lnetcdff -lnetcdf -L/usr/local/hdf5_mpich/lib -lhdf5_hl -lhdf5"
enable_netcdf_default="yes"
with_linalg_flavor="netlib"
with_linalg_incs="-I/usr/include"
with_linalg_libs="-L/usr/lib -llapack -lblas"
with_dft_flavor="libxc"
with_libxc_incs="-I/usr/local/fallbacks/gnu/4.9/mpi/include"
with_libxc_libs="-L/usr/local/fallbacks/gnu/4.9/mpi/lib -lxcf90 -lxc"
enable_triqs="yes"
with_triqs_incs="-I/usr/local/src/TRIQS/cthyb-1.3/c++ -I${BOOST_PATH}/include -I${TRIQS_PATH}/include -I/usr/include/python2.7 -I/usr/include/hdf5/serial"
with_triqs_libs="-L${TRIQS_PATH}/lib -lcthyb_c -ltriqs -L/usr/local/boost_gcc/lib -lboost_mpi -lboost_mpi_python -lboost_python -L/usr/lib/x86_64-linux-gnu -lpython2.7 -lmpicxx -lstdc++"
enable_gw_dpc="yes"
enable_memory_profiling="no"
enable_maintainer_checks="no"


regards

Re: compiling triqs

Posted: Tue Apr 25, 2017 1:09 am
by juan f rivas-silva
Jbeuken, Thank you, I will try your options and let you know the advances as fast as I can. regards too..

Re: compiling triqs  [SOLVED]

Posted: Sun Apr 30, 2017 4:44 am
by juan f rivas-silva
Dear profs. Amadon and Jbeuken,

Finally I got install all the abinit ver. 8.2.1 with the following configure:


rivas@cachita:~/Desktop/abinit-8.2.1$ ./configure --with-dft-flavor="atompaw+bigdft+wannier90+libxc" --enable-mpi --with-mpi-prefix=/opt/openmpi-1.6.3 --enable-triqs --with-triqs_incs="-I/home/rivas/Desktop/triqs3-ya/cthyb.build/c++ -I/usr/include/boost -I/home/rivas/Desktop/triqs3-ya/triqs.build/include/triqs -I/usr/include/python2.7 -I/usr/include/hdf5/serial" --with-triqs_libs="-L/home/rivas/Desktop/triqs3-ya/triqs.build/lib -lcthyb_c -ltriqs -L/usr/lib/x86_64-linux-gnu -lboost_mpi -lboost_mpi_python -lboost_python -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -L/opt/openmpi-1.6.3/lib -lmpicxx -L/usr/lib/gcc/x86_64-linux-gnu/5 "

In a moment, I used in the makefile of 01_triqs_ext a -std=c++14 for cxx compiler.

I had to change several dirs and declarations, specially from triqs_cthyb_qmc cpp and hpp an others in triqs.
Also I put the subroutine ctqmc_triqs_run of interface_triqs_ctqmc directly in the qmc_prep_ctqmc.F90 file of src/68_dmft

With all of this, i got the compilation without errors! :)

Testing, I just run the tests tdmft_1 and tdmft_2 and they give me correct results! :) :)

I will work more in testings.

Thank you for your help.

Regards

jf rivas

pd (my computer is a dell 8 proc in ubuntu 1604 )

Re: compiling triqs

Posted: Sun Apr 30, 2017 9:27 pm
by jbeuken
Dear jf rivas,

Very glad you managed with openmpi !
When I have a little time, I will try your recipe...

Regards,

jmb