Hi

Do you have a minimal & stable reproducer? What MPI version are you using?

I was unable to reproduce with:

int main(int argc, char *argv[])
{

    MPI_Init(NULL, NULL);
    shmem_init();
    shmem_finalize();
    MPI_Finalize();
   
    return 0;
}

On Wednesday, 3 December 2025 at 23:02:09 UTC+2 Palmer, Bruce J wrote:

> It appears to complain about a call to MPI_Comm_free that is called after 
> MPI_Finalize. I assume this is occurring because there is a call to 
> MPI_Comm_free (or its internal equivalent) inside MPI_Finalize and this is 
> triggered because our code has a call to shmem_finalize that is followed by 
> a call to MPI_Finalize. My understanding is that should be allowed.
>
> Bruce
>
> *From: *'Pritchard Jr., Howard' via Open MPI users <
> [email protected]>
> *Date: *Wednesday, December 3, 2025 at 11:11 AM
> *To: *[email protected] <[email protected]>
> *Subject: *Re: [EXTERNAL] [OMPI users] shmem_finalize
>
> Check twice before you click! This email originated from outside PNNL.
>
> HI Bruce,
>
>  
>
> Could you describe more what the crash is?  Does the application emit some 
> sort of error message or is there a segmentation fault and maybe traceback?
>
> Also which version of Open MPI/OSHMEM are you using?
>
>  
>
> Howard
>
>  
>
> *From: *"'Palmer, Bruce J' via Open MPI users" <[email protected]>
> *Reply-To: *"[email protected]" <[email protected]>
> *Date: *Tuesday, December 2, 2025 at 2:54 PM
> *To: *Open MPI Users <[email protected]>
> *Subject: *[EXTERNAL] [OMPI users] shmem_finalize
>
>  
>
> Hi,
>
>  
>
> Not sure if this is the right place for this inquiry, but I’ve got a 
> question about the implementation of OpenSHMEM that is distributed with 
> OpenMPI. As far as I can tell from the OpenSHMEM documentation, 
> MPI_Finalize() and shmem_finalize are relatively independent and it should 
> be possible to call shmem_finalize followed by MPI_Finalize without 
> incurring an error. However, it looks like the shmem_finalize 
> implementation is calling omni_mpi_finalize and this causes MPI_Finalize to 
> crash. I can fix this easily in my application, but it seems like I 
> shouldn’t have to.
>
>  
>
> Bruce
>
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to *[email protected]*.
>
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to *[email protected]*.
>

To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].

Reply via email to