mpiT icon indicating copy to clipboard operation
mpiT copied to clipboard

more comments on the asyncsgd example ?

Open shuzi opened this issue 9 years ago • 1 comments

Hello thanks a lot for your example. I want to use MPI for multi nodes but I do not know how can I set the configure. Would you please add some explanation of the content in "local conf" and how can I set for multi node environment? That would be very useful for many people who want to use this package. Thanks a lot!

shuzi avatar Jul 24 '15 15:07 shuzi

hi, you may look at the header of pclient.lua and pserver file, which reads the local conf. you are flexible to modify it as you needs. use hostfile in mpi to setup multi node enviroment.

function pClient:__init(conf) self.state = {} self.rank = conf.rank or -1 self.sranks = conf.sranks or {} -- server ranks self.cranks = conf.cranks or {} -- client ranks self.plong = conf.plong or 0 -- size of whole parameter self.pstorage = conf.pstorage or torch.Storage() self.gstorage = conf.gstorage or torch.Storage() self.emptys = torch.Storage() self.sinfo = {} self.mtype = mpiT.FLOAT self.mworld = conf.world or mpiT.COMM_WORLD self.coq = Queue() -- coroutine queue self.maxsec = conf.maxsec or 60 self .ss = conf.ss or './pcstate.th' self.conf = conf end function pServer:__init(conf) self.state = {} self.rank = conf.rank or -1 self.cranks = conf.cranks or {} -- client ranks self.mtype = mpiT.FLOAT self.mworld = conf.world or mpiT.COMM_WORLD self.offset = -1 -- offset of param grad self.size = -1 -- size of param grad self.tensor = {} -- tensor from storage self.storage = {} -- param gradient storage self.emptys = torch.Storage() self.on = false self.coq = Queue() -- coroutine queue self.lr = conf.lr or 1e-2 self.conf = conf end

On Fri, Jul 24, 2015 at 11:43 AM, shuzi [email protected] wrote:

Hello thanks a lot for your example. I want to use MPI for multi nodes but I do not know how can I set the configure. Would you please add some explanation of the content in "local conf" and how can I set for multi node environment? That would be very useful for many people who want to use this package. Thanks a lot!

— Reply to this email directly or view it on GitHub https://github.com/sixin-zh/mpiT/issues/2.

sixin-zh avatar Jul 24 '15 22:07 sixin-zh