<div dir="ltr"><div><div><div><h2 id=":4p9" class="" tabindex="-1"></h2>Dear QE developers,<br><br></div>This might be a trivial question but what is the best way in QE for multiple cores to read the same file (different part). <br><br></div>As a example, I have a file called <br></div><div>test.ext1<br><br></div><div>This file contains the following matrix<br></div><div>dim1 = 5<br></div><div>dim2 = 10<br></div><div>dim3 = 10<br></div><div>matrix(dim1,dim2, dim3)<br></div><div><div><div><div><br></div><div>Now, I would like to run 5 mpi job such that each of them contains after reading the file "test.ext1" in memory the following matrix<br><div>dim1 = 5<br></div><div>dim2 = 10<br></div><div>dim3 = 2<br></div>matrix(dim1,dim2, dim3)<br></div><div><br></div><div>So each node has 1/5 of the full matrix written on file. <br><br></div><div>One way I found to make that work is to copy test.ext1 five times with following name<br>test.ext1 test.ext2 test.ext3 test.ext4 test.ext5 <br></div><div>and then read each of them like this<br><br></div><div>%Split dim3 across pools so that I get dim3_start and dim3_end for each processor<br></div><div><br>lrec = 5 * 10 * 2 <br>filint = trim(prefix)//'.ext'<br>CALL diropn (iun, 'test, lrec, exst)<br></div><div><br>DO ir =dim3_start, dim3_end<br></div><div> CALL davcio ( matrix_node, lrec, iun, ir, -1 )<br></div><div>END<br></div><div><br clear="all"></div><div>This works but is very inefficient since I copy 5 times the full file. <br></div><div>The problem is that diropn seems to append "nd_nmbr" which suggest that<br></div><div>concurrent access to the same file might not be a good idea?<br></div><div><br></div><div>Is it possible to access different part of the same file at the same time by different node in<br></div><div>the pool in QE?<br><br></div><div>Thank you, <br><br></div><div>Best, <br><br></div><div>Samuel<br></div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><span><font color="#888888"><pre cols="72">------------------------------------------------------------------------------------------------
Dr. Samuel Poncé
Department of Materials
University of Oxford
Parks Road
Oxford OX1 3PH, UK
Phone: +44 1865 612789<br> email: <a href="mailto:samuel.ponce@materials.ox.ac.uk" target="_blank">samuel.ponce@materials.ox.ac.uk</a> <a href="mailto:fabio.caruso@materials.ox.ac.uk" target="_blank"></a>
web: <a href="http://giustino.materials.ox.ac.uk/index.php/Site/SamuelPonc%e9" target="_blank">http://giustino.materials.ox.ac.uk/index.php/Site/SamuelPonc%e9</a>
------------------------------------------------------------------------------------------------</pre></font></span></div></div>
</div></div></div></div></div>