SlideShare a Scribd company logo
CLONAL SELECTION ALGORITHM
PARALLELIZATION
WITH MPJEXPRESS
Ayi Purbasari
Informatics Department, Pasundan University, Bandung Indonesia
pbasari@unpas.ac.id
Presented at CEEC 2016
Essex University, Colchester, United Kingdom
OUTLINE
Introduction
Research
Method
Result dan
Discussion
Conclussion
29/09/2016
2
ayipurbasari,icose2016
INTRODUCTION .. (1)
 In an optimisation problem, we need to
find, among many alternatives, a best or good
enough solution.
 However, if the problems arise on much bigger
scales, they are complex and need computer
algorithms to solve them.
 The Travelling Salesman Problem (TSP) in one
type of optimisation problem, where there is a
salesman who needs to find the shortest possible
route to visit each city exactly once and return to his
origin city [1].
 This problem is a combinatorial optimisation that
needs a sophisticated algorithm to solve it.
INTRODUCTION .. (2)
 To solve an optimisation problem, there are exact methods
that need no constraints or unlimited resources, such as time
and memory.
 But in the real world there are always limited resources, and
this limitation leads to the development of heuristic or
metaheuristic approaches as a major field in operation
research [2].
 These approaches provide optimal or sub-optimal feasible
solutions in a reasonable time that significantly reduces
the time of the search process.
 However, the high dimensions of many tasks will always pose
problems and result in time-consuming scenarios.
 Therefore, parallelism is an approach that not only aims
to reduce the resolution time but also to improve the quality of
the provided solutions.
INTRODUCTION .. (3)
 Most papers on parallel
metaheuristics do not
explain in detail the
stages of designing a
parallel algorithm itself.
 They describe the
process of transformation
of sequential algorithms
into parallel algorithms
generally.
 The focus of research is
on the end result and the
performance of
parallelism.
 In this paper, we will
explain the stages
and steps in building
a parallel algorithm.
 These detailed stages
will be a guide in
designing parallel
algorithms, so that the
resulting one will have a
good performance.
RESEARCH METHOD
• The algorithms:
CSA
• The problem: TSP
• Immune
Engineering
Input
• Parallel Designing
• Evaluating
Process • Parallel CSA Model
• Parallel CSA
Implementation
using MPJExpress
Output
CLONAL SELECTION ALGORITHM
(CSA) AS BIO-INSPIRED COMPUTING
7
BIO-INSPIRED COMPUTING
Artificial Immune
System
Genetic Algorithm
Neural Net
Anti Colony
Optimization
Bee Colony
Swarm Intelligent
29/09/2016ayipurbasari
8
CSA .. (1)
 A Clonal Selection Algorithm (CSA) is an algorithm
that inspired by a clonal selection mechanism to
provide an immune response.
 This inspiration results in some algorithms in the
class of Artificial Immune System (AIS) algorithms.
Fig. 1 Clonal Selection
IMMUNE SYSTEM AND
ARTIFICIAL IMMUNE SYSTEM
• Immune Network Theory (Jerne)
• Clonal Selection Theory (Burnet)
• Negative Selection
• Danger Theory (Matzinger)
Immune
System
• Immune Network Algorithm
• Clonal Selection Algorithm
(de Castro & Von Zuben)
• Negative Selection Algorithm
• Dendrit Cell Algorithm
Artificial
Immune
System
29/09/2016
10
ayipurbasari,icose2016
CSA .. (2)
 Clonal Selection Algorithm is one of the
