@@ -54,8 +54,8 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
5454 mca_io_ompio_file_t * shfileHandle ;
5555 char * filename_basename ;
5656 char * sm_filename ;
57- struct sm_offset * sm_offset_ptr ;
58- struct sm_offset sm_offset ;
57+ struct mca_sharedfp_sm_offset * sm_offset_ptr ;
58+ struct mca_sharedfp_sm_offset sm_offset ;
5959 int sm_fd ;
6060 int rank ;
6161
@@ -139,13 +139,13 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
139139
140140 /*TODO: is it necessary to write to the file first?*/
141141 if ( 0 == rank ){
142- memset ( & sm_offset , 0 , sizeof (struct sm_offset ));
143- write ( sm_fd , & sm_offset , sizeof (struct sm_offset ));
142+ memset ( & sm_offset , 0 , sizeof (struct mca_sharedfp_sm_offset ));
143+ write ( sm_fd , & sm_offset , sizeof (struct mca_sharedfp_sm_offset ));
144144 }
145145 comm -> c_coll .coll_barrier (comm , comm -> c_coll .coll_barrier_module );
146146
147147 /*the file has been written to, now we can map*/
148- sm_offset_ptr = mmap (NULL , sizeof (struct sm_offset ), PROT_READ | PROT_WRITE ,
148+ sm_offset_ptr = mmap (NULL , sizeof (struct mca_sharedfp_sm_offset ), PROT_READ | PROT_WRITE ,
149149 MAP_SHARED , sm_fd , 0 );
150150
151151 close (sm_fd );
@@ -199,7 +199,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
199199 free (sm_data );
200200 free (sh );
201201 free (shfileHandle );
202- munmap (sm_offset_ptr , sizeof (struct sm_offset ));
202+ munmap (sm_offset_ptr , sizeof (struct mca_sharedfp_sm_offset ));
203203 err = OMPI_ERROR ;
204204 }
205205
@@ -242,7 +242,7 @@ int mca_sharedfp_sm_file_close (mca_io_ompio_file_t *fh)
242242 free (file_data -> sem_name );
243243#endif
244244 /*Release the shared memory segment.*/
245- munmap (file_data -> sm_offset_ptr ,sizeof (struct sm_offset ));
245+ munmap (file_data -> sm_offset_ptr ,sizeof (struct mca_sharedfp_sm_offset ));
246246 /*Q: Do we need to delete the file? */
247247 remove (file_data -> sm_filename );
248248 }
0 commit comments