Skip to content

Commit

Permalink
Merge pull request #280 from devreal/fix_potrf_allocator_init
Browse files Browse the repository at this point in the history
Pass argc/argv to allocator_init
  • Loading branch information
evaleev authored Jun 3, 2024
2 parents 8a00cff + 7a56f2e commit d083245
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/matrixtile.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#if defined(TILEDARRAY_HAS_DEVICE)
#define ALLOCATOR TiledArray::device_pinned_allocator<T>

inline void allocator_init() {
inline void allocator_init(int argc, char **argv) {
// initialize MADNESS so that TA allocators can be created
#if defined(TTG_PARSEC_IMPORTED)
madness::ParsecRuntime::initialize_with_existing_context(ttg::default_execution_context().impl().context());
Expand All @@ -28,7 +28,7 @@ inline void allocator_fini() {
#else // TILEDARRAY_HAS_DEVICE
#define ALLOCATOR std::allocator<T>

inline void allocator_init() { }
inline void allocator_init(int argc, char **argv) { }

inline void allocator_fini() { }

Expand Down
2 changes: 1 addition & 1 deletion examples/potrf/testing_dlauum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main(int argc, char **argv)
ttg::initialize(argc, argv, nthreads);

/* set up TA to get the allocator */
allocator_init();
allocator_init(argc, argv);

auto world = ttg::default_execution_context();

Expand Down
2 changes: 1 addition & 1 deletion examples/potrf/testing_dpoinv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int main(int argc, char **argv)
delete[] ttg_argv;

/* set up TA to get the allocator */
allocator_init();
allocator_init(argc, argv);

ttg::trace_on();

Expand Down
2 changes: 1 addition & 1 deletion examples/potrf/testing_dpotrf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main(int argc, char **argv)
ttg::initialize(1, argv, nthreads);

/* set up TA to get the allocator */
allocator_init();
allocator_init(argc, argv);

auto world = ttg::default_execution_context();
if(nullptr != prof_filename) {
Expand Down
2 changes: 1 addition & 1 deletion examples/potrf/testing_dtrtri.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int main(int argc, char **argv)
ttg::initialize(argc, argv, nthreads);

/* set up TA to get the allocator */
allocator_init();
allocator_init(argc, argv);

auto world = ttg::default_execution_context();

Expand Down

0 comments on commit d083245

Please sign in to comment.