population-based heuristic search algorithms that
has been able to solve combinatorial problems,
such us the Travelling Salesman Problem (TSP).
Fig. 2 Clonal Selection Algorithm
MAPPING CSA PARAMETERS
AND THE TSP PROBLEM
Clonal Selection
Algorithm step
TSP Problem
Population
initialization
Set of randomly generated tours. There are (n-1) possibilities that the
tours may be raised. This population is part of the whole tours. The
number of tours is generated by the specified population size.
Affinity evaluation Evaluation of affinity checks each tour that has occurred and finds the
cost required to form the tour.
Selection: affinity
maturation
Affinity is how close the cost of a tour is to the optimal/best cost. The
closer, the higher affinity will be selected.
Cloning and
Hypermutation
Cloning is a process to copy a selected tour, so the number of copies
depends on the clone factor: . Cloned/copied tour will be mutated
according to hypermutation probability mutate factor: 
RandomReplacement After this mutation, we will have the best tours, which will be replaced
by the worst tours in the initial population. The number of worst tours
replaced will depend on some random size replacement d.
Stop condition Clonal selection process will be repeated until a stop condition is
obtained. Stopping criteria could be the number of generations,
numbers of populations (tours) evaluated, or the best cost found.
PARALLEL DESIGNING
13
PARALLEL DESIGNING
 Starting with a problem
specification, we do
parallel design by
engaging in partition,
determining
communication
requirements,
agglomerating tasks
and, finally, mapping
tasks to processors.
PARALLEL DESIGNING
 In this research, we focus on the first and second
stages:
 Partitioning. The computation that is to be performed
and the data operated on by this computation are
decomposed into small tasks. Practical issues such as
the number of processors in the target computer are
ignored, and attention is focused on recognising
opportunities for parallel execution.
 Communication. The communication required to
coordinate task execution is determined and appropriate
communication structures and algorithms are defined.
PARALLEL DESIGNING
Parallel Designing:
Partition
domain/data
decomposition and
functional
decomposition.
Communication
Master-slave
communication
Multi-
communication
PARALLEL DESIGNING: PARTITION .. (1)
There are two
approaches in
partition:
domain/data
decomposition
and
functional
decomposition.
Clonal selection
deals with two
sets of data:
matrix of the
dataset and
population of
tours.
Since the
algorithm stages
need the whole
matrix of a
dataset to
evaluate the
affinity, we
couldn’t do
matrix
decomposition.
Since population
of tours are
dependent on
each other, we
could do
population
partition.
PARALLEL DESIGNING: PARTITION .. (2)
Functional
decomposition in
CSA deals with
stages of
• evaluation,
• selection,
• clone and mutation,
and
• randomreplacement.
Since all of
these stages
are dependent
each other, we
couldn’t do a
functional
decomposition
for each one.
PARALLEL DESIGNING: PARTITION .. (2)
There is some parallelism potential in each stage. It is possible to do
functional decomposition.
Then we have to calculate the granularity for each potential and compare
this to whole process. Granularity is a size of task for each stage.
Since we need much generation to evaluate the population, we will need G*
(NL+NlogN+nNL+NlogN+NlogN), where G is the number of generation.
We can conclude that functional decomposition in each stage is not
recommended since their granularities are too small compared to the whole
process.
Since we couldn’t do functional decomposition for CSA loop, we did
population decomposition.
Each processing element is assigned to a population partition that will be
computed for the CSA stages.
GRANULARITY FOR EACH STAGE
Stages Granularity Compare to whole process
Evaluation NL NL/ G*(NL+NlogN+nNL+NlogN+NlogN)
Selection NlogN NlogN/
G*(NL+NlogN+nNL+NlogN+NlogN)
Clone and
hypermutati
on
nNL nNL/
G*(NL+NlogN+nNL+NlogN+NlogN)
RandomRep
lacement
NlogN+Nlog
N
(NlogN+NlogN)/
G*(NL+NlogN+nNL+NlogN+NlogN)
PARALLEL DESIGNING: COMMUNICATION
Master-slave
communication
Multi-communication
Process 1
Process 2*
Process n
Process 0
Process 2
Process 1 Process n
Process 0
Process 2
Process 0*
MPI AND MPJEXPRESS
22
MPI AND MPJEXPRESS
We use the Message-Passing Interface (MPI),
the de facto message-passing standard for
concreteness and MPJExpress, as one of the
libraries that implemented MPI.
MPI is not a library but rather the specification of
what such a library should be.
MPJExpress is a library that is implemented with
MPI’s specification.
MPJEXPRESS
The Java Grande forum defined MPI-like API for Java as
mpiJava 1.2 API, which is the Java equivalent of the MPI 1.1
specification document.
MPJ Express is one type of a reference implementation of the
mpiJava 1.2 API.
MPJ Express is a message-passing library that can execute
parallel Java applications on computed clusters or networks of
computers used by application developers.
It is like a middleware that supports communication between
individual processors of clusters.
MPJ Express supported Single Program Multiple Data (SPMD).
MPJEXPRESS
Therearethreewaysto
configureMPJExpress:
multicore
configuration,
cluster
configuration and
hybrid
configuration.
 The Multicore
