Package list votca-xtp / upstream/1.6.3
New upstream version 1.6.3 Nicholas Breen 11 months ago
18 changed file(s) with 103 addition(s) and 216 deletion(s). Raw diff Collapse all Expand all
66
77 jobs:
88 CI:
9 continue-on-error: ${{ matrix.distro == 'ubuntu_devel' || matrix.distro == 'fedora_rawhide' || matrix.continue-on-error == true }}
9 continue-on-error: ${{ matrix.distro == 'ubuntu:devel' || matrix.distro == 'opensuse:latest' || matrix.distro == 'fedora:rawhide' || matrix.continue-on-error == true }}
1010 strategy:
1111 matrix:
12 distro: [latest, fedora_rawhide, opensuse, ubuntu, ubuntu_devel, ubuntu_rolling, ubuntu_18.04, intel]
12 distro: ['fedora:latest', 'fedora:rawhide', 'opensuse:latest', 'ubuntu:latest', 'ubuntu:devel', 'ubuntu:rolling', 'ubuntu:18.04', 'fedora:intel']
1313 toolchain: [gnu, clang]
1414 cmake_build_type: [Release, Debug]
1515 minimal: [false]
1818 coverage: [false]
1919 no_regression_testing: [true]
2020 include:
21 - distro: latest
21 - distro: 'fedora:latest'
2222 toolchain: gnu
2323 cmake_build_type: Release
2424 module_build: true
2525 no_regression_testing: true
2626 runs-on: ubuntu-latest
27 container: votca/buildenv:${{ matrix.distro }}
27 container: ghcr.io/votca/buildenv/${{ matrix.distro }}
2828 steps:
2929 - uses: actions/checkout@v2.2.0
3030 with:
66 name: clang-format
77 if: ${{ github.event.comment.body == '@votca-bot format' }}
88 runs-on: ubuntu-latest
9 container: votca/buildenv:format
9 container: ghcr.io/votca/buildenv/format:latest
1010 steps:
1111 - name: Check if message comes from PR
1212 uses: octokit/request-action@v2.x
3434 token: ${{ secrets.VOTCA_BOT_TOKEN }}
3535 - name: Run clang-format
3636 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
37 run: find . -type f -regex ".*\.\(c\|h\|cc\|cpp\|hpp\)" -print0 | xargs -0 clang-format -i -style=file
37 run: |
38 curl -OL https://github.com/votca/votca/raw/master/.clang-format
39 find . -type f -regex ".*\.\(c\|h\|cc\|cpp\|hpp\)" -print0 | xargs -0 clang-format -i -style=file
3840 - name: Commit and push
3941 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
4042 run: |
+0
-66
.gitlab-ci.yml less more
0 stages:
1 - build
2
3 .build_script:
4 retry:
5 max: 2
6 variables:
7 CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
8 stage: build
9 artifacts:
10 paths:
11 - ${CI_PROJECT_DIR}/votca
12 when: always
13 dependencies: []
14 cache:
15 paths:
16 - ccache/
17 script:
18 - ccache -z
19 - j="$(grep -c processor /proc/cpuinfo 2>/dev/null)" || j=0; ((j++))
20 - git branch commit_of_build_${CI_BUILD_ID} ${CI_COMMIT_SHA}
21 - git clone https://github.com/votca/votca
22 - pushd votca
23 - if [[ ${CI_COMMIT_TAG} = v[12].[0-9]* ]]; then
24 git checkout -b ${CI_COMMIT_TAG} ${CI_COMMIT_TAG};
25 elif [[ ( ${CI_COMMIT_REF_NAME} =~ ^for/([^/]*)/.* || ${CI_COMMIT_REF_NAME} =~ ^(stable)$ ) && ${BASH_REMATCH[1]} != master ]]; then
26 git checkout -b ${BASH_REMATCH[1]} origin/${BASH_REMATCH[1]};
27 fi
28 - git submodule update --recursive --init
29 - git -C ${CI_PROJECT_NAME} fetch ${CI_PROJECT_DIR} commit_of_build_${CI_BUILD_ID}
30 - git -C ${CI_PROJECT_DIR} branch -d commit_of_build_${CI_BUILD_ID}
31 - git -C ${CI_PROJECT_NAME} checkout -f ${CI_COMMIT_SHA}
32 - mkdir -p build
33 - pushd build
34 - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=ON -DBUILD_XTP=ON -DENABLE_WERROR=ON
35 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
36 ${CMAKE_GENERATOR:+-G${CMAKE_GENERATOR}}
37 -DMODULE_BUILD=${MODULE_BUILD} ${MODULE_BUILD:+-DCMAKE_INSTALL_PREFIX=/home/votca/votca.install}
38 -DCMAKE_DISABLE_FIND_PACKAGE_MKL=${DISABLE_MKL}
39 -DUSE_CUDA=${USE_CUDA}
40 - cmake --build . --parallel 2
41 - ctest --output-on-failure
42 - test -z "${MODULE_BUILD}" && DESTDIR=${PWD}/install cmake --install . && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install
43 - sudo cmake --install .
44 - if [[ ${CLANG_FORMAT} ]]; then cmake --build . --target format && git -C ${CI_PROJECT_DIR}/votca/${CI_PROJECT_NAME} diff --exit-code; fi
45 - ccache -s
46
47 .build:
48 variables:
49 DISTRO: "latest"
50 image: votca/buildenv:${DISTRO}
51 extends: .build_script
52
53 Debug GPU Ubuntu:
54 variables:
55 CC: "gcc"
56 CXX: "g++"
57 CMAKE_BUILD_TYPE: "Debug"
58 USE_CUDA: "yes"
59 DISABLE_MKL: "yes"
60 before_script:
61 - source /opt/gromacs-2019/bin/GMXRC.bash
62 extends: .build_script
63 allow_failure: true
64 tags:
65 - gpu
00 For more detailed information about the changes see the history of the
11 [repository](https://github.com/votca/xtp/commits/master).
22
3 ## Version 1.6.2 (released 22.08.20)
3 ## Version 1.6.3 (released 09.12.20)
4 * switch to ghcr.io for CI (#555)
5 * fixing Gaussian guess read keyword (#562, #563)
6 * improved kmc output (#575)
7 * use master .clang-format in format action (#582, #584)
8 * strip windows line endings in readers (#596)
9
10 ## Version 1.6.2 _SuperGitta_ (released 22.08.20)
411 * move CI to GitHub Actions (#512, #514, #516, #519)
512 * add more checks to the dft_parse_part (#521)
613 * make unit tests work in parallel (#530)
11 project(votca-xtp)
22
33
4 set(PROJECT_VERSION "1.6.2")
4 set(PROJECT_VERSION "1.6.3")
55 set(PROJECT_CONTACT "bugs@votca.org")
66 string(REGEX REPLACE "^[1-9]+\\.([1-9]+).*$" "\\1" SOVERSION "${PROJECT_VERSION}")
77 if (NOT ${SOVERSION} MATCHES "[1-9]+")
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
1 * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
378378
379379 time_t now = time(nullptr);
380380 tm* localtm = localtime(&now);
381
381382 XTP_LOG(Log::error, _log)
382383 << " KMCLIFETIME finished at:" << asctime(localtm) << std::flush;
383
384 std::cout << _log << std::flush;
384385 return true;
385386 }
386387
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
1 * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
457457
458458 LoadGraph(top);
459459 RunVSSM();
460
460 std::cout << _log << std::flush;
461461 return true;
462462 }
463463
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1515 * limitations under the License.
1616 *
1717 */
18
19 #include <votca/tools/getline.h>
1820
1921 #include "vaverage.h"
2022 #include "votca/xtp/topology.h"
4345 Index id = 0;
4446 while (intt.good()) {
4547
46 std::getline(intt, line);
48 tools::getline(intt, line);
4749 std::vector<std::string> split;
4850 tools::Tokenizer toker(line, " \t");
4951 toker.ToVector(split);
7678 std::string line;
7779 while (intt.good()) {
7880
79 std::getline(intt, line);
81 tools::getline(intt, line);
8082 std::vector<std::string> split;
8183 tools::Tokenizer toker(line, " \t");
8284 toker.ToVector(split);
00 /*
1 * Copyright 2016 The VOTCA Development Team
1 * Copyright 2016-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #include "votca/xtp/atomcontainer.h"
2121 #include <boost/format.hpp>
2222 #include <votca/tools/elements.h>
23 #include <votca/tools/getline.h>
2324 #include <votca/tools/tokenizer.h>
2425
2526 namespace votca {
4647 }
4748 while (intt.good()) {
4849
49 std::getline(intt, line);
50 tools::getline(intt, line);
5051 tools::Tokenizer toker(line, " \t");
5152 std::vector<std::string> split = toker.ToVector();
5253
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1818
1919 #include "votca/xtp/qmpackage.h"
2020 #include <boost/algorithm/string.hpp>
21 #include <votca/tools/getline.h>
2122 #include <votca/xtp/ecpaobasis.h>
2223 #include <votca/xtp/orbitals.h>
2324
144145 std::vector<std::string> QMPackage::GetLineAndSplit(
145146 std::ifstream& input_file, const std::string separators) const {
146147 std::string line;
147 getline(input_file, line);
148 tools::getline(input_file, line);
148149 boost::trim(line);
149150 tools::Tokenizer tok(line, separators);
150151 return tok.ToVector();
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2323 #include <iomanip>
2424 #include <stdio.h>
2525 #include <votca/tools/constants.h>
26 #include <votca/tools/getline.h>
2627 #include <votca/xtp/ecpaobasis.h>
2728 #include <votca/xtp/orbitals.h>
2829
6263 std::string::size_type iop_pos;
6364 // check if the guess keyword is present, if yes, append the guess later
6465 if (_write_guess) {
65 iop_pos = _options.find("cards");
66 if (iop_pos != std::string::npos) {
67 _options = _options + " cards ";
66 iop_pos = _options.find("guess=cards");
67 if (iop_pos == std::string::npos) {
68 _options = _options + " guess=cards ";
6869 }
6970 }
7071
538539 }
539540
540541 // number of coefficients per line is in the first line of the file (5D15.8)
541 getline(input_file, line);
542 tools::getline(input_file, line);
542543 std::vector<std::string> strs;
543544 boost::algorithm::split(strs, line, boost::is_any_of("(D)"));
544545
545546 while (input_file) {
546547
547 getline(input_file, line);
548 tools::getline(input_file, line);
548549 // if a line has an equality sign, must be energy
549550 std::string::size_type energy_pos = line.find("=");
550551
644645 } while (ch != '\n' && (Index)input_file.tellg() != -1);
645646
646647 std::string line;
647 getline(input_file, line);
648 tools::getline(input_file, line);
648649 input_file.close();
649650
650651 std::string::size_type success = line.find("Normal termination of Gaussian");
677678 std::vector<std::string> archive;
678679 while (input_file) {
679680
680 getline(input_file, line);
681 tools::getline(input_file, line);
681682 boost::trim(line);
682683 GetArchive(archive, line, input_file);
683684
685686 if (charge_pos != std::string::npos) {
686687 has_charges = true;
687688 XTP_LOG(Log::info, *_pLog) << "Getting charges" << flush;
688 getline(input_file, line);
689 getline(input_file, line);
689 tools::getline(input_file, line);
690 tools::getline(input_file, line);
690691
691692 std::vector<std::string> row = GetLineAndSplit(input_file, "\t ");
692693 Index nfields = Index(row.size());
731732
732733 Eigen::Matrix3d pol = Eigen::Matrix3d::Zero();
733734 while (input_file) {
734 getline(input_file, line);
735 tools::getline(input_file, line);
735736 boost::trim(line);
736737
737738 std::string::size_type pol_pos =
738739 line.find("Dipole polarizability, Alpha (input orientation)");
739740 if (pol_pos != std::string::npos) {
740741 XTP_LOG(Log::error, *_pLog) << "Getting polarizability" << flush;
741 getline(input_file, line);
742 getline(input_file, line);
743 getline(input_file, line);
744 getline(input_file, line);
745 getline(input_file, line);
742 tools::getline(input_file, line);
743 tools::getline(input_file, line);
744 tools::getline(input_file, line);
745 tools::getline(input_file, line);
746 tools::getline(input_file, line);
746747 for (Index i = 0; i < 6; i++) {
747 getline(input_file, line);
748 tools::getline(input_file, line);
748749 tools::Tokenizer tok2(line, " ");
749750 std::vector<std::string> values = tok2.ToVector();
750751 if (values.size() != 4) {
775776 boost::trim(line);
776777 std::string sum = line;
777778 while (line.size() != 0) {
778 getline(input_file, line);
779 tools::getline(input_file, line);
779780 boost::trim(line);
780781 sum += line;
781782 }
875876
876877 while (input_file) {
877878
878 getline(input_file, line);
879 tools::getline(input_file, line);
879880 boost::trim(line);
880881
881882 /* Check for ScaHFX = factor of HF exchange included in functional */
942943 occupied_levels += Index(energies.size());
943944 energies.clear();
944945 }
945 getline(input_file, line);
946 tools::getline(input_file, line);
946947 eigenvalues_pos = line.find("Alpha");
947948 boost::trim(line);
948949
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2121 #include <boost/filesystem.hpp>
2222 #include <boost/format.hpp>
2323 #include <votca/tools/filesystem.h>
24 #include <votca/tools/getline.h>
2425 #include <votca/xtp/ecpaobasis.h>
2526 #include <votca/xtp/orbitals.h>
2627
417418
418419 // the first 12 lines are garbage info
419420 for (Index i = 0; i < 12; i++) {
420 getline(input_file, line);
421 tools::getline(input_file, line);
421422 }
422423 // next line has basis set size
423424 input_file >> basis_size;
525526 ifstream input_file((_run_dir + "/" + _log_file_name));
526527 bool has_charges = false;
527528 while (input_file) {
528 getline(input_file, line);
529 tools::getline(input_file, line);
529530 boost::trim(line);
530531
531532 std::string::size_type charge_pos = line.find("ESP");
533534 XTP_LOG(Log::error, *_pLog) << "Getting charges" << flush;
534535 has_charges = true;
535536 // two empty lines
536 getline(input_file, line);
537 getline(input_file, line);
537 tools::getline(input_file, line);
538 tools::getline(input_file, line);
538539
539540 // now starts the data in format
540541 // _id type x y z q
575576
576577 Eigen::Matrix3d pol = Eigen::Matrix3d::Zero();
577578 while (input_file) {
578 getline(input_file, line);
579 tools::getline(input_file, line);
579580 boost::trim(line);
580581
581582 std::string::size_type pol_pos =
582583 line.find("DFT Linear Response polarizability / au");
583584 if (pol_pos != std::string::npos) {
584585 XTP_LOG(Log::error, *_pLog) << "Getting polarizability" << flush;
585 getline(input_file, line);
586 tools::getline(input_file, line);
586587 tools::Tokenizer tok(line, " ");
587588 std::vector<std::string> line_split = tok.ToVector();
588589 double frequency = std::stod(line_split[2]);
591592 << "Warning: Polarizability was calculated for frequency "
592593 << frequency << " normally f=0 for static polarizability" << flush;
593594 }
594 getline(input_file, line);
595 getline(input_file, line);
596 getline(input_file, line);
595 tools::getline(input_file, line);
596 tools::getline(input_file, line);
597 tools::getline(input_file, line);
597598 for (Index i = 0; i < 3; i++) {
598 getline(input_file, line);
599 tools::getline(input_file, line);
599600 tools::Tokenizer tok2(line, " ");
600601 std::vector<std::string> values = tok2.ToVector();
601602 if (values.size() != 4) {
654655 } while (ch != '\n' || (Index)input_file.tellg() == -1);
655656
656657 std::string line;
657 getline(input_file, line); // Read the current line
658 tools::getline(input_file, line); // Read the current line
658659 total_energy_pos = line.find("Total DFT energy");
659660 diis_pos = line.find("diis");
660661 // whatever is found first, determines the completeness of the file
704705 // Start parsing the file line by line
705706 ifstream input_file(log_file_name_full);
706707 while (input_file) {
707 getline(input_file, line);
708 tools::getline(input_file, line);
708709 boost::trim(line);
709710 /*
710711 * basis set size (is only required for overlap matrix reading, rest is
742743 //_has_coordinates = true;
743744 bool has_QMAtoms = orbitals.hasQMAtoms();
744745 // three garbage lines
745 getline(input_file, line);
746 getline(input_file, line);
747 getline(input_file, line);
746 tools::getline(input_file, line);
747 tools::getline(input_file, line);
748 tools::getline(input_file, line);
748749 // now starts the data in format
749750 // _id type Qnuc x y z
750751 std::vector<std::string> row = GetLineAndSplit(input_file, "\t ");
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2323 #include <iomanip>
2424 #include <stdio.h>
2525 #include <votca/tools/elements.h>
26 #include <votca/tools/getline.h>
2627 #include <votca/xtp/ecpaobasis.h>
2728 #include <votca/xtp/orbitals.h>
2829
401402
402403 std::ifstream input_file(log_file_name_full);
403404 while (input_file) {
404 getline(input_file, line);
405 tools::getline(input_file, line);
405406 boost::trim(line);
406407 GetCoordinates(result, line, input_file);
407408
409410
410411 if (charge_pos != std::string::npos) {
411412 XTP_LOG(Log::error, *_pLog) << "Getting charges" << flush;
412 getline(input_file, line);
413 tools::getline(input_file, line);
413414 std::vector<std::string> row = GetLineAndSplit(input_file, "\t ");
414415 Index nfields = Index(row.size());
415416 bool hasAtoms = result.size() > 0;
446447
447448 Eigen::Matrix3d pol = Eigen::Matrix3d::Zero();
448449 while (input_file) {
449 getline(input_file, line);
450 tools::getline(input_file, line);
450451 boost::trim(line);
451452
452453 std::string::size_type pol_pos = line.find("THE POLARIZABILITY TENSOR");
453454 if (pol_pos != std::string::npos) {
454455 XTP_LOG(Log::error, *_pLog) << "Getting polarizability" << flush;
455 getline(input_file, line);
456 getline(input_file, line);
457 getline(input_file, line);
456 tools::getline(input_file, line);
457 tools::getline(input_file, line);
458 tools::getline(input_file, line);
458459
459460 if (line.find("The raw cartesian tensor (atomic units)") ==
460461 std::string::npos) {
463464 }
464465
465466 for (Index i = 0; i < 3; i++) {
466 getline(input_file, line);
467 tools::getline(input_file, line);
467468 tools::Tokenizer tok2(line, " ");
468469 std::vector<std::string> values = tok2.ToVector();
469470 if (values.size() != 3) {
522523
523524 QMMolecule& mol = orbitals.QMAtoms();
524525 while (input_file) {
525 getline(input_file, line);
526 tools::getline(input_file, line);
526527 boost::trim(line);
527528
528529 GetCoordinates(mol, line, input_file);
567568 if (OE_pos != std::string::npos) {
568569
569570 number_of_electrons = 0;
570 getline(input_file, line);
571 getline(input_file, line);
572 getline(input_file, line);
571 tools::getline(input_file, line);
572 tools::getline(input_file, line);
573 tools::getline(input_file, line);
573574 if (line.find("E(Eh)") == std::string::npos) {
574575 XTP_LOG(Log::error, *_pLog)
575576 << "Warning: Orbital Energies not found in log file" << flush;
657658 XTP_LOG(Log::error, *_pLog) << "Getting the coordinates" << flush;
658659 bool has_QMAtoms = mol.size() > 0;
659660 // three garbage lines
660 getline(input_file, line);
661 tools::getline(input_file, line);
661662 // now starts the data in format
662663 // _id type Qnuc x y z
663664 vector<string> row = GetLineAndSplit(input_file, "\t ");
694695
695696 std::string line;
696697 while (input_file) {
697 getline(input_file, line);
698 tools::getline(input_file, line);
698699 boost::trim(line);
699700 std::string::size_type error = line.find("FATAL ERROR ENCOUNTERED");
700701 if (error != std::string::npos) {
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2222 #include <stdio.h>
2323 #include <votca/tools/constants.h>
2424 #include <votca/tools/elements.h>
25 #include <votca/tools/getline.h>
2526 #include <votca/xtp/aobasis.h>
2627 #include <votca/xtp/cubefile_writer.h>
2728 #include <votca/xtp/orbitals.h>
9192 std::ofstream out(_output_file);
9293
9394 // first two lines of header are garbage
94 getline(in1, s);
95 tools::getline(in1, s);
9596 out << s << "\n";
96 getline(in1, s);
97 tools::getline(in1, s);
9798 out << s << " substraction\n";
98 getline(in2, s);
99 getline(in2, s);
99 tools::getline(in2, s);
100 tools::getline(in2, s);
100101
101102 // read rest from header
102103 Index natoms;
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
1 * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1616
1717 #define BOOST_TEST_MODULE cubefilewriter_test
1818 #include <boost/test/unit_test.hpp>
19 #include <votca/tools/getline.h>
1920 #include <votca/tools/tokenizer.h>
2021 #include <votca/xtp/cubefile_writer.h>
2122
3031
3132 std::string result = "";
3233 std::string s;
33 getline(in1, s);
34 getline(in1, s);
35 getline(in1, s);
34 votca::tools::getline(in1, s);
35 votca::tools::getline(in1, s);
36 votca::tools::getline(in1, s);
3637 std::vector<double> cube_values;
3738 do {
3839 votca::tools::Tokenizer tok(s, " ");
3940 std::vector<double> values;
4041 tok.ConvertToVector<double>(values);
4142 cube_values.insert(cube_values.end(), values.begin(), values.end());
42 } while (getline(in1, s));
43 } while (votca::tools::getline(in1, s));
4344 return Eigen::Map<Eigen::VectorXd>(cube_values.data(), cube_values.size());
4445 }
4546
66
77 jobs:
88 CI:
9 continue-on-error: ${{ matrix.distro == 'ubuntu_devel' || matrix.distro == 'fedora_rawhide' || matrix.continue-on-error == true }}
9 continue-on-error: ${{ matrix.distro == 'ubuntu:devel' || matrix.distro == 'fedora:rawhide' || matrix.distro == 'opensuse:latest' || matrix.continue-on-error == true }}
1010 strategy:
1111 matrix:
12 distro: [latest, fedora_rawhide, opensuse, ubuntu, ubuntu_devel, ubuntu_rolling, ubuntu_18.04]
12 distro: ['fedora:latest', 'fedora:rawhide', 'opensuse:latest', 'ubuntu:latest', 'ubuntu:devel', 'ubuntu:rolling', 'ubuntu:18.04']
1313 toolchain: [gnu]
1414 cmake_build_type: [Release]
1515 minimal: [false]
1818 coverage: [false]
1919 no_regression_testing: [true]
2020 include:
21 - distro: latest
21 - distro: 'fedora:latest'
2222 toolchain: gnu
2323 cmake_build_type: Release
2424 module_build: true
2525 no_regression_testing: true
2626 runs-on: ubuntu-latest
27 container: votca/buildenv:${{ matrix.distro }}
27 container: ghcr.io/votca/buildenv/${{ matrix.distro }}
2828 steps:
2929 - uses: actions/checkout@v2.2.0
3030 with:
+0
-66
tutorials/.gitlab-ci.yml less more
0 stages:
1 - build
2
3 .build_script:
4 retry:
5 max: 2
6 variables:
7 CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
8 stage: build
9 artifacts:
10 paths:
11 - ${CI_PROJECT_DIR}/votca
12 when: always
13 dependencies: []
14 cache:
15 paths:
16 - ccache/
17 script:
18 - ccache -z
19 - j="$(grep -c processor /proc/cpuinfo 2>/dev/null)" || j=0; ((j++))
20 - git branch commit_of_build_${CI_BUILD_ID} ${CI_COMMIT_SHA}
21 - git clone https://github.com/votca/votca
22 - pushd votca
23 - if [[ ${CI_COMMIT_TAG} = v[12].[0-9]* ]]; then
24 git checkout -b ${CI_COMMIT_TAG} ${CI_COMMIT_TAG};
25 elif [[ ( ${CI_COMMIT_REF_NAME} =~ ^for/([^/]*)/.* || ${CI_COMMIT_REF_NAME} =~ ^(stable)$ ) && ${BASH_REMATCH[1]} != master ]]; then
26 git checkout -b ${BASH_REMATCH[1]} origin/${BASH_REMATCH[1]};
27 fi
28 - git submodule update --recursive --init
29 - git -C ${CI_PROJECT_NAME} fetch ${CI_PROJECT_DIR} commit_of_build_${CI_BUILD_ID}
30 - git -C ${CI_PROJECT_DIR} branch -d commit_of_build_${CI_BUILD_ID}
31 - git -C ${CI_PROJECT_NAME} checkout -f ${CI_COMMIT_SHA}
32 - mkdir -p build
33 - pushd build
34 - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=ON -DBUILD_XTP=ON -DENABLE_WERROR=ON
35 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
36 ${CMAKE_GENERATOR:+-G${CMAKE_GENERATOR}}
37 -DMODULE_BUILD=${MODULE_BUILD} ${MODULE_BUILD:+-DCMAKE_INSTALL_PREFIX=/home/votca/votca.install}
38 -DCMAKE_DISABLE_FIND_PACKAGE_MKL=${DISABLE_MKL}
39 -DUSE_CUDA=${USE_CUDA}
40 - cmake --build . --parallel 2
41 - ctest --output-on-failure
42 - test -z "${MODULE_BUILD}" && DESTDIR=${PWD}/install cmake --install . && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install
43 - sudo cmake --install .
44 - if [[ ${CLANG_FORMAT} ]]; then cmake --build . --target format && git -C ${CI_PROJECT_DIR}/votca/${CI_PROJECT_NAME} diff --exit-code; fi
45 - ccache -s
46
47 .build:
48 variables:
49 DISTRO: "latest"
50 image: votca/buildenv:${DISTRO}
51 extends: .build_script
52
53 Debug GPU Ubuntu:
54 variables:
55 CC: "gcc"
56 CXX: "g++"
57 CMAKE_BUILD_TYPE: "Debug"
58 USE_CUDA: "yes"
59 DISABLE_MKL: "yes"
60 before_script:
61 - source /opt/gromacs-2019/bin/GMXRC.bash
62 extends: .build_script
63 allow_failure: true
64 tags:
65 - gpu
11
22 project(xtp-tutorials)
33
4 set(PROJECT_VERSION "1.6.2")
4 set(PROJECT_VERSION "1.6.3")
55
66 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
77 include(GNUInstallDirs)