mp_get_processor_name Subroutine

public subroutine mp_get_processor_name(procname, resultlen)

Get a unique specifier for the actual (as opposed to virtual) node (MPI 2.1)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(out) :: procname

Name of processor

integer, intent(out), optional :: resultlen

Length (in characters) of procname (INTEGER)


Source Code

   SUBROUTINE mp_get_processor_name(procname, resultlen)
      !! Get a unique specifier for the actual (as opposed to virtual) node (MPI 2.1)

      CHARACTER(LEN=*), INTENT(OUT)                      :: procname
         !! Name of processor
      INTEGER, OPTIONAL, INTENT(OUT)                     :: resultlen
         !! Length (in characters) of procname (INTEGER)

#if defined(__parallel)
      INTEGER                                            :: namelen, ierr

      CALL mpi_get_processor_name(procname, namelen, ierr)
      IF (ierr .EQ. 0) THEN
         IF (PRESENT(resultlen)) resultlen = namelen
      ELSE
#endif
         CALL m_hostnm(procname)
         IF (PRESENT(resultlen)) resultlen = LEN_TRIM(procname)
#if defined(__parallel)
      END IF
#endif
   END SUBROUTINE mp_get_processor_name