Configuration is used
to execute MPJ
Express user programs
on laptops and
desktops.
 In this research, we
use multicore
configuration
MPJEXPRESS METHOD: SEND
 Synopsis:
public void Send(java.lang.Object buf,
int offset, int count,
Datatype datatype, int dest,
int tag)throws MPIException
 Example in MPJExpress:
MPI.COMM_WORLD.Send(objectP, 0,
objectP.length, MPI.OBJECT, dest, tag);
MPJEXPRESS METHOD: RECV
 Synopsis:
public void Recv (java.lang.Object
buf,int offset,int count,Datatype
datatype,int source,int tag)throws
MPIException
 Example in MPJExpress:
MPI.COMM_WORLD.Recv(objectP, 0,
objectP.length, MPI.OBJECT, 0, tag);
MPJEXPRESS METHOD: ALLGATHER
 Synopsis:
public void Allgather(java.lang.Object
sendbuf,
int sendoffset,int sendcount,Datatype
sendtype,
java.lang.Object recvbuf,int recvoffset,
int recvcount,Datatype recvtype)
throws MPIException
 Example in MPJExpress:
MPI.COMM_WORLD.Allgather(sendBuff, 0,
unitSize, MPI.OBJECT, recvBuff, 0,
unitSize, MPI.OBJECT);
RESULT AND DISCUSSION
29
RESULT
 With datasets from TSPLIB, we implemented two
model of Clonal Selection Algoritm and result
 1) comparison two model,
 2) best cost for several dataset and
 3) execution time for several dataset.
RESULT
-
20.000
40.000
60.000
80.000
100.000
120.000
140.000
160.000
1
60
119
178
237
296
355
414
473
532
591
650
709
768
827
886
945
BestCost
Generation
Comparing BestCost
Model-1 Model-2
-
50.000
100.000
150.000
200.000
250.000
300.000
350.000
1 2 3 4 5 6 7
Bestcost
Dataset
Best cost
Model-1 Model-2
RESULT
 Using dataset
burma14, berlin52,
ulysses22, tsp225,
ch150, kroa100, and
pr76 from TSPLib, we
can see that model-2
gained lower best cost
for each dataset.
-
5.000
10.000
15.000
20.000
25.000
30.000
35.000
40.000
1 2 3 4 5 6 7
Executiontime(ms)
Dataset
Execution time
Model-1 Model-2
DISCUSSION
 We described how to implement MJExpress to parallel the clonal
selection algorithm, from parallel designing to implementation.
 The most important part of these steps is parallelism exploitation
analysis, especially each of the process granularities.
 For a population-based optimisation algorithm like this clonal selection
algorithms, the best paralleling is achieved by doing their clonal
operation at the same time for different population data and then
communicating with each other.
 We have two-way communications, by master-slave communications or
by multicommunication.
 In their implementations, we need a different method library.
 Using master-slave communication is less simple, or just using point-to-
point communication, but it needs synchronisation between population-
generation controlled by the master process.
 Using multicommunication, we could use a global communication,
