Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add fortran tests from mpich-tests, enforce completion of mpich-tests suite with...
[simgrid.git] / teshsuite / smpi / mpich-test / env / getprocf.f
1       program main
2 C
3 C Test get processor name
4 C
5       include 'mpif.h'
6       character*(MPI_MAX_PROCESSOR_NAME) name
7       integer  resultlen, ierr
8
9       call MPI_Init( ierr )
10       name = " "
11       call MPI_Get_processor_name( name, resultlen, ierr )
12 C     Check that name contains only printing characters */
13 C      do i=1, resultlen
14 C      enddo
15       errs = 0
16       do i=resultlen+2, MPI_MAX_PROCESSOR_NAME
17          if (name(i:i) .ne. " ") then
18             print *, i
19             errs = errs + 1
20          endif
21       enddo
22       if (errs .gt. 0) then
23          print *, 'Non-blanks after name'
24       else
25          print *, ' No Errors'
26       endif
27       call MPI_Finalize( ierr )
28       end