<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi, Frances. in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Why-does-scif-register-return-0/m-p/1033715#M43099</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Hi, Frances.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thank you for your reply. We've check the returned value - 0 and status - Success from scif_register(). It seems like scif_register() works fine, but it returned local_offset - 0 as in code below. And we can send the returned local_offset using scif_send() back to peer, but when we actually scif_vwirteto(), it return "scif_vwriteto failed error". I attached our SendData and RecvData code as follows.Do you have any ideas?&lt;/P&gt;

&lt;P&gt;Thanks again.&lt;/P&gt;

&lt;P&gt;Bryan.&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;&amp;nbsp;   int RecvData(scif_epd_t epd, void *pData, int size)
    {
        int control_msg = 0;
        off_t local_offset;
        if(local_offset = scif_register(epd, pData, size, 0, SCIF_PROT_READ | SCIF_PROT_WRITE, 0) &amp;lt; 0)
        {
            printf("scif_register failed with error : %d\n", get_curr_status());
            printf("scif_register error: %s\n", strerror(errno));
            exit(-1);
        }
        printf("scif_register status: %d\n", get_curr_status());
        printf("scif_register statuc: %s\n", strerror(errno));
        BARRIER(epd, "register window done");
        scif_send(epd, &amp;amp;local_offset, sizeof(local_offset), 1);

        BARRIER(epd, "waiting on peer vwriteto");
        return size;
   }
&lt;/PRE&gt;

&lt;PRE class="brush:cpp;"&gt;    int SendData(scif_epd_t epd, void *pData, int size)
    {

        off_t remote_offset;
        int control_msg = 0, err;

        BARRIER(epd, "peer register window done");
        
&amp;nbsp;       scif_recv(epd, &amp;amp;remote_offset, sizeof(remote_offset), 1);
        if ((err = scif_vwriteto(epd, pData, 0x1000, remote_offset, 1))){
            printf("scif_vwriteto failed with error.");
        }

        BARRIER(epd, "vwriteto done");
        return size;
&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;   }&lt;/SPAN&gt;
&lt;/PRE&gt;

&lt;PRE class="brush:cpp;"&gt;&lt;SPAN style="font-family: Arial, 宋体, Tahoma, Helvetica, sans-serif; font-size: 1em; line-height: 1.5;"&gt;&lt;BLOCKQUOTE&gt;Frances Roth (Intel) wrote:&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;
&lt;/PRE&gt;

&lt;P&gt;Have you tried checking the value of errno when you return from scif_register? The man page for scif_register has explanations for the different error numbers.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If I had to make a wild guess, without benefit of any real facts, I would suspect that in your real code you are making calls to the coi library (which uses scif) or are using offload directives (which make calls to the coi library) and there is a conflict. But check errno and see what it says.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2015 04:05:34 GMT</pubDate>
    <dc:creator>Bryan_H_2</dc:creator>
    <dc:date>2015-06-11T04:05:34Z</dc:date>
    <item>
      <title>Why does scif_register() return 0?</title>
      <link>https://community.intel.com/t5/Software-Archive/Why-does-scif-register-return-0/m-p/1033713#M43097</link>
      <description>&lt;ARTICLE about="/en-us/blogs/2015/06/10/why-does-scif-register-return-0" class="node-559713 node node-blog node-unpublished view-mode-full node-by-viewer clearfix" style="box-sizing: border-box; background-color: rgb(255, 244, 244); max-width: 960px; margin: 0px auto; padding: 0px 20px; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 16px;" typeof="sioc:Item foaf:Document"&gt;
	&lt;DIV class="field field-name-body field-type-text-with-summary field-label-hidden" style="box-sizing: border-box;"&gt;
		&lt;DIV class="field-items" style="box-sizing: border-box;"&gt;
			&lt;DIV class="field-item even" property="content:encoded" style="box-sizing: border-box;"&gt;
				&lt;P style="box-sizing: border-box; margin-bottom: 20px; line-height: 1.4;"&gt;&lt;SPAN style="box-sizing: border-box;"&gt;Hi, All.&lt;/SPAN&gt;&lt;/P&gt;

				&lt;P style="box-sizing: border-box; margin-bottom: 20px; line-height: 1.4;"&gt;My team is trying to transfer bulk data between host and mic using SCIF RMA. All our demo code works fine. When we add the SCIF RMA to the real project, it connects successfully but it gets return 0 from scif_register() and scif_vwriteto() failed error.We have checked so many times. The code we are inserting is exactly the same with the demo code which works fine.&amp;nbsp;&lt;/P&gt;

				&lt;P style="box-sizing: border-box; margin-bottom: 20px; line-height: 1.4;"&gt;Did anyone encounter such problem when using scoff rma? Or would you please offer some advice?&lt;/P&gt;

				&lt;P style="box-sizing: border-box; margin-bottom: 20px; line-height: 1.4;"&gt;Thanks a lot:)&lt;/P&gt;

				&lt;P style="box-sizing: border-box; margin-bottom: 20px; line-height: 1.4;"&gt;Bryan&lt;/P&gt;

				&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
			&lt;/DIV&gt;
		&lt;/DIV&gt;
	&lt;/DIV&gt;
