Hi, I'm using gfortran 4.1 on Suse 10.1 to compile/run a fortran 90/95 program. The program loops iteratively towards the solution to a model. I need to display graphs at each iteration to make sure it's not calculating junk. I figure I can display these if the program can issue a sytem call to invoke one of the plotting apps that come with Suse (e.g. gnuplot, xmgrace). Google tells me to use the fortran intrinsic "system(command)" where "command" is a character variable containing the desired command.
My problem is that gfortran doesn't recognise "call system(command)" as a valid statement.
Here's the extracted lines of code:
Code:
character :: command
command = "xmgrace data/reconstituted.out"
call system(command)
and here's the compile-time dialogue showing the rejection of the code
Code:
john@suse101:~/Desktop/model> gfortran -std=gnu -W -Wall -pedantic model.f90
In file model.f90:97
call system(command)
1
Warning: Intrinsic 'system' at (1) is not included in the selected standard
john@suse101:~/Desktop/model>
If I change the standard from gnu to f95 I still get a rejection as follows:
Code:
john@suse101:~/Desktop/model> gfortran -std=f95 -W -Wall -pedantic model.f90
/tmp/ccIk3JRP.o: In function `MAIN__':
model.f90:(.text+0xebc): undefined reference to `system_'
collect2: ld returned 1 exit status
I believe that "system(command)" used to work in fortran77, but I'm not keen to go back to that to get system calls.
Any advice on what I'm doing wrong, or on alternate methods to invoke graphics, would be much appreciated.
Thanks
Swerdna