Skip to content

Commit

Permalink
Merge branch 'development' of github.com:astro-informatics/purify int…
Browse files Browse the repository at this point in the history
…o development
  • Loading branch information
Michael McLeod committed Nov 21, 2024
2 parents 9f0923b + ce03559 commit 24a812c
Show file tree
Hide file tree
Showing 48 changed files with 114 additions and 204 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Install Dependencies on MacOS
if: ${{ contains(matrix.os, 'macos') }}
run: |
brew install open-mpi libomp yaml-cpp eigen cfitsio ccache
brew install open-mpi libomp yaml-cpp eigen cfitsio ccache onnxruntime
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH
Expand Down Expand Up @@ -136,14 +136,14 @@ jobs:
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
mkdir -p ${{github.workspace}}/sopt/build
cd ${{github.workspace}}/sopt/build
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} -Dtests=OFF -Dexamples=OFF
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Donnxrt=ON -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} -Dtests=OFF -Dexamples=OFF
make -j$(nproc --ignore 1) install
- name: Pack dependencies
run: |
cd ${{github.workspace}}
tar cfv dependencies.tar local
- uses: actions/upload-artifact@v4
with:
name: dependencies-${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
- name: Install Dependencies on MacOS
if: ${{ contains(matrix.os, 'macos') }}
run: |
brew install open-mpi libomp eigen ccache cfitsio boost yaml-cpp
brew install open-mpi libomp eigen ccache cfitsio boost yaml-cpp onnxruntime
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH
Expand All @@ -216,7 +216,7 @@ jobs:
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
mkdir -p ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddocasa=OFF -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} -Dtests=ON
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Donnxrt=ON -Ddocasa=OFF -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} -Dtests=ON
make -j$(nproc --ignore 1) install
- name: Test
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
- name: Install Dependencies on MacOS
if: ${{ contains(matrix.os, 'macos') }}
run: |
brew install gcc libtiff eigen libyaml ccache cfitsio boost yaml-cpp
brew install gcc libtiff eigen libyaml ccache cfitsio boost yaml-cpp onnxruntime
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH
Expand All @@ -276,7 +276,7 @@ jobs:
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
mkdir -p ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Donnxrt=ON -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON
make -j$(nproc --ignore 1) install
- name: Deploy to GH pages
Expand Down
5 changes: 1 addition & 4 deletions cmake_files/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ find_package(Boost COMPONENTS system filesystem REQUIRED)

find_package(yaml-cpp REQUIRED)

if (onnxrt)
find_package(onnxruntime REQUIRED)
endif()

find_package(sopt REQUIRED)
set(PURIFY_ONNXRT FALSE)
if (onnxrt)
Expand All @@ -38,6 +34,7 @@ if (onnxrt)
else()
message(FATAL_ERROR "SOPT built without ONNXrt support")
endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/models DESTINATION .)
endif()

find_package(Cubature QUIET)
Expand Down
1 change: 0 additions & 1 deletion cpp/benchmarks/measurement_operator_mpi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <sopt/wavelets.h>

using namespace purify;
using namespace purify::notinstalled;

// ----------------- Degrid operator constructor fixture -----------------------//

Expand Down
1 change: 0 additions & 1 deletion cpp/benchmarks/measurement_operator_wproj.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <sopt/wavelets.h>

using namespace purify;
using namespace purify::notinstalled;

// ----------------- Degrid operator constructor fixture -----------------------//

Expand Down
1 change: 0 additions & 1 deletion cpp/benchmarks/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <sopt/linear_transform.h>

using namespace purify;
using namespace purify::notinstalled;

