from mpi4py import MPI
import sys
def main():
datafileopls='MEDIUM2_opls.lmp'
lammpscomm = MPI.COMM_SELF.Spawn(sys.executable,
args=['/storage/home/duy42/Developer/MLReax/Src3/lammps_driver.py'
],maxprocs=9)
lammpscomm.send(datafileopls,0,0)
current_step = lammpscomm.recv(None,0,0)
print(current_step)
lammpscomm.Disconnect()
if __name__ =='__main__':
main()
def main():
parent = MPI.Comm.Get_parent()
comm = MPI.COMM_WORLD
assert parent != MPI.COMM_NULL
try:
status = MPI.Status()
any_src , any_tag = MPI.ANY_SOURCE, MPI.ANY_TAG
print(parent.Get_rank(),comm.Get_rank(),status.source)
if comm.Get_rank() == 0:
print('LAMMPS DRIVER CONNECTED')
datafileopls = parent.recv(None,any_src, any_tag, status)
current_step = 123
parent.send(current_step,status.source,0)
finally:
parent.Disconnect()
print('All done')
return if __name__ == "__main__": main()
--
You received this message because you are subscribed to the Google Groups "mpi4py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpi4py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpi4py/cbbd49eb-b14e-40ff-a87a-b6b2cf53e4a9o%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "mpi4py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpi4py/RR3R9JmJw6M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpi4py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpi4py/CAEcYPwCCPUu0KpY1eoE6d6K7pq1s1f89b9sGkPBpP0nJFhi3%3Dw%40mail.gmail.com.
HiI am using a redhat based cluster with infiniband, intel mpi.mpiexec -n 1 -usize python master.py