15.11.2013 Views

Esqueleto Algorítmico - ulpgc

Esqueleto Algorítmico - ulpgc

Esqueleto Algorítmico - ulpgc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Implementación Secuencial y Paralela de Técnicas Algorítmicas:<br />

Aplicación a Problemas de Optimización Combinatoria<br />

Seminario Invitado: Dpto Métodos Cuantitativos en Economía y Gestión<br />

Introducción<br />

Interfaz de Usuario<br />

Patrones<br />

Secuenciales<br />

Patrones<br />

Paralelos<br />

Experimentos<br />

Computacionales<br />

Conclusiones<br />

Código MPI Centralizado de MaLLBa:BnB: Esclavo<br />

1 while (1) {<br />

2 MLB_Probe(MASTER,MPI_ANY_TAG, flag, status)<br />

3 if (flag) {<br />

4 switch(status.MPI_TAG) {<br />

5 if (END_TAG){ // Ending message<br />

6 ip.recv(MASTER, MPI_END_TAG);<br />

7 return;<br />

Patrón B&B Paralelo<br />

Centralizado<br />

Patrón B&B Paralelo<br />

Distribuido<br />

Patrón B&B Memoria<br />

Compartida<br />

Patrón D&C Paralelo<br />

Mª Isabel Dorta González<br />

Marzo, 2007<br />

8 }<br />

9 if (PBM_TAG){ // Receive the problem to branch<br />

10 ip.recv(MASTER, MPI_PBM_TAG, auxSp, bestSol, auxSol);<br />

11 high = auxSp.upper_bound(pbm, auxSol);<br />

12 if ( high > bestSol ) {<br />

13 low = auxSp.lower_bound(pbm, auxSol);<br />

14 if ( low > bestSol ) {<br />

15 bestSol = low;<br />

16 sol = auxSol;<br />

17 } }

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!