Skip to content
Snippets Groups Projects
Commit cfe94524 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

See if python documentation now builds

Add dependencies to the pages job
Some minor bug fixes
parent e1301943
Branches
No related tags found
No related merge requests found
...@@ -348,15 +348,38 @@ build-gnu-gcov: ...@@ -348,15 +348,38 @@ build-gnu-gcov:
reports: reports:
cobertura: build_gcov/coverage.xml 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: pages:
stage: doc_builds stage: doc_builds
dependencies:
- build-gnu-lcov
script: 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 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/ - cd docs/
- make html - make html
- mv _build/html/ ../public - mv _build/html/ ../public
- cd ../
- mv build_lcov/coverage_html/ public/coverage/
artifacts: artifacts:
paths: paths:
- public - public
......
...@@ -40,13 +40,6 @@ std::array<int, 2> MPI_Interface::get_start_end_from_list(const int sz, const in ...@@ -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; 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() void mpi_setup::init_mpi_env()
{ {
if(env == 0) if(env == 0)
......
...@@ -45,16 +45,16 @@ public: ...@@ -45,16 +45,16 @@ public:
/** /**
* @brief Unique int tag generator * @brief Unique int tag generator
* *
* @param[in] procSend sending process * @param[in] proc_send sending process
* @param[in] procRecv receiving process * @param[in] proc_recv receiving process
* @param[in] maxOffest number of different communication processes possible between two processes within the same operation * @param[in] max_offset 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] offset the assigned offset corresponding to a single communication within the same operation
* *
* @return A unique tag to send information between two processes * @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 ...@@ -74,14 +74,6 @@ namespace mpi_setup
static mpi::environment* env = 0; //!< The MPI environment static mpi::environment* env = 0; //!< The MPI environment
extern std::shared_ptr<MPI_Interface> comm; //!< The MPI communicator 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 * @brief Initialize MPI enviroment
* *
......
...@@ -79,6 +79,8 @@ def test_feature_space(): ...@@ -79,6 +79,8 @@ def test_feature_space():
pass pass
feat_space = FeatureSpace(inputs) feat_space = FeatureSpace(inputs)
assert feat_space.phi0[0].expr == inputs.phi_0[0].expr
feat_space.sis(inputs.prop_train) feat_space.sis(inputs.prop_train)
shutil.rmtree("feature_space/") shutil.rmtree("feature_space/")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment