mirror of
https://github.com/paboyle/Grid.git
synced 2025-07-13 11:37:06 +01:00
Compare commits
3 Commits
feature/si
...
feature/sh
Author | SHA1 | Date | |
---|---|---|---|
5592f7b8c1 | |||
35da4ece0b | |||
061b15b9e9 |
@ -206,7 +206,7 @@ void CartesianCommunicator::Init(int *argc, char ***argv) {
|
||||
sprintf(shm_name,"/Grid_mpi3_shm_%d_%d",GroupRank,r);
|
||||
|
||||
shm_unlink(shm_name);
|
||||
int fd=shm_open(shm_name,O_RDWR|O_CREAT,0660);
|
||||
int fd=shm_open(shm_name,O_RDWR|O_CREAT,0666);
|
||||
if ( fd < 0 ) { perror("failed shm_open"); assert(0); }
|
||||
ftruncate(fd, size);
|
||||
|
||||
@ -226,7 +226,7 @@ void CartesianCommunicator::Init(int *argc, char ***argv) {
|
||||
|
||||
sprintf(shm_name,"/Grid_mpi3_shm_%d_%d",GroupRank,r);
|
||||
|
||||
int fd=shm_open(shm_name,O_RDWR,0660);
|
||||
int fd=shm_open(shm_name,O_RDWR,0666);
|
||||
if ( fd<0 ) { perror("failed shm_open"); assert(0); }
|
||||
|
||||
void * ptr = mmap(NULL,size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
|
Reference in New Issue
Block a user