title: simple_copy example on pmem.io
body: <p>I have created the emulated device given at <a href="http://pmem.io/2016/02/22/pm-emulation.html" rel="nofollow noreferrer">http://pmem.io/2016/02/22/pm-emulation.html</a>, successfully.</p>
  <p>It shows the device correctly:</p>
  <pre><code>:~/Prakash/nvml/src/examples/libpmem$ mount | grep pmem
  </code></pre>
  <p>/dev/pmem0 on /mnt/pmemd type ext4 (rw,relatime,dax,errors=continue,data=ordered)</p>
  <p>However, when I execute the simple_copy sample given with pmem nvml, it gives this error:</p>
  <blockquote>
  <p>amd@amd:~/Prakash/nvml/src/examples/libpmem$ ./simple_copy logs</p>
  <p>/dev/pmem0 pmem_map_file: File exists</p>
  <p>amd@amd:~/Prakash/nvml/src/examples/libpmem$ ./simple_copy logs</p>
  <p>/dev/pmem0/logs pmem_map_file: Not a directory</p>
  </blockquote>
  <p>Am I not using the program correctly?</p>
  <p>Also, I have mounted the device as dax and I clearly see the performance advantage with</p>
  <pre><code>:~/Prakash/nvml/src/examples/libpmem$ sudo dd if=/dev/zero of=/dev/pmem0 bs=2G count=1
  0+1 records in
  0+1 records out
  2147479552 bytes (2.1 GB, 2.0 GiB) copied, 0.910729 s, 2.4 GB/s
  :~/Prakash/nvml/src/examples/libpmem$ sudo dd if=/dev/zero of=/mnt/pmem0/test bs=2G count=1
  0+1 records in
  0+1 records out
  2147479552 bytes (2.1 GB, 2.0 GiB) copied, 6.39032 s, 336 MB/s
  </code></pre>