def get_nproc():
    """ Get the number of processes """
    try:
        from mpi4py import MPI
        comm_w = MPI.COMM_WORLD