diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a728988ed5ff55fa67feaa7fe0fdb57daf315f1c..4098c993bd0f5a10111c1b351825c087ec634b62 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -348,15 +348,38 @@ build-gnu-gcov: reports: cobertura: build_gcov/coverage.xml +build-gnu-lcov: + stage: build + script: + - python -m venv cpp_sisso_gnu_lcov_env + - source cpp_sisso_gnu_lcov_env/bin/activate + - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH + - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:`pwd`/cpp_sisso_gnu_lcov_env/lib/python3.7/site-packages/ + - mkdir build_lcov/ + - cd build_lcov/ + - cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILE=gcc -DCMAKE_BUILD_TYPE="Coverage" -DBUILD_TESTS=ON -DBUILD_PARAMS=ON -DBUILD_PYTHON=ON -DCMAKE_INSTALL_PREFIX=../gnu_lcov/ ../ + - make install + - make coverage_html + - cd ../ + artifacts: + when: always + paths: + - build_lcov/coverage_html + - cpp_sisso_gnu_lcov_env/ + pages: stage: doc_builds + dependencies: + - build-gnu-lcov script: - - source cpp_sisso_gnu_param_py_env/bin/activate + - source cpp_sisso_gnu_lcov_env/bin/activate - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH - - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_param_py_env/lib/python3.7/site-packages/ + - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_lcov_env/lib/python3.7/site-packages/ - cd docs/ - make html - mv _build/html/ ../public + - cd ../ + - mv build_lcov/coverage_html/ public/coverage/ artifacts: paths: - public diff --git a/src/mpi_interface/MPI_Interface.cpp b/src/mpi_interface/MPI_Interface.cpp index 3c7ddae0bd34a4a4a649bee1b72d5de55b37db8f..8973fb735488324fec3b76fa81a01a8050f4fec6 100644 --- a/src/mpi_interface/MPI_Interface.cpp +++ b/src/mpi_interface/MPI_Interface.cpp @@ -40,13 +40,6 @@ std::array<int, 2> MPI_Interface::get_start_end_from_list(const int sz, const in std::shared_ptr<MPI_Interface> mpi_setup::comm; -void mpi_setup::init_mpi_env(int& argc, char **&argv) -{ - if(env == 0) - env = new boost::mpi::environment(argc, argv); - comm = std::make_shared<MPI_Interface>(); -} - void mpi_setup::init_mpi_env() { if(env == 0) diff --git a/src/mpi_interface/MPI_Interface.hpp b/src/mpi_interface/MPI_Interface.hpp index c1eb3650eb3cc0e2c2c8f09516bc51cb6b3f6dd3..6f9395177d2858068e032ab49d435654fac8b6b3 100644 --- a/src/mpi_interface/MPI_Interface.hpp +++ b/src/mpi_interface/MPI_Interface.hpp @@ -45,16 +45,16 @@ public: /** * @brief Unique int tag generator * - * @param[in] procSend sending process - * @param[in] procRecv receiving process - * @param[in] maxOffest number of different communication processes possible between two processes within the same operation - * @param[in] offest the assigned offset corresponding to a single communication within the same operation + * @param[in] proc_send sending process + * @param[in] proc_recv receiving process + * @param[in] max_offset number of different communication processes possible between two processes within the same operation + * @param[in] offset the assigned offset corresponding to a single communication within the same operation * * @return A unique tag to send information between two processes */ - int cantor_tag_gen(const unsigned int procSend, const unsigned int procRecv, const unsigned int maxOffest, const unsigned int offest) + int cantor_tag_gen(const unsigned int proc_send, const unsigned int proc_recv, const unsigned int max_offset, const unsigned int offset) { - return (int((procSend + procRecv) * (procSend + procSend +1) / 2) + procRecv) * maxOffest + offest; + return (int((proc_send + proc_recv) * (proc_send + proc_send +1) / 2) + proc_recv) * max_offset + offset; } /** @@ -74,14 +74,6 @@ namespace mpi_setup static mpi::environment* env = 0; //!< The MPI environment extern std::shared_ptr<MPI_Interface> comm; //!< The MPI communicator - /** - * @brief Initialize MPI enviroment - * - * @param argc from command line - * @param argv from command line - */ - void init_mpi_env(int& argc, char **&argv); - /** * @brief Initialize MPI enviroment * diff --git a/tests/pytest/test_feature_creation/test_feature_space/test_feature_space.py b/tests/pytest/test_feature_creation/test_feature_space/test_feature_space.py index 9a7dfe9a689351b44fd0e55ec047d218a0ca4c97..878373f5d89a4f1875b78f613c994dd0e1d46003 100644 --- a/tests/pytest/test_feature_creation/test_feature_space/test_feature_space.py +++ b/tests/pytest/test_feature_creation/test_feature_space/test_feature_space.py @@ -79,6 +79,8 @@ def test_feature_space(): pass feat_space = FeatureSpace(inputs) + assert feat_space.phi0[0].expr == inputs.phi_0[0].expr + feat_space.sis(inputs.prop_train) shutil.rmtree("feature_space/")