{"id":101,"date":"2013-07-03T16:26:51","date_gmt":"2013-07-03T16:26:51","guid":{"rendered":"http:\/\/press3.mcs.anl.gov\/romio\/?p=101"},"modified":"2013-07-03T16:26:51","modified_gmt":"2013-07-03T16:26:51","slug":"large-transfers-in-romio","status":"publish","type":"post","link":"https:\/\/wordpress.cels.anl.gov\/romio\/2013\/07\/03\/large-transfers-in-romio\/","title":{"rendered":"Large transfers in ROMIO"},"content":{"rendered":"<p>Let&#8217;s say you had a fat node with lots of memory, and you wanted to write 2 GiB of data out to a file with MPI-IO.\u00a0 How would you do that?\u00a0 You would naturally look at<\/p>\n<pre>MPI_File_write()<\/pre>\n<p>or one of its variants. This is the prototype for MPI_File_write_all:<\/p>\n<pre>int MPI_File_write_all(MPI_File fh, const void *buf, int count,\n                       MPI_Datatype datatype, MPI_Status *status)<\/pre>\n<p>Perfect! Even though C &#8216;int&#8217; types are 32 bits on most platforms, 2^31 (or anything less than 2147483649) will fit into a signed int. But until recently, when we try to do this in ROMIO, we fail.<br \/>\nIt turns out we were, despite ROMIO being 15 years old, using POSIX system calls incorrectly. The <code>write(2)<\/code> system call doesn&#8217;t actually have to write out all the data you asked it to. It&#8217;s perfectly legal to return success, but only write a few bytes of your request. For most transfers, though, a successful write and a &#8220;full write&#8221; were the same thing, and so we got by for years without testing for &#8220;short writes&#8221;. Until recently:<\/p>\n<ul>\n<li><a href=\"https:\/\/trac.mpich.org\/projects\/mpich\/ticket\/1742\">An MPICH bug report<\/a><\/li>\n<li><a href=\"http:\/\/www.open-mpi.org\/community\/lists\/users\/2013\/05\/21939.php\">An OpenMPI user <\/a><\/li>\n<li><a href=\"http:\/\/www.open-mpi.org\/community\/lists\/users\/2011\/09\/17400.php\">Another OpenMPI user from two years ago!<\/a><\/li>\n<\/ul>\n<p>I recently <a href=\"http:\/\/git.mpich.org\/mpich.git\/commit\/7d44307f269cae96118beb19760221aff99bd74a\">fixed this in git <\/a>, so folks who were having difficulty with large-ish transfers (in 2013, 2 GiB isn&#8217;t <em>that<\/em> large) should enjoy the next MPICH release.<br \/>\nNote that this fix is not the same as transferring more than 2 GiB of data.\u00a0 That work requires a bit more attention to the MPI type system.\u00a0 I&#8217;ll write up a bit about that some other time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s say you had a fat node with lots of memory, and you wanted to write 2 GiB of data out to a file with MPI-IO.\u00a0 How would you do that?\u00a0 You would naturally look at MPI_File_write() or one of its variants. This is the prototype for MPI_File_write_all: int MPI_File_write_all(MPI_File fh, const void *buf, int &hellip;<\/p>\n","protected":false},"author":362,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-development"],"acf":[],"_links":{"self":[{"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.cels.anl.gov\/romio\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}