namespace b_utilities {

Expand Down
2 changes: 1 addition & 1 deletion cpp/example/casa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
int main(int, char **) {
purify::logging::set_level(purify::default_logging_level());
// Loads a measurement set
auto const ngc3256_filename = purify::notinstalled::ngc3256_ms();
auto const ngc3256_filename = purify::ngc3256_ms();
auto const ngc3256 = purify::casa::MeasurementSet(ngc3256_filename);

try {
Expand Down
1 change: 0 additions & 1 deletion cpp/example/compare_wprojection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <sopt/power_method.h>

using namespace purify;
using namespace purify::notinstalled;

int main(int nargs, char const **args) {
#define ARGS_MACRO(NAME, ARGN, VALUE, TYPE) \
Expand Down
1 change: 0 additions & 1 deletion cpp/example/generate_vis_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

int main(int nargs, char const **args) {
using namespace purify;
using namespace purify::notinstalled;
purify::logging::set_level(purify::default_logging_level());

const std::string &pos_filename = mwa_filename("Phase1_config.txt");
Expand Down
1 change: 0 additions & 1 deletion cpp/example/histogram_equalisation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "purify/directories.h"
#include "purify/pfitsio.h"
using namespace purify;
using namespace purify::notinstalled;

int main(int nargs, char const **args) {
// up samples M31 example
Expand Down
1 change: 0 additions & 1 deletion cpp/example/image_wproj_chirp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <sopt/power_method.h>

using namespace purify;
using namespace purify::notinstalled;

int main(int nargs, char const **args) {
#define ARGS_MACRO(NAME, ARGN, VALUE, TYPE) \
Expand Down
1 change: 0 additions & 1 deletion cpp/example/mem_w_algos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "purify/utilities.h"

using namespace purify;
using namespace purify::notinstalled;

int main(int nargs, char const **args) {
auto const session = sopt::mpi::init(nargs, args);
Expand Down
1 change: 0 additions & 1 deletion cpp/example/padmm_mpi_random_coverage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#endif

using namespace purify;
using namespace purify::notinstalled;

std::tuple<utilities::vis_params, t_real> dirty_visibilities(
Image<t_complex> const &ground_truth_image, t_uint number_of_vis, t_real snr,
Expand Down
1 change: 0 additions & 1 deletion cpp/example/padmm_mpi_real_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#endif

using namespace purify;
using namespace purify::notinstalled;

utilities::vis_params dirty_visibilities(const std::vector<std::string> &names) {
return utilities::read_visibility(names, true);
Expand Down
9 changes: 0 additions & 9 deletions cpp/example/padmm_random_coverage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "purify/pfitsio.h"
#include "purify/utilities.h"
using namespace purify;
using namespace purify::notinstalled;

void padmm(const std::string &name, const Image<t_complex> &M31, const std::string &kernel,
const t_int J, const utilities::vis_params &uv_data, const t_real sigma,
Expand Down Expand Up @@ -182,13 +181,5 @@ int main(int, char **) {
// adding noise to visibilities
uv_data.vis = utilities::add_noise(y0, 0., sigma);
padmm(name + "30", M31, kernel, 4, uv_data, sigma, std::make_tuple(w_term, cellsize));
/*
const std::string &test_dir = "expected/padmm_serial/";
const std::string &input_data_path = notinstalled::data_filename(test_dir + "input_data.vis");
auto uv_data = utilities::read_visibility(input_data_path, false);
uv_data.units = utilities::vis_units::radians;
t_real const sigma = 0.02378738741225;
padmm(name + "10", M31, kernel, 4, uv_data, sigma, std::make_tuple(w_term, cellsize));
*/
return 0;
}
1 change: 0 additions & 1 deletion cpp/example/padmm_real_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "purify/uvfits.h"
#include "purify/wproj_utilities.h"
using namespace purify;
using namespace purify::notinstalled;

void padmm(const std::string &name, const t_uint &imsizex, const t_uint &imsizey,
const std::string &kernel, const t_int J, const utilities::vis_params &uv_data,
Expand Down
1 change: 0 additions & 1 deletion cpp/example/padmm_reweighted_simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ int main(int nargs, char const **args) {
}

using namespace purify;
using namespace purify::notinstalled;
sopt::logging::set_level("debug");

std::string const kernel = args[1];
Expand Down
1 change: 0 additions & 1 deletion cpp/example/padmm_simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ int main(int nargs, char const **args) {
}

using namespace purify;
using namespace purify::notinstalled;
sopt::logging::set_level("debug");
purify::logging::set_level("debug");

Expand Down
1 change: 0 additions & 1 deletion cpp/example/plot_wkernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "purify/wkernel_integration.h"

using namespace purify;
using namespace purify::notinstalled;

using namespace purify;

Expand Down
1 change: 0 additions & 1 deletion cpp/example/sara_padmm_random_coverage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

int main(int, char **) {
using namespace purify;
using namespace purify::notinstalled;
sopt::logging::set_level("info");

std::string const fitsfile = image_filename("M31.fits");
Expand Down
1 change: 0 additions & 1 deletion cpp/example/sdmm_m31_simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

int main(int nargs, char const **args) {
using namespace purify;
using namespace purify::notinstalled;

if (nargs != 6) {
PURIFY_CRITICAL(" Wrong number of arguments!");
Expand Down
1 change: 0 additions & 1 deletion cpp/example/show_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "purify/directories.h"
#include "purify/pfitsio.h"
using namespace purify;
using namespace purify::notinstalled;

int main(int nargs, char const **args) {
// up samples M31 example
Expand Down
1 change: 0 additions & 1 deletion cpp/example/time_w_algos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "purify/utilities.h"

using namespace purify;
using namespace purify::notinstalled;

int main(int nargs, char const **args) {
auto const session = sopt::mpi::init(nargs, args);
Expand Down
1 change: 0 additions & 1 deletion cpp/example/wavelet_decomposition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "purify/wavelet_operator_factory.h"

using namespace purify;
using namespace purify::notinstalled;

int main(int nargs, char const **args) {
purify::logging::set_level("debug");
Expand Down
4 changes: 2 additions & 2 deletions cpp/purify/config.in.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
//! Whether PURIFY is using (and SOPT was built with) onnxrt support
#cmakedefine PURIFY_ONNXRT

#include <cstdint>
#include <string>
#include <tuple>
#include <cstdint>

namespace purify {
//! Returns library version
Expand All @@ -46,6 +46,6 @@ inline std::tuple<uint8_t, uint8_t, uint8_t> version_tuple() {
inline std::string gitref() { return "@Purify_GITREF@"; }
//! Default logging level
inline std::string default_logging_level() { return "@PURIFY_TEST_LOG_LEVEL@"; }
} // namespace purify
} // namespace purify

#endif
Loading

0 comments on commit 24a812c

Please sign in to comment.