remove the shared memory control backing file on
termination. remove some debug code. This commit was SVN r3615.
Этот коммит содержится в:
родитель
5ee42c2a58
Коммит
72f9b1df14
@ -99,11 +99,6 @@ mca_common_sm_mmap_t* mca_common_sm_mmap_init(size_t size, char *file_name,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* debug */
|
||||
fprintf(stderr," open %s \n",file_name);
|
||||
fflush(stderr);
|
||||
/* end debug */
|
||||
|
||||
/* open the backing file - only the first process accessing this
|
||||
* file will succeed. */
|
||||
fd=mca_common_sm_mmap_open(file_name);
|
||||
|
@ -169,13 +169,36 @@ int mca_ptl_sm_component_open(void)
|
||||
|
||||
int mca_ptl_sm_component_close(void)
|
||||
{
|
||||
int return_value=OMPI_SUCCESS;
|
||||
|
||||
OBJ_DESTRUCT(&mca_ptl_sm_component.sm_lock);
|
||||
OBJ_DESTRUCT(&mca_ptl_sm_component.sm_send_requests);
|
||||
OBJ_DESTRUCT(&mca_ptl_sm_component.sm_first_frags);
|
||||
OBJ_DESTRUCT(&mca_ptl_sm_component.sm_second_frags);
|
||||
OBJ_DESTRUCT(&mca_ptl_sm_component.sm_pending_ack_lock);
|
||||
OBJ_DESTRUCT(&mca_ptl_sm_component.sm_pending_ack);
|
||||
return OMPI_SUCCESS;
|
||||
|
||||
/* unmap the shared memory control structure */
|
||||
return_value=munmap(mca_ptl_sm_component.mmap_file->map_addr,
|
||||
mca_ptl_sm_component.mmap_file->map_size);
|
||||
if(-1 == return_value) {
|
||||
return_value=OMPI_ERROR;
|
||||
ompi_output(0," munmap failed :: file - %s :: errno - %d \n",
|
||||
mca_ptl_sm_component.mmap_file->map_addr,
|
||||
errno);
|
||||
goto CLEANUP;
|
||||
}
|
||||
|
||||
/* unlink file, so that it will be deleted when all references
|
||||
* to it are gone - no error checking, since we want all procs
|
||||
* to call this, so that in an abnormal termination scanario,
|
||||
* this file will still get cleaned up */
|
||||
unlink(mca_ptl_sm_component.mmap_file->map_path);
|
||||
|
||||
CLEANUP:
|
||||
|
||||
/* return */
|
||||
return return_value;
|
||||
}
|
||||
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user