For the sake of completeness, and for the enlightenment of all interested 
developers, I would prefer if we keep the discussion going on this mailing list 
(so we will have a searchable trace for the future).

  george.

On Mar 17, 2010, at 01:25 , hu yaohui wrote:

> Hi George,
> did you have a gmail or msn? i really want to talk to you directly.That's 
> much fast.
>  
> Thanks & Regards
> Yaohui Hu
> 
> On Wed, Mar 17, 2010 at 12:42 PM, George Bosilca <bosi...@eecs.utk.edu> wrote:
> Yoahui,
> 
> The self component is special. While is does behave as a "normal" BTL, it 
> takes a lot of shortcuts as all operations are in the memory of a single 
> process. However, as the simplest BTLs in Open MPI, I guess it is a good 
> starting point.
> 
> As stated previously, the self BTL exhibit a lot of differences compared with 
> the others BTL. For your case, in the self BTL the send function trigger the 
> receiver callback, as there is other simple way to drain the "network". This 
> explain why we compute the btl_active_message_callback_t directly in the send 
> function. Usually, this is done on the progress function, once some data have 
> been extracted from the network. Basically, everything in the 
> mca_btl_self_send function starting from the "/* upcall */" comment is the 
> receive operation.
> 
>  george.
> 
> On Mar 17, 2010, at 00:30 , hu yaohui wrote:
> 
> > Hi George,
> > what i want to do is to modify the self component to meet my needs,i just 
> > want to modify the send function of the self component to test whether my 
> > implemented send function ,which based on some emulation platform, is 
> > right.so i copied all the self component code,modified the component name 
> > to mine ,the i wanted to subsitude its send and receive to my implemented 
> > send/receive function.i dont know whether this is right,if not ,or you need 
> > more information ,please let me know.
> >
> > Thanks & Regards
> > Yaohui Hu .
> >
> > On Wed, Mar 17, 2010 at 12:05 PM, George Bosilca <bosi...@eecs.utk.edu> 
> > wrote:
> > Yaohui,
> >
> > The whole infrastructure at the level where you're looking is similar to 
> > Active Messages. The register function is used to register callback for a 
> > specific tag. A tag is a uint8_t, and thus there are 256 callbacks 
> > possible. However, there are some rules regarding which level is allowed to 
> > register callbacks in a specific range, in order to avoid conflict between 
> > several modules loaded in same time.
> >
> > Anyway, as far as I understood you're looking at writing a new BTL. Every 
> > time a message is drained from the network, the BTL is supposed to know 
> > that tag it was send to and trigger the corresponding callback (this only 
> > on the receiver side). How this "tag" is moved around depends on the BTL 
> > capabilities. Some will have to push it explicitly through the network (TCP 
> > as an example), while others have other means to move it around (for MX 
> > this tag is part of the 64 bits key used for each message). Therefore, the 
> > first thing you should make sure is that you really have a way to retrieve 
> > this tag on the receiver side. Once you have the tag and the content of the 
> > message, you should call the callback corresponding to the tag (using the 
> > simple addition you noticed), and pass the correct arguments. This should 
> > at least let you start the eager protocol.
> >
> >  george.
> >
> > On Mar 16, 2010, at 23:22 , hu yaohui wrote:
> >
> > > Hi Jeff & All
> > > Yes,you are right,i was just a little dizzy then. i need to modify the 
> > > send function of component self in btl framework.
> > > i just met a problem right now.
> > > when i browse the function 
> > > mca_btl_self_send(~/ompi/mca/btl/self/btl_self.c),i think it use this to 
> > > send the data
> > > <snip>
> > > 303    reg = mca_btl_base_active_message_trigger + tag;
> > > 304    reg->cbfunc( btl, tag, des, reg->cbdata );
> > > </snip>
> > > i trace through the "mca_btl_base_active_message_trigger" to the function 
> > > where it get its value ,then i find function 
> > > mca_bml_r2_register(~/ompi/mca/bml/bml_r2.c),it like this:
> > > <snip>
> > > 728    mca_btl_base_active_message_trigger[tag].cbfunc = cbfunc;
> > > 729    mca_btl_base_active_message_trigger[tag].cbdata = data;
> > > <snip>
> > > when i trace through mca_bml_r2_register ,in the same file,i get this 
> > > structure:
> > > <snip>
> > > mca_bml_r2_module_t mca_bml_r2 = {
> > >     {
> > >         &mca_bml_r2_component,
> > >         mca_bml_r2_add_procs,
> > >         mca_bml_r2_del_procs,
> > >         mca_bml_r2_add_btl,
> > >         mca_bml_r2_del_btl,
> > >         mca_bml_r2_del_proc_btl,
> > >         mca_bml_r2_register, <------------------------------------
> > >         mca_bml_r2_register_error,
> > >         mca_bml_r2_finalize,
> > >         mca_bml_r2_ft_event
> > >     }
> > >
> > > };
> > > <snip>
> > > after this ,i find the place where mca_bml_r2 is initialized,but i cannt 
> > > find anything related to mca_bml_r2_register.i just want to know reg = 
> > > mca_btl_base_active_message_trigger + tag;
> > > really is.and i want to modify the send function of self ,is this the 
> > > right way? or you can tell me the right way to modify the send function 
> > > of self component.
> > >
> > > Thanks & Regards
> > > Yaohui Hu
> > >
> > > On Wed, Mar 17, 2010 at 12:52 AM, Jeff Squyres <jsquy...@cisco.com> wrote:
> > > On Mar 16, 2010, at 9:45 AM, hu yaohui wrote:
> > >
> > > > it just said,i had a wrong command format,when i use mpirun --help,i 
> > > > really
> > > > didn't find the --mca parameter.why the tcp FAQ part list these command 
> > > > lines,
> > > > but it cann't execute successfully on my machine.Is there any another 
> > > > way to control the specific
> > > > btl components to be used?
> > >
> > > Make sure you're using the right mpirun -- you might have multiple 
> > > installed on your machine.
> > >
> > > OMPI's "mpirun --help" definitely includes a description of the --mca 
> > > parameter:
> > >
> > >   -mca|--mca <arg0> <arg1>
> > >                         Pass context-specific MCA parameters; they are
> > >                         considered global if --gmca is not used and only
> > >                         one context is specified (arg0 is the parameter
> > >                         name; arg1 is the parameter value)
> > >
> > > --
> > > Jeff Squyres
> > > jsquy...@cisco.com
> > > For corporate legal information go to:
> > > http://www.cisco.com/web/about/doing_business/legal/cri/
> > >
> > >
> > > _______________________________________________
> > > devel mailing list
> > > de...@open-mpi.org
> > > http://www.open-mpi.org/mailman/listinfo.cgi/devel
> > >
> > > _______________________________________________
> > > devel mailing list
> > > de...@open-mpi.org
> > > http://www.open-mpi.org/mailman/listinfo.cgi/devel
> >
> >
> > _______________________________________________
> > devel mailing list
> > de...@open-mpi.org
> > http://www.open-mpi.org/mailman/listinfo.cgi/devel
> >
> > _______________________________________________
> > devel mailing list
> > de...@open-mpi.org
> > http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> 
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


Reply via email to