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
14: call MPI_Abort(comm,ierr,nierr)
16: return
17: end
18: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
19: !DEC$ ATTRIBUTES DLLEXPORT::MPIU_Abort
20: #endif
22: subroutine PetscFortranPrintToUnit(unit,str,ierr)
23: implicit none
24: character(*) str
25: PetscInt unit
26: PetscErrorCode ierr
27: write(unit=unit, fmt="(A)", advance='no') str
28: ierr = 0
29: return
30: end
31: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
32: !DEC$ ATTRIBUTES DLLEXPORT::PetscFortranPrintToUnit
33: #endif
35: ! This uses F2003 feature - and is the preferred mode for accessing command line arguments
36: #if defined(PETSC_HAVE_FORTRAN_GET_COMMAND_ARGUMENT)
37: integer function PetscCommandArgumentCount()
38: implicit none
39: PetscCommandArgumentCount= command_argument_count()
40: return
41: end
43: subroutine PetscGetCommandArgument(n,val)
44: implicit none
45: integer n
46: character(*) val
47: call get_command_argument(n,val)
48: return
49: end
50: #endif