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

Fix GitHub CI failing on broken develop #1461

Merged
merged 5 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion example/graph/KokkosKernels_Example_Distance2GraphColor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,9 @@ int main(int argc, char* argv[]) {
params.use_openmp; // Assumption is that use_openmp variable is provided
// as number of threads
const int device_id = 0;
Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

// Print out information about the configuration of the run if verbose_level
// >= 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ int main(int argc, char* argv[]) {
params.use_openmp; // Assumption is that use_openmp variable is provided
// as number of threads

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

if (params.verbose) {
Kokkos::print_configuration(std::cout);
Expand Down
4 changes: 3 additions & 1 deletion perf_test/blas/blas1/KokkosBlas_dot_mv_perf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ int main(int argc, char** argv) {

const int num_threads = std::max(params.use_openmp, params.use_threads);

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

bool useThreads = params.use_threads != 0;
bool useOMP = params.use_openmp != 0;
Expand Down
4 changes: 3 additions & 1 deletion perf_test/blas/blas1/KokkosBlas_dot_perf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ int main(int argc, char** argv) {

const int num_threads = std::max(params.use_openmp, params.use_threads);

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

bool useThreads = params.use_threads != 0;
bool useOMP = params.use_openmp != 0;
Expand Down
4 changes: 3 additions & 1 deletion perf_test/blas/blas1/KokkosBlas_team_dot_perf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ int main(int argc, char** argv) {

const int num_threads = std::max(params.use_openmp, params.use_threads);

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

bool useThreads = params.use_threads != 0;
bool useOMP = params.use_openmp != 0;
Expand Down
4 changes: 3 additions & 1 deletion perf_test/blas/blas2/KokkosBlas2_gemv_perf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ int main(int argc, char** argv) {
const int num_threads = std::max(params.use_openmp, params.use_threads);

const int device_id = std::max(params.use_cuda, params.use_hip) - 1;
Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

// Create booleans to handle pthreads, openmp and cuda params and initialize
// to true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ int main(int argc, char** argv) {
// as number of threads
const int device_id = params.use_cuda - 1;

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

bool useOMP = params.use_openmp != 0;
bool useCUDA = params.use_cuda != 0;
Expand Down
4 changes: 3 additions & 1 deletion perf_test/graph/KokkosGraph_color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ int main(int argc, char **argv) {
params.use_openmp; // Assumption is that use_openmp variable is provided
// as number of threads
const int device_id = std::max(params.use_cuda, params.use_hip) - 1;
Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));
Kokkos::print_configuration(std::cout);

#if defined(KOKKOS_ENABLE_OPENMP)
Expand Down
4 changes: 3 additions & 1 deletion perf_test/graph/KokkosGraph_color_d2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,9 @@ int main(int argc, char* argv[]) {
device_id = params.use_cuda - 1;
else if (params.use_hip)
device_id = params.use_hip - 1;
Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

// Print out verbose information about the configuration of the run.
// Kokkos::print_configuration(std::cout);
Expand Down
4 changes: 3 additions & 1 deletion perf_test/graph/KokkosGraph_triangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ int main(int argc, char **argv) {
params.use_openmp; // Assumption is that use_openmp variable is provided
// as number of threads
const int device_id = 0;
Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));

#if defined(KOKKOS_ENABLE_OPENMP)

Expand Down
8 changes: 5 additions & 3 deletions perf_test/sparse/KokkosSparse_block_pcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,17 +381,19 @@ int main(int argc, char **argv) {
int cmdline[CMD_COUNT];
char *mtx_bin_file = NULL;
int block_size = 5;
struct Kokkos::InitArguments kargs;
struct Kokkos::InitializationSettings kargs;

for (int i = 0; i < CMD_COUNT; ++i) cmdline[i] = 0;

for (int i = 1; i < argc; ++i) {
if (0 == Test::string_compare_no_case(argv[i], "--serial")) {
cmdline[CMD_USE_SERIAL] = 1;
} else if (0 == Test::string_compare_no_case(argv[i], "--threads")) {
kargs.num_threads = cmdline[CMD_USE_THREADS] = atoi(argv[++i]);
cmdline[CMD_USE_THREADS] = atoi(argv[++i]);
kargs.set_num_threads(cmdline[CMD_USE_THREADS]);
} else if (0 == Test::string_compare_no_case(argv[i], "--openmp")) {
kargs.num_threads = cmdline[CMD_USE_OPENMP] = atoi(argv[++i]);
cmdline[CMD_USE_OPENMP] = atoi(argv[++i]);
kargs.set_num_threads(cmdline[CMD_USE_OPENMP]);
} else if (0 == Test::string_compare_no_case(argv[i], "--cuda")) {
cmdline[CMD_USE_CUDA] = 1;
} else if (0 == Test::string_compare_no_case(argv[i], "--mtx")) {
Expand Down
17 changes: 8 additions & 9 deletions perf_test/sparse/KokkosSparse_pcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,17 +370,16 @@ int main(int argc, char **argv) {
return 0;
}

Kokkos::InitArguments init_args; // Construct with default args, change
// members based on exec space
// Construct with default args, change members based on exec space
Kokkos::InitializationSettings init_args;

init_args.device_id = cmdline[CMD_DEVICE];
init_args.set_device_id(cmdline[CMD_DEVICE]);
init_args.set_num_threads(
std::max(cmdline[CMD_USE_THREADS], cmdline[CMD_USE_OPENMP]));
if (cmdline[CMD_USE_NUMA] && cmdline[CMD_USE_CORE_PER_NUMA]) {
init_args.num_threads =
std::max(cmdline[CMD_USE_THREADS], cmdline[CMD_USE_OPENMP]);
init_args.num_numa = cmdline[CMD_USE_NUMA];
} else {
init_args.num_threads =
std::max(cmdline[CMD_USE_THREADS], cmdline[CMD_USE_OPENMP]);
KokkosKernels::Impl::throw_runtime_exception(
"NUMA init arg is no longer supported by Kokkos");
// init_args.num_numa = cmdline[CMD_USE_NUMA];
}

Kokkos::initialize(init_args);
Expand Down
4 changes: 3 additions & 1 deletion perf_test/sparse/KokkosSparse_spadd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ int main(int argc, char** argv) {
// as number of threads
const int device_id = params.use_cuda - 1;

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));
// Kokkos::print_configuration(std::cout);

// First, make sure that requested TPL (if any) is actually available
Expand Down
4 changes: 3 additions & 1 deletion perf_test/sparse/KokkosSparse_spgemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ int main(int argc, char** argv) {
const int device_id =
params.use_cuda ? params.use_cuda - 1 : params.use_hip - 1;

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));
Kokkos::print_configuration(std::cout);

#if defined(KOKKOS_ENABLE_OPENMP)
Expand Down
4 changes: 3 additions & 1 deletion perf_test/sparse/KokkosSparse_spgemm_jacobi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ int main(int argc, char** argv) {
const int num_threads = std::max(params.use_openmp, params.use_threads);
const int device_id = params.use_cuda - 1;

Kokkos::initialize(Kokkos::InitArguments(num_threads, -1, device_id));
Kokkos::initialize(Kokkos::InitializationSettings()
.set_num_threads(num_threads)
.set_device_id(device_id));
Kokkos::print_configuration(std::cout);

#if defined(KOKKOS_ENABLE_OPENMP)
Expand Down