Re: Shared memory handling for mixed C/FORTRAN program

2015-04-13 Thread Christoph Weise
> The problem is the call to shmget: > > #undef PAGESIZE > #define PAGESIZE 512 > shmid = shmget(key, PAGESIZE, IPC_ALLOC); > > Since you're requesting only 512 bytes, the shared memory segment the > following shmat call returns is only 4K. The shmget call should request > as much memor

Re: Shared memory handling for mixed C/FORTRAN program

2015-04-11 Thread Christoph Weise
>On Apr 10 22:20, Christoph Weise wrote: >> >PAGESIZE on Cygwin is not 1024, and the right value to use for >> >XSI SHM is SHMLBA (== 64K on Cygwin) >> >> Setting PAGESIZE to SHMLBA creates problems elsewhere in the program >> (then PAGESIZE is too big for

Re: Shared memory handling for mixed C/FORTRAN program

2015-04-10 Thread Christoph Weise
Thanks for your help, your suggestions have helped me greatly but I'm still stuck. >> I am porting to cygwin a program in FORTRAN/C that relies on C >> routines to create a shared memory region allowing various independent >> FORTRAN routines to share data. Program compiles and runs ok on L

Shared memory handling for mixed C/FORTRAN program

2015-04-08 Thread Christoph Weise
I am porting to cygwin a program in FORTRAN/C that relies on C routines to create a shared memory region allowing various independent FORTRAN routines to share data. Program compiles and runs ok on Linux with g77/gcc compilers. I am compiling on cygwin 1.7.33-2(0.280/5/3)with gfortran/gcc (4.8.3