- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I want to create a static library, which is called by two seperate processes. The first process uses some calculation subroutines and functions, the second process should display the results of these calculations.
My questions are:
Can I use the samestatic library simultaneously with two processes? Or do I have to use a dynamic link library?
What about the data?Can the output processaccess the same value of variables as the calculation process? I use a module at the moment where all global variables are stored. Or do I have to change this into COMMON blocks or something else?
Thanks in advance,
Markus
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I want to create a static library, which is called by two seperate processes. The first process uses some calculation subroutines and functions, the second process should display the results of these calculations.
My questions are:
Can I use the samestatic library simultaneously with two processes? Or do I have to use a dynamic link library?
What about the data?Can the output processaccess the same value of variables as the calculation process? I use a module at the moment where all global variables are stored. Or do I have to change this into COMMON blocks or something else?
Thanks in advance,
Markus
You can use the same static library with two processes of course. Oh, you also want data sharing :-P? That's completely orthogonal to static vs. dynamic library issues: basically, two processes in Windows are separate worlds, which by default cannot share any memory (apart from some system resources such as kernel handles). That's by design -- you don't want your process to mess or to be messed with by another process, don't you?
Your options for IPC are listed here. Of those, pipes you already know about, and some Fortran wrappers for memory-mapped files can be found here.
Apart from those, you can use shared data segments (see here); that requires a Dll to work. I think that people have done that for Fortran so someone could provide an example. The gotcha is that "Any variables in a shared data segment must be statically initialized.", i.e. no allocatables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IVF 10.1 and later supplies a DLL_Shared_Data sample which illustrates using a DLL to share data between processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IVF 10.1 and later supplies a DLL_Shared_Data sample which illustrates using a DLL to share data between processes.
Thanks both of you, I will check the sample later this Friday.
Markus

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page