Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* OSF Fortran Shared Memory
@ 1995-04-10  4:00 A. Langlois
  1995-04-11  4:00 ` Steve Lionel
  0 siblings, 1 reply; 2+ messages in thread
From: A. Langlois @ 1995-04-10  4:00 UTC (permalink / raw)



        What I am really after is a way to declare
        a common in Fortran ( common /xxx/ i(100) )
        and use the 'shm_get / shmat' pair to make that
        common a global shared memory segment for other
        processes to use.

        I tried to pass the address ( in above common) of the
        1st element of the common area to a C-function that
        did a 'shmget (worked fine)' and a 'shmat ( failed
        with "not enough memory" ... errno = 12 '.

        When I did the same thing on another system years ago
        there was a way to use link (ld) command directives
        to make the address of the common a global external
        symbol etc.

        Any examples ... referneces to Fortran/OSF experts
	would be appreciated.


                                                Thanks,

                                                Allen Langlois
                                                Wyle Labs.
                                                (804)-864-4682 (NASA)
                                                (804)-865-0000 x396 (Wyle)
                                                (804)-865-8116 FAX  (Wyle)
                                                a.j.langlois@larc.nasa.gov





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

* Re: OSF Fortran Shared Memory
  1995-04-10  4:00 OSF Fortran Shared Memory A. Langlois
@ 1995-04-11  4:00 ` Steve Lionel
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Lionel @ 1995-04-11  4:00 UTC (permalink / raw)



In article <3mbphb$m10@reznor.larc.nasa.gov>, al@ird88ka.larc.nasa.gov 
(A. Langlois) writes:
|>
|>        What I am really after is a way to declare
|>        a common in Fortran ( common /xxx/ i(100) )
|>        and use the 'shm_get / shmat' pair to make that
|>        common a global shared memory segment for other
|>        processes to use.

[Note - you separately posted this to comp.lang.fortran, where I also answered
it.  If your posting software supports it, please consider cross-posting
one submission to multiple groups at once so that any followup is visible
in all groups.]

Use mmap(2) for this purpose - see the mmap man page for details.  You'll need
to add padding on either side of the variable to make sure you can map a
page-aligned section of memory.
-- 

Steve Lionel                      Mail: lionel@quark.enet.dec.com
DEC Fortran Development           WWW:  http://www.digital.com/info/slionel.html
Digital Equipment Corporation     CompuServe: 75263,3001
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698             "Free advice is worth every cent"

For a summary of Digital's Internet services, send mail to info@digital.com



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

end of thread, other threads:[~1995-04-11  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-04-10  4:00 OSF Fortran Shared Memory A. Langlois
1995-04-11  4:00 ` Steve Lionel

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