&lt;/ARTICLE&gt;</description>
      <pubDate>Wed, 10 Jun 2015 12:02:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Why-does-scif-register-return-0/m-p/1033713#M43097</guid>
      <dc:creator>Bryan_H_2</dc:creator>
      <dc:date>2015-06-10T12:02:38Z</dc:date>
    </item>
    <item>
      <title>Have you tried checking the</title>
      <link>https://community.intel.com/t5/Software-Archive/Why-does-scif-register-return-0/m-p/1033714#M43098</link>
      <description>&lt;P&gt;Have you tried checking the value of errno when you return from scif_register? The man page for scif_register has explanations for the different error numbers.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If I had to make a wild guess, without benefit of any real facts, I would suspect that in your real code you are making calls to the coi library (which uses scif) or are using offload directives (which make calls to the coi library) and there is a conflict. But check errno and see what it says.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 22:17:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Why-does-scif-register-return-0/m-p/1033714#M43098</guid>
      <dc:creator>Frances_R_Intel</dc:creator>
      <dc:date>2015-06-10T22:17:51Z</dc:date>
    </item>
    <item>
      <title>Hi, Frances.</title>
      <link>https://community.intel.com/t5/Software-Archive/Why-does-scif-register-return-0/m-p/1033715#M43099</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Hi, Frances.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thank you for your reply. We've check the returned value - 0 and status - Success from scif_register(). It seems like scif_register() works fine, but it returned local_offset - 0 as in code below. And we can send the returned local_offset using scif_send() back to peer, but when we actually scif_vwirteto(), it return "scif_vwriteto failed error". I attached our SendData and RecvData code as follows.Do you have any ideas?&lt;/P&gt;

&lt;P&gt;Thanks again.&lt;/P&gt;

&lt;P&gt;Bryan.&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;&amp;nbsp;   int RecvData(scif_epd_t epd, void *pData, int size)
    {
        int control_msg = 0;
        off_t local_offset;
        if(local_offset = scif_register(epd, pData, size, 0, SCIF_PROT_READ | SCIF_PROT_WRITE, 0) &amp;lt; 0)
        {
            printf("scif_register failed with error : %d\n", get_curr_status());
            printf("scif_register error: %s\n", strerror(errno));
            exit(-1);
        }
        printf("scif_register status: %d\n", get_curr_status());
        printf("scif_register statuc: %s\n", strerror(errno));
        BARRIER(epd, "register window done");
        scif_send(epd, &amp;amp;local_offset, sizeof(local_offset), 1);

        BARRIER(epd, "waiting on peer vwriteto");
        return size;
   }
&lt;/PRE&gt;

&lt;PRE class="brush:cpp;"&gt;    int SendData(scif_epd_t epd, void *pData, int size)
    {

        off_t remote_offset;
        int control_msg = 0, err;

        BARRIER(epd, "peer register window done");
        
&amp;nbsp;       scif_recv(epd, &amp;amp;remote_offset, sizeof(remote_offset), 1);
        if ((err = scif_vwriteto(epd, pData, 0x1000, remote_offset, 1))){
            printf("scif_vwriteto failed with error.");
        }

        BARRIER(epd, "vwriteto done");
        return size;
&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;   }&lt;/SPAN&gt;
&lt;/PRE&gt;

&lt;PRE class="brush:cpp;"&gt;&lt;SPAN style="font-family: Arial, 宋体, Tahoma, Helvetica, sans-serif; font-size: 1em; line-height: 1.5;"&gt;&lt;BLOCKQUOTE&gt;Frances Roth (Intel) wrote:&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;
&lt;/PRE&gt;

&lt;P&gt;Have you tried checking the value of errno when you return from scif_register? The man page for scif_register has explanations for the different error numbers.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If I had to make a wild guess, without benefit of any real facts, I would suspect that in your real code you are making calls to the coi library (which uses scif) or are using offload directives (which make calls to the coi library) and there is a conflict. But check errno and see what it says.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 04:05:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Why-does-scif-register-return-0/m-p/1033715#M43099</guid>
      <dc:creator>Bryan_H_2</dc:creator>
      <dc:date>2015-06-11T04:05:34Z</dc:date>
    </item>
  </channel>
</rss>

