[gecode-users] Parallel search

Christian Schulte cschulte at kth.se
Sun Mar 29 21:43:33 CEST 2015


There are two options here. Either you provide the right options to BAB so
that multiple threads are used, or you use the Script::run function as the
Gecode examples do.

 

You need to read MPG more carefully, in fact.

 

Christian

 

--

Christian Schulte, www.ict.kth.se/~cschulte/

 

From: mehdi m [mailto:medistif at hotmail.fr] 
Sent: Sunday, March 29, 2015 9:06 PM
To: cschulte at kth.se; users at gecode.org
Subject: RE: [gecode-users] Parallel search

 

Hi,

I return to the question because I still can't use the parallel search, i
used the same commandline options in the gecode example (chapter 3) as you
advice me. When i run the example "Golumb ruler" it works perfectly.

 

Here is what i'm using in my model :

 

/***/

branch(*this, var, INT_VAR_DEGREE_MAX(), INT_VAL_MAX());

/***/

Options opt("Solutions : \n");

opt.solutions(0);

opt.parse(argc,argv);

                                  

Model* m = new Model(opt);

BAB<Model> bab(m);

delete m;

                                  

while (Model* s = bab.next()) {

                      s->print(); 

                      delete s;

}

/***/

and i run the model using the command : 

./Model -threads 4

 

If you have some ideas, it will be very helpful.

Thanks.

------------

 

  _____  

From: cschulte at kth.se
To: medistif at hotmail.fr; gtack at odiug.de; users at gecode.org
Subject: RE: [gecode-users] Parallel search
Date: Mon, 16 Mar 2015 10:29:25 +0100

Well, if you want the commandline options to work, you will have to use a
setup as in the Gecode example (check Chapter 3 in MPG). If you do it
otherwise, read Section 9.3.1 in MPG.

 

Christian

 

--

Christian Schulte, www.gecode.org/~schulte

Professor of Computer Science, KTH, cschulte at kth.se

Expert Researcher, SICS, cschulte at sics.se

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of mehdi m
Sent: Monday, March 16, 2015 8:59 AM
To: Guido Tack; users at gecode.org
Subject: Re: [gecode-users] Parallel search

 

I looked for the task manager and i found that just one core is used. Do i
need to add something else to the code ?

 

Thanks.

 

  _____  

Subject: Re: [gecode-users] Parallel search
From: gtack at odiug.de
Date: Mon, 16 Mar 2015 08:44:27 +1100
CC: users at gecode.org
To: medistif at hotmail.fr

Have a look at the Windows task manager, can you see if your model.exe is
actually making use of all four cores?  If yes, it is possible that it's
just a peculiarity of your model, i.e., that it simply doesn't parallelise
well.  You can try different search strategies, that can sometimes make a
difference for parallelisation as well.

 

Cheers,

Guido

 

On 16 Mar 2015, at 2:28 am, mehdi m <medistif at hotmail.fr> wrote:

 

Hi everyone,

 

I'm trying to make the serach more efficient using several threads (Parallel
seacrh) presented in section 9.2 in MPG.

On my machine with four cores and employing gecode 4.0.0, i use the option :

 

model.exe  -threads 4

 

I'm using the serach engine BAB and calling branch (home, Var,
INT_VAR_DEGREE_MAX(), INT_VAL_MAX() );

 

But it seems that it does not work, the runtime still the same without this
option.

 

If you have some details about this, it will be helpful. 

 

Thanks

_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20150329/0aa3c8d8/attachment-0001.html>


More information about the users mailing list