diff --git a/doc/installation/clang.rst b/doc/installation/clang.rst index 88cc5e6e..05334e26 100644 --- a/doc/installation/clang.rst +++ b/doc/installation/clang.rst @@ -45,3 +45,23 @@ In order to use clang when building TRIQS:: On OS X, the options -std=c++11 and -stdlib=libc++ are automatically added by the TRIQS installation script. +libclang +---------- + +Some tools for developers (e.g. automatically C++/Python wrapper generation), use libclang +(delivered with clang), and its python bindings (usually not given). + +The latest version is necessary. + +A pip package, updated to the latest version, is on github. +Install it simply with :: + + pip install -e git+https://github.com/parcollet/python-clang.git#egg=clang + +To uninstall it (or another version) :: + + pip uninstall clang + + + + diff --git a/doc/installation/requirements.rst b/doc/installation/requirements.rst index 8966920d..eb81d6cd 100644 --- a/doc/installation/requirements.rst +++ b/doc/installation/requirements.rst @@ -19,16 +19,13 @@ A recent compiler is therefore mandatory. * Standard compliant C++ compilers (recommended and supported). - * :ref:`clang 3.2` and higher (in particular the default clang on OS X 10.8). + * :ref:`clang 3.3` and higher (in particular the default clang on OS X >= 10.8). * g++ 4.8.1 and higher - * The intel icc 14.0 is close to be C++11 compliant, but presents currently too many bugs to be supported + * The intel icc 15.0 is close to be C++11 compliant, but presents currently too many bugs to be supported at present. It compiles 99% of TRIQS, but we do not have the ressources to write and maintains all necessary workarounds. - Besides, for *our codes*, icc does not provide a significant speed gain (unlike MKL), - so we do not recommend it for TRIQS. - * C++98 compilers * g++ before 4.8.1 @@ -67,12 +64,16 @@ Libraries +------------------------+----------+------------------------------------------------------------------------+ | cmake | >= 2.8.7 | CMake is used to control the software compilation process | +------------------------+----------+------------------------------------------------------------------------+ +| mako | >= 0.9.1 | mako templates are used to generate the C++/python wrapper | ++------------------------+----------+------------------------------------------------------------------------+ | pyparsing | >= ? | Tool for sphinx (to compile documentation) | +------------------------+----------+------------------------------------------------------------------------+ | sphinxcontrib-doxylink | >= ? | Tool for sphinx (to compile documentation) | +------------------------+----------+------------------------------------------------------------------------+ | matplotlib | >= 0.99 | Python 2D plotting library | +------------------------+----------+------------------------------------------------------------------------+ +| libclang | 3.4 | python bindings of the clang lib (for TRIQS developers ONLY) | ++------------------------+----------+------------------------------------------------------------------------+ (1) Since standard linux distributions (and macports on OS X) now provides openmpi, even on laptops, we avoid the unnecessary complication of maintaining a non-parallel version of TRIQS diff --git a/doc/reference/utilities/exceptions.rst b/doc/reference/utilities/exceptions.rst index 70cfaedd..b9d982ac 100644 --- a/doc/reference/utilities/exceptions.rst +++ b/doc/reference/utilities/exceptions.rst @@ -10,13 +10,17 @@ Exceptions TRIQS defines special exceptions, with the following characteristics : * they derives from std::exceptions -* their .what() contains: +* their method .what() returns : + * the date and time of the exception (useful in long QMC computations...). * the file and line where the exception occurred - * an additionnal error message (see example below). The error behaves like a std::stringstream, - one can accumulate any message + * an additionnal error message (see example below). The error behaves like a std::stringstream, one can accumulate any message + +* their method .what() returns : * a complete stack strace of the C++ code at the exception point, with demangling of the function name (on gcc and clang). +In addition, we provide a TRIQS_RUNTIME_ERROR macro to throw exception easily, Cf example below. + .. warning:: For uniformity, it is highly recommended to use these macros when developing for TRIQS. diff --git a/doc/reference/utilities/exceptions_1.cpp b/doc/reference/utilities/exceptions_1.cpp index 2dfb6e27..4cefd52e 100644 --- a/doc/reference/utilities/exceptions_1.cpp +++ b/doc/reference/utilities/exceptions_1.cpp @@ -7,7 +7,8 @@ void f() { if (2 != 3) TRIQS_RUNTIME_ERROR << " The condition is false because " << 2 << "!=" << 3; } catch (triqs::runtime_error const& e) { - std::cout << "caught error " << e.what() << std::endl; + std::cout << "caught error \n" << e.what() << std::endl; + std::cout << "C++ trace = \n" << e.trace() << std::endl; } }