It's OK, I found the problem.

I was accidentally passing in a DM which hadn't been created yet. This didn't matter when not using -log_view, because it looks like the DM isn't actually used for anything else inside DMPlexDistributeFieldIS(). But when you run with -log_view it tries to get its communicator.

- Adrian

On 13/09/19 2:31 PM, Adrian Croucher wrote:

My code is using DMPlexDistributeFieldIS() to distribute an index set, and it seems to work ok, except if I run with -log_view.

In that case I get the error below.

The code (Fortran) looks like this:

    call PetscSectionCreate(PETSC_COMM_WORLD, dist_section, ierr)
    call ISCreate(PETSC_COMM_WORLD, dist_index_set, ierr)
    call DMPlexDistributeFieldIS(self%dm, sf, section, &
         index_set, dist_section, &
         dist_index_set, ierr); CHKERRQ(ierr)
    call PetscSectionDestroy(dist_section, ierr); CHKERRQ(ierr)
    call ISDestroy(index_set, ierr); CHKERRQ(ierr)
    index_set = dist_index_set

Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
tel: +64 (0)9 923 4611

Reply via email to