Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

GETARG in ifc

csjmayer
Beginner
264 Views
Hi,

I tried to use the portability function GETARG of the ifc (7.1) compiler to get command-line arguments. I have compiled my program with the '-Vaxlib' option and used the 'use iflport' module for the interface declaration. It is no problem to compile. However, GETARG is not giving me any command-line arguments. I tried NARG to see if this function is giving me the correct number of arguments. This is working and therefore, I have no clue what is going on. It would be very nice, if somebody could help me with this problem.

Thanks
Chris

Here are the declarations of my program:
!------------------------- Modules -------------------------!
use iflport
use pintpol_module
use eas3iomod

implicit none

!--------------------- Type definition ---------------------!
! parameters.
integer, parameter :: filenr=21
double precision, parameter :: pi=3.1415926535897932, ud=0.99

! local variables.
integer :: i, j, ioerr
integer(KIND=4) :: arg
character(LEN=100) :: rfname, wfname
double precision, dimension(:), allocatable :: u, x, y, yfit
double precision, dimension(:,:,:), allocatable :: uvel

! eas3 data type for kennsatz.
type(eas3ks_t) :: ks

!------------------ Get command-line input ------------------!
arg=1
call GETARG(arg, rfname) !0 is name of executable.
print *, rfname
if (rfname.eq.'') then
print *,'ERROR->CALCDELTA: No input file specified.'
stop
end if
arg=2
call GETARG(arg, wfname)
if (wfname.eq.'') then
print *,'ERROR->CALCDELTA: No output file specified.'
stop
end if
0 Kudos
0 Replies
Reply