GP + local parallelization

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GP + local parallelization

Kido Kido
Hi all,

I'm a newbie just switched to JGAP and before that I used to developed my own GP platform.  On my own platform, I did the local parallelization by utilizing multi-threads support (ThreadPool ).  

I was wondering whether I could do the same on JGAP because I only can find bit and pieces mentioning about parallelization, and they're mostly on GA ~~~~!  Or any way to use multiple core on the server is welcomed...

Regards,
Kido



------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GP + local parallelization

Mauricio Noda
Try using JGAP Grid. It is based in multi-process/rpc parallelization instead of multi-thread, but works fine with a single server too.



From: [hidden email]
To: [hidden email]
Date: Tue, 10 Apr 2012 11:20:33 +0800
Subject: [jgap-users] GP + local parallelization

Hi all,

I'm a newbie just switched to JGAP and before that I used to developed my own GP platform.  On my own platform, I did the local parallelization by utilizing multi-threads support (ThreadPool ).  

I was wondering whether I could do the same on JGAP because I only can find bit and pieces mentioning about parallelization, and they're mostly on GA ~~~~!  Or any way to use multiple core on the server is welcomed...

Regards,
Kido



------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________ jgap-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/jgap-users

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GP + local parallelization

Kido Kido
In reply to this post by Kido Kido


Thank you.  I've had a brief look at it and it seems promising.  





Mauricio Noda [hidden email]
22:15 (12 小時前)
寄給 、 jgap-users
Try using JGAP Grid. It is based in multi-process/rpc parallelization instead of multi-thread, but works fine with a single server too.





------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GP + local parallelization

Kido Kido

Hi all,
I'm running Ubuntu 11.10.  The start_grid_*.bat were ok, with a small modification changing all semicolon(;) to colon(:) inside classpath.

start_grid_server.bat + start_grid_worker.bat + start_grid_example.bat 

seems successfully run.

Now I try to create start_grid_example_gp.bat which contain the following line:
java -cp ".:jgap.jar:jgap-examples.jar:lib/jcgrid.jar:lib/log4j.jar:lib/commons-cli-1.0.jar:lib/commons-lang-2.1.jar:lib/commons-cli-1.2.jar:lib/xstream-1.3.1.jar" org.jgap.distr.grid.gp.JGAPClientGP examples.grid.mathProblemDistributed.GridConfiguration -s localhost

And run:
start_grid_server.bat + start_grid_worker_gp.bat + start_grid_example_gp.bat
     
An error like this :
Please provide a name of the grid configuration class to useAn example class would be examples.grid.fitnessDistributed.GridConfiguration



Any clue to run GP Grid example? 
     
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GP + local parallelization

Klaus Meffert-5
Hi,

The GP grid example is not fully working. However, it can be started via:
--
rem
rem Please start "start_grid_server.bat", then "start_grid_worker_gp.bat"
and then this file!
rem
java -cp
".;jgap.jar;jgap-examples.jar;lib/jcgrid.jar;lib/log4j.jar;lib/commons-cli-1
.2.jar;lib/commons-lang-2.1.jar;lib/xstream-1.2.2.jar;lib/commons-codec-1.3.
jar" org.jgap.distr.grid.gp.JGAPClientGP -config
examples.grid.mathProblemDistributed.GridConfiguration
---

It seems as the only difference to your try is the skipped parameter "-s
localhost", but please compare exactly to be sure. Maybe you can get the GP
math problem running, currently an ArrayIndexOutOfBoundsException occurs.
Feedback is welcome.

Best

Klaus
www.klaus-meffert.com

 

