Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
speeling mistakes in teshsuite (even mpich tests because why not)
[simgrid.git] / teshsuite / smpi / fort_args / fort_args.f90
1 ! Check that getarg does something sensible.
2 program getarg_1
3   use mpi
4   CHARACTER*10 ARGS, ARGS2
5   INTEGER*4 I
6   INTEGER*2 I2
7   INTEGER ierr
8   I = 0
9   call MPI_Init(ierr)
10   CALL GETARG(I,ARGS)
11   ! This should return the invoking command.  The actual value depends 
12   ! on the OS, but a blank string is wrong no matter what.
13   ! ??? What about deep embedded systems?
14   if (args.eq.'') STOP 2
15   I = 1
16   CALL GETARG(I,ARGS)
17   if (args.ne.'a') STOP 3
18   I = -1
19   CALL GETARG(I,ARGS)
20   if (args.ne.'') STOP 4
21   ! Assume we won't have been called with more that 4 args.
22   I = 4
23   CALL GETARG(I,ARGS)
24   if (args.ne.'') STOP 5
25   I = 1000
26   CALL GETARG(I,ARGS)
27   if (args.ne.'') STOP 6
28   call MPI_Finalize(ierr)
29 end