Commits

Satish Balay committed 117c425 Merge

Merge branch 'balay/fix-without-mpiuni-fortran-binding'

  • Participants
  • Parent commits 695ca41, 8dc331a

Comments (0)

Files changed (1)

src/sys/objects/ftn-custom/zstart.c

 
     if (f_petsc_comm_world) {(*PetscErrorPrintf)("You cannot set PETSC_COMM_WORLD if you have not initialized MPI first\n");return;}
     /* MPI requires calling Fortran mpi_init() if main program is Fortran */
+#if defined(PETSC_HAVE_MPIUNI) && defined(MPIUNI_AVOID_MPI_NAMESPACE)
+    mierr = MPI_Init((int*)0, (char***)0);
+#else
     mpi_init_(&mierr);
+#endif
     if (mierr) {
       *ierr = mierr;
       (*PetscErrorPrintf)("PetscInitialize: Calling Fortran MPI_Init()\n");