Skip to content

Getting Started with EnGPar

Cameron Smith edited this page Mar 9, 2018 · 7 revisions

Building and Installing

See README.md in the top level directory of the repo.

Necessary Includes

  // C++
  #include <engpar_support.h>
  #include <PCU.h>
  // FORTRAN
  use engpar

Initialization and Finalization

The first two calls required to use EnGPar are an initialize routine and a finalize routine:

  // C++
  EnGPar_Initialize()
  EnGPar_Finalize()
  // FORTRAN
  call cengpar_initialize()
  call cengpar_finalize()

These two functions must be run in between the MPI_Init and MPI_Finalize calls and any further APIs used from EnGPar must be contained within these two calls.

If the target application uses a communicator outside of MPI_COMM_WORLD, one can call the following to switch all communicators used in EnGPar to the one given:

  // C++
  PCU_Switch_Comm(communicator)
  // FORTRAN
  call cengpar_setftncommunicator(communicator)

To further utilize EnGPar for partitioning see the following:

Create an Initial Partition

Improve a Partition