X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fb71a3925e2994dc9cc78eb37d1a04214d5319d7..482c376770156147b76ebfbac9ce5f7802ab3403:/teshsuite/smpi/fort_args/fort_args.f90 diff --git a/teshsuite/smpi/fort_args/fort_args.f90 b/teshsuite/smpi/fort_args/fort_args.f90 new file mode 100644 index 0000000000..dfd53083b5 --- /dev/null +++ b/teshsuite/smpi/fort_args/fort_args.f90 @@ -0,0 +1,29 @@ +! Check that getarg does something sensible. +program getarg_1 + use mpi + CHARACTER*10 ARGS, ARGS2 + INTEGER*4 I + INTEGER*2 I2 + INTEGER ierr + I = 0 + call MPI_Init(ierr) + CALL GETARG(I,ARGS) + ! This should return the invoking command. The actual value depends + ! on the OS, but a blank string is wrong no matter what. + ! ??? What about deep embedded systems? + if (args.eq.'') STOP 2 + I = 1 + CALL GETARG(I,ARGS) + if (args.ne.'a') STOP 3 + I = -1 + CALL GETARG(I,ARGS) + if (args.ne.'') STOP 4 + ! Assume we won't have been called with more that 4 args. + I = 4 + CALL GETARG(I,ARGS) + if (args.ne.'') STOP 5 + I = 1000 + CALL GETARG(I,ARGS) + if (args.ne.'') STOP 6 + call MPI_Finalize(ierr) +end