diff --git a/Source/C/ProcessGrid_c.h b/Source/C/ProcessGrid_c.h index f9889411..3aa6ef14 100644 --- a/Source/C/ProcessGrid_c.h +++ b/Source/C/ProcessGrid_c.h @@ -4,13 +4,10 @@ void ConstructGlobalProcessGrid_wrp(const int *world_comm, const int *process_rows, const int *process_columns, - const int *process_slices, - const bool *be_verbose); + const int *process_slices); void ConstructGlobalProcessGrid_onlyslice_wrp(const int *world_comm, - const int *process_slices, - const bool *be_verbose); -void ConstructGlobalProcessGrid_default_wrp(const int *world_comm, - const bool *be_verbose); + const int *process_slices); +void ConstructGlobalProcessGrid_default_wrp(const int *world_comm); void CopyProcessGrid_wrp(const int *ih_old_grid, int *ih_new_grid); int GetGlobalMySlice_wrp(); int GetGlobalMyColumn_wrp(); diff --git a/Source/CPlusPlus/ProcessGrid.cc b/Source/CPlusPlus/ProcessGrid.cc index 6812432c..9ebbdeda 100644 --- a/Source/CPlusPlus/ProcessGrid.cc +++ b/Source/CPlusPlus/ProcessGrid.cc @@ -73,40 +73,36 @@ ProcessGrid::~ProcessGrid() { DestructProcessGrid_wrp(ih_this); } //////////////////////////////////////////////////////////////////////////////// void ConstructGlobalProcessGrid(MPI_Comm world_comm, int process_rows, - int process_columns, int process_slices, - bool be_verbose) { + int process_columns, int process_slices) { MPI_Fint temp_comm = MPI_Comm_c2f(world_comm); ConstructGlobalProcessGrid_wrp(&temp_comm, &process_rows, &process_columns, - &process_slices, &be_verbose); + &process_slices); } //////////////////////////////////////////////////////////////////////////////// void ConstructGlobalProcessGrid(int process_rows, int process_columns, - int process_slices, bool be_verbose) { + int process_slices) { MPI_Fint temp_comm = MPI_Comm_c2f(MPI_COMM_WORLD); ConstructGlobalProcessGrid_wrp(&temp_comm, &process_rows, &process_columns, - &process_slices, &be_verbose); + &process_slices); } //////////////////////////////////////////////////////////////////////////////// -void ConstructGlobalProcessGrid(MPI_Comm world_comm, int process_slices, - bool be_verbose) { +void ConstructGlobalProcessGrid(MPI_Comm world_comm, int process_slices) { MPI_Fint temp_comm = MPI_Comm_c2f(world_comm); - ConstructGlobalProcessGrid_onlyslice_wrp(&temp_comm, &process_slices, - &be_verbose); + ConstructGlobalProcessGrid_onlyslice_wrp(&temp_comm, &process_slices); } //////////////////////////////////////////////////////////////////////////////// -void ConstructGlobalProcessGrid(int process_slices, bool be_verbose) { +void ConstructGlobalProcessGrid(int process_slices) { MPI_Fint temp_comm = MPI_Comm_c2f(MPI_COMM_WORLD); - ConstructGlobalProcessGrid_onlyslice_wrp(&temp_comm, &process_slices, - &be_verbose); + ConstructGlobalProcessGrid_onlyslice_wrp(&temp_comm, &process_slices); } //////////////////////////////////////////////////////////////////////////////// -void ConstructGlobalProcessGrid(bool be_verbose) { +void ConstructGlobalProcessGrid() { MPI_Fint temp_comm = MPI_Comm_c2f(MPI_COMM_WORLD); - ConstructGlobalProcessGrid_default_wrp(&temp_comm, &be_verbose); + ConstructGlobalProcessGrid_default_wrp(&temp_comm); } //////////////////////////////////////////////////////////////////////////////// diff --git a/Source/CPlusPlus/ProcessGrid.h b/Source/CPlusPlus/ProcessGrid.h index f5f98803..419940c9 100644 --- a/Source/CPlusPlus/ProcessGrid.h +++ b/Source/CPlusPlus/ProcessGrid.h @@ -76,31 +76,24 @@ class ProcessGrid { //! \param[in] process_rows number of grid rows. //! \param[in] process_columns number of grid columns. //! \param[in] process_slices number of grid slices. -//! \param[in] be_verbose verbosity flag. void ConstructGlobalProcessGrid(MPI_Comm world_comm, int process_rows, - int process_columns, int process_slices, - bool be_verbose = false); + int process_columns, int process_slices); //! Construct the global process grid from comm world //! \param[in] process_rows number of grid rows. //! \param[in] process_columns number of grid columns. //! \param[in] process_slices number of grid slices. -//! \param[in] be_verbose verbosity flag. void ConstructGlobalProcessGrid(int process_rows, int process_columns, - int process_slices, bool be_verbose = false); + int process_slices); //! Construct the global process grid. //! \param[in] world_comm a communicator that every process in the grid is //! a part of. //! \param[in] process_slices number of grid slices. -//! \param[in] be_verbose verbosity flag. -void ConstructGlobalProcessGrid(MPI_Comm world_comm, int process_slices, - bool be_verbose = false); +void ConstructGlobalProcessGrid(MPI_Comm world_comm, int process_slices); //! Construct the global process grid from comm world //! \param[in] process_slices number of grid slices. -//! \param[in] be_verbose verbosity flag. -void ConstructGlobalProcessGrid(int process_slices, bool be_verbose = false); +void ConstructGlobalProcessGrid(int process_slices); //! Construct the global process grid from comm world -//! \param[in] be_verbose verbosity flag. -void ConstructGlobalProcessGrid(bool be_verbose = false); +void ConstructGlobalProcessGrid(); //! Get the slice of the current process. int GetGlobalMySlice(); //! Get the column of the current process. diff --git a/Source/Fortran/ProcessGridModule.F90 b/Source/Fortran/ProcessGridModule.F90 index 3d909477..94e1a814 100644 --- a/Source/Fortran/ProcessGridModule.F90 +++ b/Source/Fortran/ProcessGridModule.F90 @@ -82,7 +82,7 @@ MODULE ProcessGridModule CONTAINS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Setup the default process grid. SUBROUTINE ConstructProcessGrid_full(world_comm, process_rows, & - & process_columns, process_slices, be_verbose_in) + & process_columns, process_slices) !> A communicator that every process in the grid is a part of. INTEGER, INTENT(IN) :: world_comm !> The number of grid rows. @@ -91,33 +91,18 @@ SUBROUTINE ConstructProcessGrid_full(world_comm, process_rows, & INTEGER, INTENT(IN) :: process_columns !> The number of grid slices. INTEGER, INTENT(IN) :: process_slices - !> Set true to print process grid info. - LOGICAL, INTENT(IN), OPTIONAL :: be_verbose_in - !! Local Data - LOGICAL :: be_verbose - - !! Process Optional Parameters - IF (PRESENT(be_verbose_in)) THEN - be_verbose = be_verbose_in - ELSE - be_verbose = .FALSE. - END IF CALL ConstructNewProcessGrid(global_grid, world_comm, process_rows, & & process_columns, process_slices) END SUBROUTINE ConstructProcessGrid_full !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Setup a process grid specifying only the slices - SUBROUTINE ConstructProcessGrid_onlyslice(world_comm, process_slices_in, & - & be_verbose_in) + SUBROUTINE ConstructProcessGrid_onlyslice(world_comm, process_slices_in) !> A communicator that every process in the grid is a part of. INTEGER, INTENT(IN) :: world_comm !> The number of grid slices. INTEGER, INTENT(IN), OPTIONAL :: process_slices_in - !> Set true to print process grid info. - LOGICAL, INTENT(IN), OPTIONAL :: be_verbose_in !! Local Data - LOGICAL :: be_verbose INTEGER :: process_rows, process_columns, process_slices INTEGER :: total_processors INTEGER :: ierr @@ -126,12 +111,6 @@ SUBROUTINE ConstructProcessGrid_onlyslice(world_comm, process_slices_in, & CALL MPI_COMM_SIZE(world_comm, total_processors, ierr) !! Process Optional Parameters - IF (PRESENT(be_verbose_in)) THEN - be_verbose = be_verbose_in - ELSE - be_verbose = .FALSE. - END IF - IF (PRESENT(process_slices_in)) THEN process_slices = process_slices_in ELSE @@ -144,7 +123,7 @@ SUBROUTINE ConstructProcessGrid_onlyslice(world_comm, process_slices_in, & !! Now call the full setup CALL ConstructProcessGrid(world_comm, process_rows, process_columns, & - & process_slices, be_verbose) + & process_slices) END SUBROUTINE ConstructProcessGrid_onlyslice !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Construct a process grid. diff --git a/Source/Wrapper/ProcessGridModule_wrp.F90 b/Source/Wrapper/ProcessGridModule_wrp.F90 index ab191be6..23432342 100644 --- a/Source/Wrapper/ProcessGridModule_wrp.F90 +++ b/Source/Wrapper/ProcessGridModule_wrp.F90 @@ -40,34 +40,30 @@ MODULE ProcessGridModule_wrp CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Wrap the process grid construction routine. SUBROUTINE ConstructGlobalProcessGrid_wrp(world_comm_, process_rows_, & - & process_columns_, process_slices_, be_verbose) & + & process_columns_, process_slices_) & & BIND(c,name="ConstructGlobalProcessGrid_wrp") INTEGER(kind=c_int), INTENT(IN) :: world_comm_ INTEGER(kind=c_int), INTENT(IN) :: process_rows_ INTEGER(kind=c_int), INTENT(IN) :: process_columns_ INTEGER(kind=c_int), INTENT(IN) :: process_slices_ - LOGICAL(kind=c_bool), INTENT(IN) :: be_verbose CALL ConstructProcessGrid(world_comm_, process_rows_, process_columns_, & - & process_slices_, LOGICAL(be_verbose)) + & process_slices_) END SUBROUTINE ConstructGlobalProcessGrid_wrp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Wrap the process grid construction routine. SUBROUTINE ConstructGlobalProcessGrid_onlyslice_wrp(world_comm_, & - & process_slices_, be_verbose) & + & process_slices_) & & BIND(c,name="ConstructGlobalProcessGrid_onlyslice_wrp") INTEGER(kind=c_int), INTENT(IN) :: world_comm_ INTEGER(kind=c_int), INTENT(IN) :: process_slices_ - LOGICAL(kind=c_bool), INTENT(IN) :: be_verbose - CALL ConstructProcessGrid(world_comm_, process_slices_in=process_slices_, & - & be_verbose_in=LOGICAL(be_verbose)) + CALL ConstructProcessGrid(world_comm_, process_slices_in=process_slices_) END SUBROUTINE ConstructGlobalProcessGrid_onlyslice_wrp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Wrap the process grid construction routine. - SUBROUTINE ConstructGlobalProcessGrid_default_wrp(world_comm_, be_verbose) & + SUBROUTINE ConstructGlobalProcessGrid_default_wrp(world_comm_) & & BIND(c,name="ConstructGlobalProcessGrid_default_wrp") INTEGER(kind=c_int), INTENT(IN) :: world_comm_ - LOGICAL(kind=c_bool), INTENT(IN) :: be_verbose - CALL ConstructProcessGrid(world_comm_, be_verbose_in=LOGICAL(be_verbose)) + CALL ConstructProcessGrid(world_comm_) END SUBROUTINE ConstructGlobalProcessGrid_default_wrp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Get the slice of the current process. diff --git a/UnitTests/test_chemistry.py b/UnitTests/test_chemistry.py index 1135730d..24829cfc 100644 --- a/UnitTests/test_chemistry.py +++ b/UnitTests/test_chemistry.py @@ -76,7 +76,7 @@ def setUpClass(self): rows = int(environ['PROCESS_ROWS']) columns = int(environ['PROCESS_COLUMNS']) slices = int(environ['PROCESS_SLICES']) - nt.ConstructGlobalProcessGrid(rows, columns, slices, True) + nt.ConstructGlobalProcessGrid(rows, columns, slices) @classmethod def tearDownClass(self):