Hello,
I would either take the question to Absoft's support,
or try to fiddle with the configuration of the shell
spawned by system() (or both).
I'm not quite sure what to seek in the shell configuration.
Ben Blackwell wrote:
> 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.
|