Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable OpenMP for MacOS Builds #455

Merged
merged 12 commits into from
Nov 16, 2021
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ jobs:
cd ~/SmartPeak
export PYTHONPATH="${PWD}/tools"
python3 -m unittest discover -s ./tools/smartpeak
- run:
name: Running SmartPeak Examples
command: |
~/SmartPeak/.circleci/run_examples.sh ~/SmartPeak/smartpeak_release_build/bin
- run:
name: Packing SmartPeak
command: |
Expand Down
1 change: 1 addition & 0 deletions src/tests/class_tests/smartpeak/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ project("SmartPeak_class_tests_smartpeak")
#------------------------------------------------------------------------------
# Configure test file to get the TEST_DATA_PATH into the tests
set(CF_SMARTPEAK_TEST_DATA_PATH "${PROJECT_SOURCE_DIR}/data/")
set(CF_SMARTPEAK_EXAMPLES_DATA_PATH "${PROJECT_SOURCE_DIR}/../../../examples/data/")
set (CONFIGURED_TEST_CONFIG_H "${PROJECT_BINARY_DIR}/include/SmartPeak/test_config.h")
configure_file(${PROJECT_SOURCE_DIR}/include/SmartPeak/test_config.h.in ${CONFIGURED_TEST_CONFIG_H})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
// Macro to construct a c string containing the complete path to the test data
#define SMARTPEAK_GET_TEST_DATA_PATH(filename) (std::string("@CF_SMARTPEAK_TEST_DATA_PATH@") + filename).c_str()
#define SMARTPEAK_GET_TEST_DATA_PATH_MESSAGE(prefix,filename,suffix) (prefix + std::string("@CF_SMARTPEAK_TEST_DATA_PATH@") + filename + suffix).c_str()
#define SMARTPEAK_GET_EXAMPLES_DATA_PATH(filename) (std::string("@CF_SMARTPEAK_EXAMPLES_DATA_PATH@") + filename).c_str()
#define SMARTPEAK_GET_EXAMPLES_DATA_PATH_MESSAGE(prefix,filename,suffix) (prefix + std::string("@CF_SMARTPEAK_EXAMPLES_DATA_PATH@") + filename + suffix).c_str()

#endif // SMARTPEAK_TEST_CONFIG_H
29 changes: 29 additions & 0 deletions src/tests/class_tests/smartpeak/source/Task_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,33 @@ TEST(Task, Task_options_change_output_dirs)
auto er = cli::ExportReport{};
EXPECT_TRUE(er(am));
EXPECT_TRUE(std::filesystem::exists(report_output_dir / "FeatureDB.csv"));
}

TEST(Task, Task_run_LCMS_MRM_QCs_example_20_threads)
{
namespace cli = SmartPeak::cli;
std::filesystem::path seq_path = SMARTPEAK_GET_EXAMPLES_DATA_PATH("LCMS_MRM_QCs");
std::string seq = std::string{ seq_path.lexically_normal().generic_string() };
std::vector<std::string> args = std::vector<std::string>{
"Task_test",
"--load-session", seq,
"--verbose",
"--allow-inconsistent",
"--log-dir", ".",
"--disable-colors",
"-no-pg",
"--parameter", "SequenceProcessor:n_thread=20"
};
auto pa = cli::Parser{ args };
auto as = cli::ApplicationSettings{ pa };
auto am = cli::ApplicationManager{ as };
am
.add(std::make_shared<cli::InitializeApplicationSettings>())
.add(std::make_shared<cli::LoadSession>())
.add(std::make_shared<cli::InitializeWorkflowResources>())
.add(std::make_shared<cli::InitializeWorkflowSettings>())
.add(std::make_shared<cli::RunIntegrityChecks>())
.add(std::make_shared<cli::RunWorkflow>())
.add(std::make_shared<cli::ExportReport>());
am.run();
}