allgather, which is more sophisticated but we need to be more careful to
define which data has to be sent between processes.
 From experiment result, we can see that using multicommunication
model, we gained lower best cost dan lower execution time
CONCLUSION
 To parallelise population-based algorithms, we need to exploit and define
their granularity for each stage.
 After that we do data or functional partition, if necessary, and use the
communication model.
 Using a library for the message-passing model, we should define
appropriate methods to implement process communication.
MPJExpress, as one of the implementations of the message-passing
interface specification, has several communication methods that fit in
with the SPMD model.
 MPJExpress also has a MPI.OBJECT datatype to support object-
oriented programming.
 This research finds results of pseudo-code using MPJExpress that can
be implemented using Java Language within their environments.
 Two kinds of communication between processes can be executed for
several datasets from the TSP problem, and then we can compare their
performances using execution time and the best cost achieved.
 We conclude that multicommunication model will have better
performance than master slave model.
THANK YOU

More Related Content

PDF
Parallel and distributed genetic algorithm with multiple objectives to impro...
DOC
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
PDF
Biclustering using Parallel Fuzzy Approach for Analysis of Microarray Gene Ex...
DOCX
IEEE 2014 JAVA DATA MINING PROJECTS A fast clustering based feature subset se...
PPTX
Review of fuzzy microscopic traffic flow models
PDF
survey of different data dependence analysis techniques
PDF
Extended pso algorithm for improvement problems k means clustering algorithm
Parallel and distributed genetic algorithm with multiple objectives to impro...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Biclustering using Parallel Fuzzy Approach for Analysis of Microarray Gene Ex...
IEEE 2014 JAVA DATA MINING PROJECTS A fast clustering based feature subset se...
Review of fuzzy microscopic traffic flow models
survey of different data dependence analysis techniques
Extended pso algorithm for improvement problems k means clustering algorithm

What's hot (15)

PDF
Testing the performance of the power law process model considering the use of...
PDF
final paper1
DOCX
A fast clustering based feature subset selection algorithm for high-dimension...
PPTX
Process mining approaches kashif.namal@gmail.com
DOCX
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A fast clustering based feature subse...
PDF
Optimization of Complex SVM Kernels Using a Hybrid Algorithm Based on Wasp Be...
PDF
Hybridization of Meta-heuristics for Optimizing Routing protocol in VANETs
PDF
DOCX
A fast clustering based feature subset selection algorithm for high-dimension...
PDF
Machine learning Mind Map
PDF
Deep learning MindMap
PDF
[WI 2014]Context Recommendation Using Multi-label Classification
PDF
AN OPTIMUM TIME QUANTUM USING LINGUISTIC SYNTHESIS FOR ROUND ROBIN CPU SCHEDU...
PDF
Convolutional Neural Network for Text Classification
PPTX
Genetic algorithms
Testing the performance of the power law process model considering the use of...
final paper1
A fast clustering based feature subset selection algorithm for high-dimension...
Process mining approaches kashif.namal@gmail.com
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A fast clustering based feature subse...
Optimization of Complex SVM Kernels Using a Hybrid Algorithm Based on Wasp Be...
Hybridization of Meta-heuristics for Optimizing Routing protocol in VANETs
A fast clustering based feature subset selection algorithm for high-dimension...
Machine learning Mind Map
Deep learning MindMap
[WI 2014]Context Recommendation Using Multi-label Classification
AN OPTIMUM TIME QUANTUM USING LINGUISTIC SYNTHESIS FOR ROUND ROBIN CPU SCHEDU...
Convolutional Neural Network for Text Classification
Genetic algorithms
Ad

Viewers also liked (7)

PPTX
Clonal selection
PPTX
Breeding assignment on clonal selection
PPTX
Cuckoo Search & Firefly Algorithms
PPTX
Firefly algorithm
PPT
Breeding method for clonal propagation crops, apomixis and clonal selection
PPTX
Firefly algorithm
PPTX
Clonal selection theory
Clonal selection
Breeding assignment on clonal selection
Cuckoo Search & Firefly Algorithms
Firefly algorithm
Breeding method for clonal propagation crops, apomixis and clonal selection
Firefly algorithm
Clonal selection theory
Ad

