def main():
    parser = argparse.ArgumentParser(description='Configure High-performance Geometric Multigrid (HPGMG)')
    parser.add_argument('--arch', help='Name of this configuration', default=None)
    parser.add_argument('--petsc-dir', help='PETSC_DIR', default=os.environ.get('PETSC_DIR', ''))
    parser.add_argument('--petsc-arch', help='PETSC_ARCH', default=os.environ.get('PETSC_ARCH', ''))
    parser.add_argument('--with-hpm', help='libHPM profiling library on Blue Gene ("1" or "/path/to/libmpihpm.a /path/to/libbgpm.a")')
    cf = parser.add_argument_group('Compilers and flags')
    cf.add_argument('--CC', help='Path to C compiler', default=os.environ.get('CC', ''))
    cf.add_argument('--CFLAGS', help='Flags for C compiler', default=os.environ.get('CFLAGS', ''))
    cf.add_argument('--CPPFLAGS', help='Flags for C preprocessor', default=os.environ.get('CPPFLAGS', ''))
    cf.add_argument('--LDFLAGS', help='Flags to pass to linker', default=os.environ.get('LDFLAGS', ''))
    cf.add_argument('--LDLIBS', help='Libraries to pass to linker', default=os.environ.get('LDLIBS', ''))
    fe = parser.add_argument_group('Finite Element options')
    fe.add_argument('--fe', action='store_true', dest='fe', help='Build the Finite-Element solver')
    fv = parser.add_argument_group('Finite Volume options')
    fv.add_argument('--no-fv', action='store_false', dest='fv', help='Do not build the Finite-Volume solver')
    fv.add_argument('--no-fv-mpi', action='store_false', dest='fv_mpi', help='Use MPI')
    fv.add_argument('--fv-cycle', help='Multigrid cycle type', choices=['V', 'F', 'U'], default='F')
    fv.add_argument('--no-fv-subcomm', action='store_false', dest='fv_subcomm', help='Build a subcommunicator for each level in the MG v-cycle to minimize the scope of MPI_AllReduce()')
    fv.add_argument('--fv-coarse-solver', help='Use BiCGStab as a bottom (coarse grid) solver', choices=['bicgstab', 'cabicgstab', 'cg', 'cacg'], default='bicgstab')
    fv.add_argument('--fv-smoother', help='Multigrid smoother', choices=['cheby', 'gsrb', 'jacobi', 'l1jacobi'], default='gsrb')
    args = parser.parse_args()
    if (args.arch is None):
        args.arch = args.petsc_arch
    if (not args.arch):
        args.arch = 'build'
    mkdir_p(args.arch)
    configure(args)
def main():
    parser = argparse.ArgumentParser(description='Configure High-performance Geometric Multigrid (HPGMG)')
    parser.add_argument('--arch', help='Name of this configuration', default=None)
    parser.add_argument('--petsc-dir', help='PETSC_DIR', default=os.environ.get('PETSC_DIR', ))
    parser.add_argument('--petsc-arch', help='PETSC_ARCH', default=os.environ.get('PETSC_ARCH', ))
    parser.add_argument('--with-hpm', help='libHPM profiling library on Blue Gene ("1" or "/path/to/libmpihpm.a /path/to/libbgpm.a")')
    cf = parser.add_argument_group('Compilers and flags')
    cf.add_argument('--CC', help='Path to C compiler', default=os.environ.get('CC', ))
    cf.add_argument('--CFLAGS', help='Flags for C compiler', default=os.environ.get('CFLAGS', ))
    cf.add_argument('--CPPFLAGS', help='Flags for C preprocessor', default=os.environ.get('CPPFLAGS', ))
    cf.add_argument('--LDFLAGS', help='Flags to pass to linker', default=os.environ.get('LDFLAGS', ))
    cf.add_argument('--LDLIBS', help='Libraries to pass to linker', default=os.environ.get('LDLIBS', ))
    fe = parser.add_argument_group('Finite Element options')
    fe.add_argument('--fe', action='store_true', dest='fe', help='Build the Finite-Element solver')
    fv = parser.add_argument_group('Finite Volume options')
    fv.add_argument('--no-fv', action='store_false', dest='fv', help='Do not build the Finite-Volume solver')
    fv.add_argument('--no-fv-mpi', action='store_false', dest='fv_mpi', help='Use MPI')
    fv.add_argument('--fv-cycle', help='Multigrid cycle type', choices=['V', 'F', 'U'], default='F')
    fv.add_argument('--no-fv-subcomm', action='store_false', dest='fv_subcomm', help='Build a subcommunicator for each level in the MG v-cycle to minimize the scope of MPI_AllReduce()')
    fv.add_argument('--fv-coarse-solver', help='Use BiCGStab as a bottom (coarse grid) solver', choices=['bicgstab', 'cabicgstab', 'cg', 'cacg'], default='bicgstab')
    fv.add_argument('--fv-smoother', help='Multigrid smoother', choices=['cheby', 'gsrb', 'jacobi', 'l1jacobi'], default='gsrb')
    args = parser.parse_args()
    if (args.arch is None):
        args.arch = args.petsc_arch
    if (not args.arch):
        args.arch = 'build'
    mkdir_p(args.arch)
    configure(args)