4343#define  SPML_UCX_PUT_DEBUG     0
4444#endif 
4545
46+ static 
47+ spml_ucx_mkey_t  *  mca_spml_ucx_get_mkey_slow (int  pe , void  * va , void  * * rva );
48+ 
4649mca_spml_ucx_t  mca_spml_ucx  =  {
4750    {
4851        /* Init mca_spml_base_module_t */ 
@@ -74,7 +77,9 @@ mca_spml_ucx_t mca_spml_ucx = {
7477    NULL ,   /* ucp_peers */ 
7578    0 ,      /* using_mem_hooks */ 
7679    1 ,      /* num_disconnect */ 
77-     0        /* heap_reg_nb */ 
80+     0 ,      /* heap_reg_nb */ 
81+     0 ,      /* enabled */ 
82+     mca_spml_ucx_get_mkey_slow 
7883};
7984
8085int  mca_spml_ucx_enable (bool  enable )
@@ -330,6 +335,7 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
330335}
331336
332337
338+ static 
333339spml_ucx_mkey_t  *  mca_spml_ucx_get_mkey_slow (int  pe , void  * va , void  * * rva )
334340{
335341    sshmem_mkey_t  * r_mkey ;
@@ -550,7 +556,7 @@ int mca_spml_ucx_get(void *src_addr, size_t size, void *dst_addr, int src)
550556    ucs_status_t  status ;
551557    spml_ucx_mkey_t  * ucx_mkey ;
552558
553-     ucx_mkey  =  mca_spml_ucx_get_mkey (src , src_addr , & rva );
559+     ucx_mkey  =  mca_spml_ucx_get_mkey (src , src_addr , & rva ,  & mca_spml_ucx );
554560    status  =  ucp_get (mca_spml_ucx .ucp_peers [src ].ucp_conn , dst_addr , size ,
555561                     (uint64_t )rva , ucx_mkey -> rkey );
556562
@@ -563,7 +569,7 @@ int mca_spml_ucx_get_nb(void *src_addr, size_t size, void *dst_addr, int src, vo
563569    ucs_status_t  status ;
564570    spml_ucx_mkey_t  * ucx_mkey ;
565571
566-     ucx_mkey  =  mca_spml_ucx_get_mkey (src , src_addr , & rva );
572+     ucx_mkey  =  mca_spml_ucx_get_mkey (src , src_addr , & rva ,  & mca_spml_ucx );
567573    status  =  ucp_get_nbi (mca_spml_ucx .ucp_peers [src ].ucp_conn , dst_addr , size ,
568574                     (uint64_t )rva , ucx_mkey -> rkey );
569575
@@ -576,7 +582,7 @@ int mca_spml_ucx_put(void* dst_addr, size_t size, void* src_addr, int dst)
576582    ucs_status_t  status ;
577583    spml_ucx_mkey_t  * ucx_mkey ;
578584
579-     ucx_mkey  =  mca_spml_ucx_get_mkey (dst , dst_addr , & rva );
585+     ucx_mkey  =  mca_spml_ucx_get_mkey (dst , dst_addr , & rva ,  & mca_spml_ucx );
580586    status  =  ucp_put (mca_spml_ucx .ucp_peers [dst ].ucp_conn , src_addr , size ,
581587                     (uint64_t )rva , ucx_mkey -> rkey );
582588
@@ -589,7 +595,7 @@ int mca_spml_ucx_put_nb(void* dst_addr, size_t size, void* src_addr, int dst, vo
589595    ucs_status_t  status ;
590596    spml_ucx_mkey_t  * ucx_mkey ;
591597
592-     ucx_mkey  =  mca_spml_ucx_get_mkey (dst , dst_addr , & rva );
598+     ucx_mkey  =  mca_spml_ucx_get_mkey (dst , dst_addr , & rva ,  & mca_spml_ucx );
593599    status  =  ucp_put_nbi (mca_spml_ucx .ucp_peers [dst ].ucp_conn , src_addr , size ,
594600                     (uint64_t )rva , ucx_mkey -> rkey );
595601
0 commit comments