Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Problem porting a f77-exec. to alpha/linux
@ 1997-06-05 20:39 Craig Burley
  0 siblings, 0 replies; 4+ messages in thread
From: Craig Burley @ 1997-06-05 20:39 UTC (permalink / raw)


Oops, I forgot one important line, in the brackets below.

>  integer status
[  integer system  ]
>  status = system(...)
>  if (status.ne.0) print *, 'system call #1 status is ', status
>  ...

        tq vm, (burley)

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Problem porting a f77-exec. to alpha/linux
@ 1997-06-05 19:21 Craig Burley
  0 siblings, 0 replies; 4+ messages in thread
From: Craig Burley @ 1997-06-05 19:21 UTC (permalink / raw)


>>I have a f77 program which contains the following non-standard (but
>>usable on AIX, Solaris, Intel/linux, DU) lines of code:
>>
>>	...
>
>The 'system' routine on DUNIX expects to have /sbin/sh available.
>make a link thus: ln -s /bin/bsh /sbin/sh and it should work.

Another thing to consider is to check the documentation on
the `system' library function provided by your Fortran environment
(presumably part of libU77).  I suspect it returns an INTEGER
status argument that _might_ have, if tested by your code, alerted
you to the problem more quickly.  E.g. this might be better than
your "call system(...)" code:

  integer status
  status = system(...)
  if (status.ne.0) print *, 'system call #1 status is ', status
  ...

        tq vm, (burley)

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Problem porting a f77-exec. to alpha/linux
@ 1997-06-05 16:12 D. Unger
  1997-06-05 17:34 ` T. S. Horsnell
  0 siblings, 1 reply; 4+ messages in thread
From: D. Unger @ 1997-06-05 16:12 UTC (permalink / raw)


I have a f77 program which contains the following non-standard (but
usable on AIX, Solaris, Intel/linux, DU) lines of code:

	...
      call system('hostname > temp123456')
      call system('whoami >> temp123456')
      call system('pwd >> temp123456')
      call system('date >> temp123456')
      open(unit=11,file='temp123456',status='old')
      rewind(unit=11)
      read(11,'(a80)') host
	...

After compiling/linking statically (so that all run-time libs are
bound into the executable) on a Digital Unix Alpha, this code
runs fine on the DU Alpha, but when PORTING THE EXECUTABLE to an 
Alpha running Linux, I get the error message
	forrtl: severe (29): file not found, unit 11, file temp123456
	Command exited with non-zero status 29
and the program stops. Apparently the file temp123456 hasn't been created
and the system call didn't work,

	but why?

Any ideas are greatly appreciated,
	Ditmar.

-- 
                                \\\|///
                               \\ ~ ~ //
                               (/ @ @ /)
 ----------------------------oOOo-(_)-oOOo-------------------------------
|                                                                        |
|   Ditmar Unger                           E-mail:                       |
|   Fachgebiet Turbomaschinen              unger@tfa.th-darmstadt.de     |
|   und Fluidantriebstechnik                                             | 
|   TH Darmstadt                           Tel.  +49  (0) 6151 16-2603   |
|   Petersenstr. 30                        Fax.                16-5559   |
|   D - 64287 Darmstadt                                                  |
|                                                                        |
|   WWW:	http://www.th-darmstadt.de/fb/mb/tfa/Welcome.html        |
 ------------------------------------------------------------------------

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-06-05 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-06-05 20:39 Problem porting a f77-exec. to alpha/linux Craig Burley
  -- strict thread matches above, loose matches on Subject: below --
1997-06-05 19:21 Craig Burley
1997-06-05 16:12 D. Unger
1997-06-05 17:34 ` T. S. Horsnell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox