pomerol-ed / pomerol2triqs

Quick and dirty TRIQS wrapper around the Pomerol exact diagonalization library
GNU General Public License v3.0
9 stars 7 forks source link

Can't find triqsvars.sh file. #18

Closed abdelghany0 closed 1 year ago

abdelghany0 commented 1 year ago

I have successfully used TRIQS on Ubuntu 22.04.2, and now I am attempting to install pomerol2triqs. However, I am encountering difficulties in locating the path mentioned below:

<path_to_triqs_install_dir>/share/triqs/triqsvars.sh

I can't find triqsvars.sh anywhere.

Could you please provide some guidance or assistance?

krivenko commented 1 year ago

When TRIQS is installed into one of system directories (either /usr or /usr/local), triqsvars.sh is neither generated nor needed.

The point of sourcing triqsvars.sh is to let the compiler, the linker and the Python interpreter know where C++ header files, libraries and Python modules of TRIQS are located. If they are installed under one of the system directories, they are automatically visible to all relevant tools. This is in particular the case with the flatironinstitute/triqs Docker images, where TRIQS is installed in /usr.

abdelghany0 commented 1 year ago

So, I don't need to set the variables! good. Thank you!

Furthermore, I am unsure about the significance of the following paths:

<path_to_install_dir>

and

<path_to_pomerol_install_dir>

I used

cmake ../pomerol2triqs.git -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DPOMEROL_PATH=/usr/local

is that correct?

krivenko commented 1 year ago

<path_to_pomerol_install_dir> is where you have Pomerol installed. <path_to_install_dir> is where you want pomerol2triqs installed. It can be pretty much any directory. CMAKE_INSTALL_PREFIX defaults to /usr/local when omitted.

abdelghany0 commented 1 year ago

Sorry, I forgot to install Pomerol in advance. Now I have finished the installation, but when I try to run the anderson.py example I got a warning and error as follows:

Warning: could not identify MPI environment!
Starting serial run at: 2023-05-30 12:45:39.177699

Then:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_11409/3214194025.py in <module>
     11 
     12 # Make PomerolED solver object
---> 13 ed = PomerolED(index_converter, verbose = True)

RuntimeError: .. Error occurred at Tue May 30 17:36:58 2023

.. Error .. in calling C++ overload of constructor :
.. (no C++ name)(pomerol2triqs::index_converter_t index_converter, bool verbose) -> 
.. C++ error was : 
Triqs runtime error
    at /home/ragab/pomerol2triqs.git/c++/pomerol_ed.cpp : 26

pomerol2triqs does not support running in the serial (no MPI) mode
Exception was thrown on node 

Any suggestions?

krivenko commented 1 year ago

Any Python script calling pomerol2triqs must be run in the MPI environment.

mpirun -n 4 python anderson.py 
abdelghany0 commented 1 year ago

The installation has been completed successfully. All tests were compiled without errors. Thank you so much.