diff --git a/include/quo-vadis.h b/include/quo-vadis.h index debc5d1..e2c551f 100644 --- a/include/quo-vadis.h +++ b/include/quo-vadis.h @@ -186,7 +186,7 @@ qv_scope_group_rank( * */ int -qv_scope_ntasks( +qv_scope_group_size( qv_scope_t *scope, int *ntasks ); diff --git a/src/fortran/quo-vadisf.f90 b/src/fortran/quo-vadisf.f90 index bf73e47..3df0849 100644 --- a/src/fortran/quo-vadisf.f90 +++ b/src/fortran/quo-vadisf.f90 @@ -197,13 +197,13 @@ function qv_scope_group_rank_c(scope, taskid) & end function qv_scope_group_rank_c integer(c_int) & - function qv_scope_ntasks_c(scope, ntasks) & - bind(c, name='qv_scope_ntasks') + function qv_scope_group_size_c(scope, ntasks) & + bind(c, name='qv_scope_group_size') use, intrinsic :: iso_c_binding, only: c_ptr, c_int implicit none type(c_ptr), value :: scope integer(c_int), intent(out) :: ntasks - end function qv_scope_ntasks_c + end function qv_scope_group_size_c integer(c_int) & function qv_scope_barrier_c(scope) & @@ -350,14 +350,14 @@ subroutine qv_scope_group_rank(scope, taskid, info) info = qv_scope_group_rank_c(scope, taskid) end subroutine qv_scope_group_rank - subroutine qv_scope_ntasks(scope, ntasks, info) + subroutine qv_scope_group_size(scope, ntasks, info) use, intrinsic :: iso_c_binding, only: c_ptr, c_int implicit none type(c_ptr), value :: scope integer(c_int), intent(out) :: ntasks integer(c_int), intent(out) :: info - info = qv_scope_ntasks_c(scope, ntasks) - end subroutine qv_scope_ntasks + info = qv_scope_group_size_c(scope, ntasks) + end subroutine qv_scope_group_size subroutine qv_scope_barrier(scope, info) use, intrinsic :: iso_c_binding, only: c_ptr, c_int diff --git a/src/quo-vadis.cc b/src/quo-vadis.cc index 470237d..4a3ac5d 100644 --- a/src/quo-vadis.cc +++ b/src/quo-vadis.cc @@ -121,7 +121,7 @@ qv_scope_group_rank( // TODO(skg) Rename to qv_scope_group_size. int -qv_scope_ntasks( +qv_scope_group_size( qv_scope_t *scope, int *ntasks ) { diff --git a/tests/qvi-test-common.h b/tests/qvi-test-common.h index 8a76bb2..6d01283 100644 --- a/tests/qvi-test-common.h +++ b/tests/qvi-test-common.h @@ -82,18 +82,18 @@ qvi_test_scope_report( qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } - int ntasks; - rc = qv_scope_ntasks(scope, &ntasks); + int sgsize; + rc = qv_scope_group_size(scope, &sgsize); if (rc != QV_SUCCESS) { - ers = "qv_scope_ntasks() failed"; + ers = "qv_scope_group_size() failed"; qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } printf( "[%d] %s sgrank is %d\n" - "[%d] %s ntasks is %d\n", + "[%d] %s sgsize is %d\n", pid, scope_name, sgrank, - pid, scope_name, ntasks + pid, scope_name, sgsize ); rc = qv_scope_barrier(scope); diff --git a/tests/test-mpi-fortapi.f90 b/tests/test-mpi-fortapi.f90 index 2aa5a95..fd41ea0 100644 --- a/tests/test-mpi-fortapi.f90 +++ b/tests/test-mpi-fortapi.f90 @@ -19,7 +19,7 @@ program mpi_fortapi integer(c_int) info, n - integer(c_int) ntasks, sgrank, n_cores, n_gpu + integer(c_int) sgsize, sgrank, n_cores, n_gpu integer(c_int) vmajor, vminor, vpatch integer cwrank, cwsize, scope_comm, scope_comm_size type(c_ptr) scope_user, sub_scope @@ -76,11 +76,11 @@ program mpi_fortapi error stop end if - call qv_scope_ntasks(scope_user, ntasks, info) + call qv_scope_group_size(scope_user, sgsize, info) if (info .ne. QV_SUCCESS) then error stop end if - print *, 'ntasks', ntasks + print *, 'sgsize', sgsize call qv_scope_group_rank(scope_user, sgrank, info) if (info .ne. QV_SUCCESS) then diff --git a/tests/test-mpi-scopes-affinity-preserving.c b/tests/test-mpi-scopes-affinity-preserving.c index 8cf4f37..7cbb68b 100644 --- a/tests/test-mpi-scopes-affinity-preserving.c +++ b/tests/test-mpi-scopes-affinity-preserving.c @@ -61,13 +61,13 @@ main( qvi_test_scope_report(base_scope, "base_scope"); - int base_scope_ntasks; - rc = qv_scope_ntasks( + int base_scope_sgsize; + rc = qv_scope_group_size( base_scope, - &base_scope_ntasks + &base_scope_sgsize ); if (rc != QV_SUCCESS) { - ers = "qv_scope_ntasks() failed"; + ers = "qv_scope_group_size() failed"; qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } diff --git a/tests/test-mpi-scopes.c b/tests/test-mpi-scopes.c index 6cff956..0f13698 100644 --- a/tests/test-mpi-scopes.c +++ b/tests/test-mpi-scopes.c @@ -90,13 +90,13 @@ main( } qvi_test_scope_report(base_scope, "base_scope"); - int base_scope_ntasks; - rc = qv_scope_ntasks( + int base_scope_sgsize; + rc = qv_scope_group_size( base_scope, - &base_scope_ntasks + &base_scope_sgsize ); if (rc != QV_SUCCESS) { - ers = "qv_scope_ntasks() failed"; + ers = "qv_scope_group_size() failed"; qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } @@ -125,7 +125,7 @@ main( const int npieces = 2; const int gid = get_group_id( base_scope_rank, - base_scope_ntasks, + base_scope_sgsize, npieces ); printf("[%d] base GID is %d\n", wrank, gid); diff --git a/tests/test-mpi-threads.c b/tests/test-mpi-threads.c index fa23f54..2d15d66 100644 --- a/tests/test-mpi-threads.c +++ b/tests/test-mpi-threads.c @@ -48,15 +48,15 @@ scope_report( qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } - int ntasks; - rc = qv_scope_ntasks(scope, &ntasks); + int sgsize; + rc = qv_scope_group_size(scope, &sgsize); if (rc != QV_SUCCESS) { - ers = "qv_scope_ntasks() failed"; + ers = "qv_scope_group_size() failed"; qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } printf("[%d] %s taskid is %d\n", pid, scope_name, taskid); - printf("[%d] %s ntasks is %d\n", pid, scope_name, ntasks); + printf("[%d] %s sgsize is %d\n", pid, scope_name, sgsize); rc = qv_scope_barrier(scope); if (rc != QV_SUCCESS) { diff --git a/tests/test-omp.c b/tests/test-omp.c index 52824cf..4fb0513 100644 --- a/tests/test-omp.c +++ b/tests/test-omp.c @@ -42,9 +42,9 @@ scopei_fill( ) { char *ers = NULL; - int rc = qv_scope_ntasks(sinfo->scope, &sinfo->size); + int rc = qv_scope_group_size(sinfo->scope, &sinfo->size); if (rc != QV_SUCCESS) { - ers = "qv_scope_ntasks() failed"; + ers = "qv_scope_group_size() failed"; qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } diff --git a/tests/test-process-fortapi.f90 b/tests/test-process-fortapi.f90 index 9439139..331407e 100644 --- a/tests/test-process-fortapi.f90 +++ b/tests/test-process-fortapi.f90 @@ -18,7 +18,7 @@ program process_fortapi integer(c_int) info, n - integer(c_int) ntasks, sgrank, n_cores, n_gpu + integer(c_int) sgsize, sgrank, n_cores, n_gpu type(c_ptr) scope_user character(len=:),allocatable :: bstr(:) character(len=:),allocatable :: dev_pci(:) @@ -29,11 +29,11 @@ program process_fortapi error stop end if - call qv_scope_ntasks(scope_user, ntasks, info) + call qv_scope_group_size(scope_user, sgsize, info) if (info .ne. QV_SUCCESS) then error stop end if - print *, 'ntasks', ntasks + print *, 'sgsize', sgsize call qv_scope_group_rank(scope_user, sgrank, info) if (info .ne. QV_SUCCESS) then diff --git a/tests/test-process-scopes.c b/tests/test-process-scopes.c index c1be4e5..4c162b7 100644 --- a/tests/test-process-scopes.c +++ b/tests/test-process-scopes.c @@ -64,13 +64,13 @@ main(void) qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } - int ntasks; - rc = qv_scope_ntasks(base_scope, &ntasks); + int sgsize; + rc = qv_scope_group_size(base_scope, &sgsize); if (rc != QV_SUCCESS) { - ers = "qv_scope_ntasks() failed"; + ers = "qv_scope_group_size() failed"; qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); } - if (ntasks != 1) { + if (sgsize != 1) { ers = "Invalid number of tasks detected"; qvi_test_panic("%s (rc=%s)", ers, qv_strerr(rc)); }