0

I have an MPI code here , which i use to transfer a file from one node to other. but somehow i am not able to run on localscratch folders on each node. For example: I run the code as follows:

mpirun --host ser010,ser011 ./test <test.txt(inputfile)> <test2.txt(outputfile)>

the code runs on 2 nodes ser010,ser011 the inputfile is read by process 0 (ser010) and process 1 receives data from process 0 and writes as outputfile.

But this works when I am on NFS. (Parallel file system).

Every node (ser010, ser011) has its own localscratch folder (not on nfs). so files in each of the nodes are not shared.

How do I send a file from ser010's scratch to ser011's scratch ?

Please suggest. I am using OpenMPI here.

Pogo
  • 475
  • 3
  • 19
  • The program at the link you provided works because each node has equivalent access to files on the NFS server. However, if you're trying to write to a node's local space, you're going to need to establish a way to indicate which node to send the file from, and which way to send the file to. If no nodes share the scratch folder, then performance cannot be any better than sending a file in serial. – millinon Jan 26 '14 at 04:23
  • i am not concerned about performance as such (for now). just need a way to send a file from node1 to node2. the code runs on both the nodes simultaneously. node1 sends the file, node2 receives it.. just that i want it to be scratch directories of both of them (and not NFS) – Pogo Jan 26 '14 at 05:51
  • The version you provided has every node read from the same file and write to the same file - there's no functionality for distinguishing one node from another. Instead of just running it with two hosts, you could run it with a hundred, and the behavior should be the same. However, your task of sending a file from one particular node to another requires that you have a way to distinguish between the source node and destination node. What this will boil down to is having some code like `if(thisNode == sourceNode) sendFile(); else if(thisNode == destNode) recvFile();` which is a serial process. – millinon Jan 26 '14 at 07:37

0 Answers0