- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concerning the MPI one-sided, I developed a code in which each regular rank allocates a huge amount of memory with (MPI_Alloc_mem). Only one rank exposes its allocation to the other ranks as shared memory. My code works fine. However, I notice the following if I run multiple ranks on the same machine, it is not working (sometimes it crashes and sometimes it just hang). if I run the master rank on a dedicated machine, and I run all other ranks on another machine, the code works again! I repeated my experiments several times and it is always the same case.
So, I have three questions:
Would it be possible to tell any ideas about what may be happening? I use printf, as I do not have debugger like Alinea DDT
Is it possible that a livelock happens because the master process which owns the actual data is preempted, while another process that may try to read the actual data is scheduled.
How to know the way (Intel MPI) work? I mean there is no much information available on the standard of the MPI itself.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ahmed,
Would be great if you could share your code sample and an exact cmd line you use to run IMPI.
Information about configuration and IMPI version would help here as well.
If you wish to play with an intranode memory sharing, then I would recommend you to use MPI-3 functionality (MPI_Win_allocate_shared).
You may find description here: link
BR,
Dmitry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dmitry Durnov (Intel) wrote:
Hi Ahmed,
Would be great if you could share your code sample and an exact cmd line you use to run IMPI.
Information about configuration and IMPI version would help here as well.
If you wish to play with an intranode memory sharing, then I would recommend you to use MPI-3 functionality (MPI_Win_allocate_shared).
You may find description here: link
BR,
Dmitry
Hi Dmitry
The following is my cmd command
mpirun -n 40 ./executable
The following is a sample of my code
int id=0;
double start=0
double * global_scheduling_step=NULL;
MPI_Init(&argc,&argv);
MPI_Comm_rank ( MPI_COMM_WORLD ,&id );
if(id==DATAOWNER)
{
MPI_Alloc_mem(sizeof(int), MPI_INFO_NULL, &global_scheduling_step);
*global_scheduling_step = 0;
MPI_Win_create(global_scheduling_step, sizeof(int),sizeof(int), MPI_INFO_NULL,MPI_COMM_WORLD, &win_global_scheduling_step);
}
else
{
MPI_Win_create(NULL,0,sizeof(int), MPI_INFO_NULL,MPI_COMM_WORLD, &win_global_scheduling_step);
}
// Do a large size of allocation using malloc
while(start!=-1)
{
MPI_Win_lock(MPI_LOCK_EXCLUSIVE,DATAOWNER,0,win_global_scheduling_step);
MPI_Get_accumulate(&one,1,MPI_INT,&local_scheduling_step,1,MPI_INT,DATAOWNER,0,1,MPI_INT,MPI_SUM,win_global_scheduling_step);
MPI_Win_unlock(DATAOWNER,win_global_scheduling_step);
start = check(local_scheduling_step);
if(start==-1)
break;
// dosomething
}
MPI_Win_free(&win_global_scheduling_step);
MPI_Finalize();
Thanks for sharing the link. It is really nice, however, I do not want to play with intra-node SHM. I mean I am trying to understand what happening.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page