Run multiple instances in parallel

How can I run multiple instance of the same problem in parallel at the same time?

0

Comments

6 comments
  • Hello Ramy,
    Can you clarify how you are using dwave now and how you might be prevented from launching problems in parallel?

    I use it from python calls on a linux machine and I have been able to launch multiple jobs in parallel in the past. However remember dwave may schedule the jobs at its discretion sequencially and in some priority order they define to accomodate all customers.

    I have also experimented with multiple threads within python with no difficulties in the past.

    0
    Comment actions Permalink
  • Hello Mario,

    I just construct the Ising model, specify the embedding, schedule and the number of reads.

    My question is how to do problems in parallel because I'm not sure of how it is done?

    Thanks

    0
    Comment actions Permalink
  • Hello Ramy,

    Assuming I understand what you are describing, your model would be run as one process and perform the number of reads you specified as one sampling job. I am assuming that you want to run many such processes in parallel with different number of reads for each job (if this is not the case, I am not sure what you mean, please clarify).

    Two methods I have tried for paralleling are these:

    1 - Create python script accepting your parameters on the command line using the linux background process symbol "&" for each command.

    2 - Use the Multiprocessing package of python and  :

    import multiprocessing as mp

    and

    mp.Pool

    to launch parallel jobs using something along the lines of :

    results = [pool.apply(dwave_ising_job, args=(num_reads)) for num_read in data]

    Where data would be a list of the different "numread" parameters you want. Data could also be entire sets of parameters, depending on what you design.

    Does this help?

     

    0
    Comment actions Permalink
  • I'm not sure if I got it right.

    the methods you described are for running one ising job with different parameters in parallel?

    if so, is it possible to run many processes with fixed parameters (e.g. num_read, embedding, Ta...) for different inputs (h and j)?

    I hope it is clear what I mean 

    0
    Comment actions Permalink
  • Hello Ramy,

    I would create a list of models, each with the h,j variations, in addition to the parameter settings and launch each of them in parallel. Just realize your classical hardware needs enough resources (memory and processors) to prepare the multiple problems in parallel. It depends on how many variables your models requires.

    0
    Comment actions Permalink
  • Hello Mario,

    That was very useful thank you very much:)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post