POSIX newbie: help needed.

POSIX newbie: help needed.

I've got a quite complex problem.
I'm in need to include in my Fortran 90 code an external subroutine written in C, which in turn calls fortran subroutines.
I've been able to compile the external routines with gcc and g77, but not with ifc (my fault, I suppose). Since I'm only going to evaluate these routines, even if I'm able to compile them with gcc and ifc (thus making them binary compatible with my code) I don't want to spend too much time in coding the correct calling procedure.
I actually have a test program which calls this subroutine reading and writing all input-output from-to disk.
Up to now I pause the main program after writing the data needed by subroutine, I execute the external test program and then I read back the output of the external subroutine.
I'd like to automate this by POSIX calls.

I have to execute the command

./spai A.mm -lp 1 -ns 3 -ep 0.2

so I set up things like this
integer,parameter :: iargc=4
integer :: lenpath=6,lenargv(0:iargc-1)=(/4,5,7,5/)
character(len=6) :: path="./spai"
character(len=10) :: argv(0:iargc-1)=(/"A.mm ","-lp 1 ","-ep 0.2 ","-ns 3 "/)
integer :: ierror

call pxfexecv(path,lenpath,argv,lenargv,iargc,ierror)

I also copied iflposix.f90 from /opt/intel/compiler70/ia32/include/, compiled it and added 'use iflposix' where needed, linking against posix library.
The program compiles well, but while executing it quits with
** Address Error **

Am I doing the wrong call? I read on a newsgroup the suggestion to use PXFFORK together with PXFEXECV. Is it necessary? I'm really confused about that. Can someone point me to some instructions on how to use those commands?
Thanks in advance,
Arturo di Gioia

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.