Similar to Clonal Selection Algorithm Parallelization with MPJExpress (20)

PDF
Genetic Approach to Parallel Scheduling
PDF
Problems in Task Scheduling in Multiprocessor System
PDF
M017327378
PDF
Scheduling Using Multi Objective Genetic Algorithm
PDF
MULTIPROCESSOR SCHEDULING AND PERFORMANCE EVALUATION USING ELITIST NON DOMINA...
PPT
Observations on dag scheduling and dynamic load-balancing using genetic algor...
PDF
International Journal of Computational Engineering Research(IJCER)
PDF
Parallel search
PDF
D0353027043
PPSX
9th ITAB 2009 Parallel-MEGA
PDF
Implementation of Computational Algorithms using Parallel Programming
PPTX
Introduction to Genetic algorithm and its significance in VLSI design and aut...
PDF
A MULTI-POPULATION BASED FROG-MEMETIC ALGORITHM FOR JOB SHOP SCHEDULING PROBLEM
PDF
Parallelization of Smith-Waterman Algorithm using MPI
PDF
Smith waterman algorithm parallelization
PPTX
Unit 2 - 2.2 (Basic Algorithms).pptxeeee
PDF
Traveling Salesman Problem in Distributed Environment
PDF
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
PPTX
unit 2 hpc.pptx
PDF
Improved Computing Performance for Listing Combinatorial Algorithms Using Mul...
Genetic Approach to Parallel Scheduling
Problems in Task Scheduling in Multiprocessor System
M017327378
Scheduling Using Multi Objective Genetic Algorithm
MULTIPROCESSOR SCHEDULING AND PERFORMANCE EVALUATION USING ELITIST NON DOMINA...
Observations on dag scheduling and dynamic load-balancing using genetic algor...
International Journal of Computational Engineering Research(IJCER)
Parallel search
D0353027043
9th ITAB 2009 Parallel-MEGA
Implementation of Computational Algorithms using Parallel Programming
Introduction to Genetic algorithm and its significance in VLSI design and aut...
A MULTI-POPULATION BASED FROG-MEMETIC ALGORITHM FOR JOB SHOP SCHEDULING PROBLEM
Parallelization of Smith-Waterman Algorithm using MPI
Smith waterman algorithm parallelization
Unit 2 - 2.2 (Basic Algorithms).pptxeeee
Traveling Salesman Problem in Distributed Environment
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
unit 2 hpc.pptx
Improved Computing Performance for Listing Combinatorial Algorithms Using Mul...

More from Ayi Purbasari (8)

PPTX
It 405 materi 1 pengantar
PDF
It 405 materi 1 pengantar
PPTX
It 405 materi 4 objek dan kelas ii
PDF
It 405 materi 3 objek dan kelas
PDF
It 405 materi 2 java dasar
PDF
It 405 materi 1 pengantar
PPTX
Using uml to model immune system
PDF
Pascapositivisme
It 405 materi 1 pengantar
It 405 materi 1 pengantar
It 405 materi 4 objek dan kelas ii
It 405 materi 3 objek dan kelas
It 405 materi 2 java dasar
It 405 materi 1 pengantar
Using uml to model immune system
Pascapositivisme

Recently uploaded (20)

PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT
Mechanical Engineering MATERIALS Selection
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
composite construction of structures.pdf
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Artificial Intelligence
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Digital Logic Computer Design lecture notes
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
DOCX
573137875-Attendance-Management-System-original
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
bas. eng. economics group 4 presentation 1.pptx
Sustainable Sites - Green Building Construction
CH1 Production IntroductoryConcepts.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Mechanical Engineering MATERIALS Selection
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
composite construction of structures.pdf
additive manufacturing of ss316l using mig welding
Artificial Intelligence
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Digital Logic Computer Design lecture notes
Lecture Notes Electrical Wiring System Components
Automation-in-Manufacturing-Chapter-Introduction.pdf
Safety Seminar civil to be ensured for safe working.
573137875-Attendance-Management-System-original
Foundation to blockchain - A guide to Blockchain Tech
R24 SURVEYING LAB MANUAL for civil enggi

