Actual source code: somefort.F90

  1: !
  2: !     Prevents: Warning: Same actual argument associated with INTENT(IN)
  3: !     argument 'errorcode' and INTENT(OUT) argument 'ierror' at (1)
  4: !     when MPI_Abort() is called directly
  5: !

  7: #include <petsc/finclude/petscsys.h>

  9:       subroutine MPIU_Abort(comm,ierr)
 10:       implicit none
 11:       MPI_Comm comm
 12:       PetscMPIInt ierr,nierr
 13:       call MPI_Abort(comm,ierr,nierr)
 14:       end
 15: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
 16: !DEC$ ATTRIBUTES DLLEXPORT::MPIU_Abort
 17: #endif

 19:       subroutine PetscFortranPrintToUnit(unit,str,ierr)
 20:       implicit none
 21:       character(*) str
 22:       PetscInt unit
 23:       PetscErrorCode ierr
 24:       write(unit=unit, fmt="(A)", advance='no') str
 25:       ierr = 0
 26:       end
 27: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
 28: !DEC$ ATTRIBUTES DLLEXPORT::PetscFortranPrintToUnit
 29: #endif

 31: !  This uses F2003 feature - and is the preferred mode for accessing command line arguments
 32:       integer function PetscCommandArgumentCount()
 33:       implicit none
 34:       PetscCommandArgumentCount= command_argument_count()
 35:       end

 37:       subroutine PetscGetCommandArgument(n,val)
 38:       implicit none
 39:       integer, intent(in) :: n
 40:       character(*) val
 41:       call get_command_argument(n,val)
 42:       end