I started the test program in a cygwin (unix/linux emulator) window and the command "ls -l" gives the long listing of the files/directories. I had already tried "test = system('dir')" from within a dos (cmd) window and while no error messages were generated, the dos command 'dir' was not performed. Thanks, Ben -----Original Message----- From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of Colin Watters Sent: Thursday, December 29, 2005 8:35 AM To: [log in to unmask] Subject: Re: spawing other jobs from within F90 code How do you know it works? Sounds like your opsys is Windows. Last time I looked, the command "ls -l" in a windows command prompt gave "bad command or filename" or words to that effect. Maybe your subsequent "MS windows-generated error message" is this. You could try test = system('dir') Qolin Email: my qname at domain Domain: qomputing dot demon dot co dot uk ----- Original Message ----- From: "Ben Blackwell" <[log in to unmask]> To: <[log in to unmask]> Sent: Thursday, December 29, 2005 2:24 PM Subject: Re: spawing other jobs from within F90 code The good news is than Dan Nagle's suggestion of system() works for the Absoft compiler. I found the following two lines of code in some Absoft documentation: integer*4 test,system test = system('ls -l') and it works. The bad news is that the code containing the above two lines dies non-gracefully after the system call 'ls -l' is executed. You get a MS windows generated error message "abc.exe has encountered a problem and needs to close". Is there some other call that returns control back to the fortran code? Thanks, Ben -----Original Message----- From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of Dan Nagle Sent: Monday, December 26, 2005 5:37 PM To: [log in to unmask] Subject: Re: spawing other jobs from within F90 code Hello, Try system(), or runqq() depending upon your processor. Ben Blackwell wrote: > I did NOT mean "spawn" in the parallel programming sense. I want to have the > function evaluation portion of the optimization to come from a stand alone > code as opposed to a subroutine of the optimization code. What name do the > system intrinsics go by? > Thanks, > Ben > > -----Original Message----- > From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of > Aleksandar Donev > Sent: Monday, December 26, 2005 3:00 PM > To: [log in to unmask] > Subject: Re: spawing other jobs from within F90 code > > Ben Blackwell wrote: > >>Is there a way to spawn jobs (run finite element code) from within >>the F90 optimization code? > > You should probably not use "spawn" unless you are talking about > parallel programming (spawning threads or such). Do you just mean "run" > an external program and then wait untill it finished and read the > results it wrote? In which case the answer is that there is no strictly > standard-conforming way to do it in F90, but most compilers offer some > kind of "system" intrinsic which allows running an external program. It > will be part of the next revision of Fortran, although I don't remember > what spelling we decided on... > Best, > Aleks > -- Cheers! Dan Nagle Purple Sage Computing Solutions, Inc.