[SCore-users] Developing with PM

Bogdan Costescu bogdan.costescu at iwr.uni-heidelberg.de
Wed Oct 23 20:27:47 JST 2002


On Wed, 23 Oct 2002, Atsushi HORI wrote:

> You have to call pmBeforeSelect() before calling select() or poll(), and
> you have to call pmAfterSelect() after calling select() or poll().

This is expressed in the documentation...

> By calling these two wrapping functions, you can avoid "FLOOD of
> INTERRUPTIONS"  with Myrinet.

... and now we know why we have to do it :-)

> Further, when select() or poll() succeeds, however, it is NOT guaranteed
> that one or more PMM messages arrived indeed.

Huh ? So we have to check again the return code of pmReceive against 
ENOBUFS ? Now I understand the reason for writting the select()-based code 
in pmtest.c the way it is:

	pmBeforeSelect
	while (pmReceive == ENOBUFS) {
		select()
		}
	pmAfterSelect
	pmReleaseReceiveBuffer

> There is a race condition between the pmBeforeSelect() and select()
> calls. 

I guess this is also avoided in the pmtest.c code.

Thank you for mentioning this !

-- 
Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu at IWR.Uni-Heidelberg.De




More information about the SCore-users mailing list