Clonal Selection Algorithm Parallelization with MPJExpress

  • 1. CLONAL SELECTION ALGORITHM PARALLELIZATION WITH MPJEXPRESS Ayi Purbasari Informatics Department, Pasundan University, Bandung Indonesia pbasari@unpas.ac.id Presented at CEEC 2016 Essex University, Colchester, United Kingdom
  • 3. INTRODUCTION .. (1)  In an optimisation problem, we need to find, among many alternatives, a best or good enough solution.  However, if the problems arise on much bigger scales, they are complex and need computer algorithms to solve them.  The Travelling Salesman Problem (TSP) in one type of optimisation problem, where there is a salesman who needs to find the shortest possible route to visit each city exactly once and return to his origin city [1].  This problem is a combinatorial optimisation that needs a sophisticated algorithm to solve it.
  • 4. INTRODUCTION .. (2)  To solve an optimisation problem, there are exact methods that need no constraints or unlimited resources, such as time and memory.  But in the real world there are always limited resources, and this limitation leads to the development of heuristic or metaheuristic approaches as a major field in operation research [2].  These approaches provide optimal or sub-optimal feasible solutions in a reasonable time that significantly reduces the time of the search process.  However, the high dimensions of many tasks will always pose problems and result in time-consuming scenarios.  Therefore, parallelism is an approach that not only aims to reduce the resolution time but also to improve the quality of the provided solutions.
  • 5. INTRODUCTION .. (3)  Most papers on parallel metaheuristics do not explain in detail the stages of designing a parallel algorithm itself.  They describe the process of transformation of sequential algorithms into parallel algorithms generally.  The focus of research is on the end result and the performance of parallelism.  In this paper, we will explain the stages and steps in building a parallel algorithm.  These detailed stages will be a guide in designing parallel algorithms, so that the resulting one will have a good performance.
  • 6. RESEARCH METHOD • The algorithms: CSA • The problem: TSP • Immune Engineering Input • Parallel Designing • Evaluating Process • Parallel CSA Model • Parallel CSA Implementation using MPJExpress Output
  • 7. CLONAL SELECTION ALGORITHM (CSA) AS BIO-INSPIRED COMPUTING 7
  • 8. BIO-INSPIRED COMPUTING Artificial Immune System Genetic Algorithm Neural Net Anti Colony Optimization Bee Colony Swarm Intelligent 29/09/2016ayipurbasari 8
  • 9. CSA .. (1)  A Clonal Selection Algorithm (CSA) is an algorithm that inspired by a clonal selection mechanism to provide an immune response.  This inspiration results in some algorithms in the class of Artificial Immune System (AIS) algorithms. Fig. 1 Clonal Selection
  • 10. IMMUNE SYSTEM AND ARTIFICIAL IMMUNE SYSTEM • Immune Network Theory (Jerne) • Clonal Selection Theory (Burnet) • Negative Selection • Danger Theory (Matzinger) Immune System • Immune Network Algorithm • Clonal Selection Algorithm (de Castro & Von Zuben) • Negative Selection Algorithm • Dendrit Cell Algorithm Artificial Immune System 29/09/2016 10 ayipurbasari,icose2016
  • 11. CSA .. (2)  Clonal Selection Algorithm is one of the population-based heuristic search algorithms that has been able to solve combinatorial problems, such us the Travelling Salesman Problem (TSP). Fig. 2 Clonal Selection Algorithm
  • 12. MAPPING CSA PARAMETERS AND THE TSP PROBLEM Clonal Selection Algorithm step TSP Problem Population initialization Set of randomly generated tours. There are (n-1) possibilities that the tours may be raised. This population is part of the whole tours. The number of tours is generated by the specified population size. Affinity evaluation Evaluation of affinity checks each tour that has occurred and finds the cost required to form the tour. Selection: affinity maturation Affinity is how close the cost of a tour is to the optimal/best cost. The closer, the higher affinity will be selected. Cloning and Hypermutation Cloning is a process to copy a selected tour, so the number of copies depends on the clone factor: . Cloned/copied tour will be mutated according to hypermutation probability mutate factor:  RandomReplacement After this mutation, we will have the best tours, which will be replaced by the worst tours in the initial population. The number of worst tours replaced will depend on some random size replacement d. Stop condition Clonal selection process will be repeated until a stop condition is obtained. Stopping criteria could be the number of generations, numbers of populations (tours) evaluated, or the best cost found.
  • 14. PARALLEL DESIGNING  Starting with a problem specification, we do parallel design by engaging in partition, determining communication requirements, agglomerating tasks and, finally, mapping tasks to processors.
  • 15. PARALLEL DESIGNING  In this research, we focus on the first and second stages:  Partitioning. The computation that is to be performed and the data operated on by this computation are decomposed into small tasks. Practical issues such as the number of processors in the target computer are ignored, and attention is focused on recognising opportunities for parallel execution.  Communication. The communication required to coordinate task execution is determined and appropriate communication structures and algorithms are defined.
  • 16. PARALLEL DESIGNING Parallel Designing: Partition domain/data decomposition and functional decomposition. Communication Master-slave communication Multi- communication
  • 17. PARALLEL DESIGNING: PARTITION .. (1) There are two approaches in partition: domain/data decomposition and functional decomposition. Clonal selection deals with two sets of data: matrix of the dataset and population of tours. Since the algorithm stages need the whole matrix of a dataset to evaluate the affinity, we couldn’t do matrix decomposition. Since population of tours are dependent on each other, we could do population partition.
  • 18. PARALLEL DESIGNING: PARTITION .. (2) Functional decomposition in CSA deals with stages of • evaluation, • selection, • clone and mutation, and • randomreplacement. Since all of these stages are dependent each other, we couldn’t do a functional decomposition for each one.
  • 19. PARALLEL DESIGNING: PARTITION .. (2) There is some parallelism potential in each stage. It is possible to do functional decomposition. Then we have to calculate the granularity for each potential and compare this to whole process. Granularity is a size of task for each stage. Since we need much generation to evaluate the population, we will need G* (NL+NlogN+nNL+NlogN+NlogN), where G is the number of generation. We can conclude that functional decomposition in each stage is not recommended since their granularities are too small compared to the whole process. Since we couldn’t do functional decomposition for CSA loop, we did population decomposition. Each processing element is assigned to a population partition that will be computed for the CSA stages.
  • 20. GRANULARITY FOR EACH STAGE Stages Granularity Compare to whole process Evaluation NL NL/ G*(NL+NlogN+nNL+NlogN+NlogN) Selection NlogN NlogN/ G*(NL+NlogN+nNL+NlogN+NlogN) Clone and hypermutati on nNL nNL/ G*(NL+NlogN+nNL+NlogN+NlogN) RandomRep lacement NlogN+Nlog N (NlogN+NlogN)/ G*(NL+NlogN+nNL+NlogN+NlogN)
  • 21. PARALLEL DESIGNING: COMMUNICATION Master-slave communication Multi-communication Process 1 Process 2* Process n Process 0 Process 2 Process 1 Process n Process 0 Process 2 Process 0*
  • 23. MPI AND MPJEXPRESS We use the Message-Passing Interface (MPI), the de facto message-passing standard for concreteness and MPJExpress, as one of the libraries that implemented MPI. MPI is not a library but rather the specification of what such a library should be. MPJExpress is a library that is implemented with MPI’s specification.
  • 24. MPJEXPRESS The Java Grande forum defined MPI-like API for Java as mpiJava 1.2 API, which is the Java equivalent of the MPI 1.1 specification document. MPJ Express is one type of a reference implementation of the mpiJava 1.2 API. MPJ Express is a message-passing library that can execute parallel Java applications on computed clusters or networks of computers used by application developers. It is like a middleware that supports communication between individual processors of clusters. MPJ Express supported Single Program Multiple Data (SPMD).
  • 25. MPJEXPRESS Therearethreewaysto configureMPJExpress: multicore configuration, cluster configuration and hybrid configuration.  The Multicore Configuration is used to execute MPJ Express user programs on laptops and desktops.  In this research, we use multicore configuration
  • 26. MPJEXPRESS METHOD: SEND  Synopsis: public void Send(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)throws MPIException  Example in MPJExpress: MPI.COMM_WORLD.Send(objectP, 0, objectP.length, MPI.OBJECT, dest, tag);
  • 27. MPJEXPRESS METHOD: RECV  Synopsis: public void Recv (java.lang.Object buf,int offset,int count,Datatype datatype,int source,int tag)throws MPIException  Example in MPJExpress: MPI.COMM_WORLD.Recv(objectP, 0, objectP.length, MPI.OBJECT, 0, tag);
  • 28. MPJEXPRESS METHOD: ALLGATHER  Synopsis: public void Allgather(java.lang.Object sendbuf, int sendoffset,int sendcount,Datatype sendtype, java.lang.Object recvbuf,int recvoffset, int recvcount,Datatype recvtype) throws MPIException  Example in MPJExpress: MPI.COMM_WORLD.Allgather(sendBuff, 0, unitSize, MPI.OBJECT, recvBuff, 0, unitSize, MPI.OBJECT);
  • 30. RESULT  With datasets from TSPLIB, we implemented two model of Clonal Selection Algoritm and result  1) comparison two model,  2) best cost for several dataset and  3) execution time for several dataset.
  • 32. RESULT  Using dataset burma14, berlin52, ulysses22, tsp225, ch150, kroa100, and pr76 from TSPLib, we can see that model-2 gained lower best cost for each dataset. - 5.000 10.000 15.000 20.000 25.000 30.000 35.000 40.000 1 2 3 4 5 6 7 Executiontime(ms) Dataset Execution time Model-1 Model-2
  • 33. DISCUSSION  We described how to implement MJExpress to parallel the clonal selection algorithm, from parallel designing to implementation.  The most important part of these steps is parallelism exploitation analysis, especially each of the process granularities.  For a population-based optimisation algorithm like this clonal selection algorithms, the best paralleling is achieved by doing their clonal operation at the same time for different population data and then communicating with each other.  We have two-way communications, by master-slave communications or by multicommunication.  In their implementations, we need a different method library.  Using master-slave communication is less simple, or just using point-to- point communication, but it needs synchronisation between population- generation controlled by the master process.  Using multicommunication, we could use a global communication, allgather, which is more sophisticated but we need to be more careful to define which data has to be sent between processes.  From experiment result, we can see that using multicommunication model, we gained lower best cost dan lower execution time
  • 34. CONCLUSION  To parallelise population-based algorithms, we need to exploit and define their granularity for each stage.  After that we do data or functional partition, if necessary, and use the communication model.  Using a library for the message-passing model, we should define appropriate methods to implement process communication. MPJExpress, as one of the implementations of the message-passing interface specification, has several communication methods that fit in with the SPMD model.  MPJExpress also has a MPI.OBJECT datatype to support object- oriented programming.  This research finds results of pseudo-code using MPJExpress that can be implemented using Java Language within their environments.  Two kinds of communication between processes can be executed for several datasets from the TSP problem, and then we can compare their performances using execution time and the best cost achieved.  We conclude that multicommunication model will have better performance than master slave model.