Skip to content

Commit

Permalink
Pass argc/argv to allocator_init
Browse files Browse the repository at this point in the history
They are needed to initialize madness and thus the TA allocators.

Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Apr 4, 2024
1 parent ae62f5b commit 1882e38
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 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 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 1882e38

Please sign in to comment.