> -----Original Message-----
> From: Kido Kido [mailto:[hidden email]]
> Sent: Thursday, April 12, 2012 7:59 PM
> To: [hidden email]
> Subject: Re: [jgap-users] GP + local parallelization
>
>
> Hi all,
> I'm running Ubuntu 11.10.  The start_grid_*.bat were ok, with
> a small modification changing all semicolon(;) to colon(:)
> inside classpath.
>
> start_grid_server.bat + start_grid_worker.bat +
> start_grid_example.bat 
>
> seems successfully run.
>
> Now I try to create start_grid_example_gp.bat which contain
> the following line:
> java -cp
> ".:jgap.jar:jgap-examples.jar:lib/jcgrid.jar:lib/log4j.jar:lib
> /commons-cli-1.0.jar:lib/commons-lang-2.1.jar:lib/commons-cli-
> 1.2.jar:lib/xstream-1.3.1.jar"
> org.jgap.distr.grid.gp.JGAPClientGP
> examples.grid.mathProblemDistributed.GridConfiguration -s localhost
>
> And run:
> start_grid_server.bat + start_grid_worker_gp.bat +
> start_grid_example_gp.bat
>      
> An error like this :
> Please provide a name of the grid configuration class to
> useAn example class would be
> examples.grid.fitnessDistributed.GridConfiguration
>
>
>
> Any clue to run GP Grid example? 
>      
> --------------------------------------------------------------
> ----------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> jgap-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GP + local parallelization

Kido Kido
In reply to this post by Kido Kido
Thanks.  It works, by removing the -s option and add the -config option to the command line.

And the ArrayIndexOutOfBoundsException occurs as expected. (at the client side)

Rgds,






Klaus Meffert [hidden email]
18:37 (16 小時前)
寄給 、 jgap-users
Hi,

The GP grid example is not fully working. However, it can be started via:
--
rem
rem Please start "start_grid_server.bat", then "start_grid_worker_gp.bat"
and then this file!
rem
java -cp
".;jgap.jar;jgap-examples.jar;lib/jcgrid.jar;lib/log4j.jar;lib/commons-cli-1
.2.jar;lib/commons-lang-2.1.jar;lib/xstream-1.2.2.jar;lib/commons-codec-1.3.
jar" org.jgap.distr.grid.gp.JGAPClientGP -config
examples.grid.mathProblemDistributed.GridConfiguration
---

It seems as the only difference to your try is the skipped parameter "-s
localhost", but please compare exactly to be sure. Maybe you can get the GP
math problem running, currently an ArrayIndexOutOfBoundsException occurs.
Feedback is welcome.

Best


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GP + local parallelization

Kido Kido
In reply to this post by Kido Kido
Hi  Klaus,

I'm reading the examples.grid.mathProblemDistributed.MyRequestSplitStrategy.java

I see that there are 20 requests and each request contain 10% of the population (i.e. 50)  and the new population only contain 50 programs..... And during evolving it is assumed the 500, is that causing the ArrayIndexOutOfBoundsException ?

kido

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GP + local parallelization

Klaus Meffert-5
Hi Kido,
 
yes, you are right. I managed to fix the problem. Now the solution needs some finishing.
I am content to provide the solution within the next days.
 
Best
 
 


From: Kido Kido [mailto:[hidden email]]
Sent: Tuesday, April 17, 2012 10:30 AM
To: [hidden email]
Subject: Re: [jgap-users] GP + local parallelization

Hi  Klaus,

I'm reading the examples.grid.mathProblemDistributed.MyRequestSplitStrategy.java

I see that there are 20 requests and each request contain 10% of the population (i.e. 50)  and the new population only contain 50 programs..... And during evolving it is assumed the 500, is that causing the ArrayIndexOutOfBoundsException ?

kido

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Mashalling/Unmarshalling of GP results in locked/uneditable Variable

Kido Kido
In reply to this post by Kido Kido
Hi disgruntled_young_man,

I saw your code on Marshalling/Unmarshalling a GP population, I modified yours so that now I marshall/unmarshall the Best individual in a population... They seemed ok for reading/writing.  

However, when I try to feed the best individual to the fitness function and see how it performs, it seemed didn't callup the fitness function.

Here is my unmarshalling code:

XStream xstream = new XStream(); 
File f = new File("best.xml");
InputStream oi = new FileInputStream(f);
IGPProgram best = (IGPProgram) xstream.fromXML(oi);        

// the following, although best_fitness_value is correct, 
//it didn't call the fitnessfunction.evaluate()
double best_fitness_value = best.getFitnessValue();  

// nor the following works..
// previously I did 
// Setting fitness function
//  FormulaFitnessFunction fff = new MyProblem.FormulaFitnessFunction();
//  config.setFitnessFunction(fff);

double best_fitness_2 = fff.getFitnessValue(best) ;  // this not work either, 


It seems like you got some idea.... can you share with us?

Rgds,
kido

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Loading...