investigation of parallel processing using
play

Investigation of Parallel Processing Using How to Enable/Access - PowerPoint PPT Presentation

Why Open MPI? Investigation of Parallel Processing Using How to Enable/Access Open MPI in Open MPI ADMB. How is Open MPI Used in ADMB Now? Derek Seiple How it Works Development and Future ADMB Developers Workshop Directions March


  1. Why Open MPI? Investigation of Parallel Processing Using How to Enable/Access Open MPI in Open MPI ADMB. How is Open MPI Used in ADMB Now? Derek Seiple How it Works Development and Future ADMB Developers Workshop Directions March 2012

  2. Previous Parallelization Efforts Why Open MPI? How to Enable/Access Previous effort was made to run ADMB with pthreads. Open MPI in ADMB. How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  3. Previous Parallelization Efforts Why Open MPI? How to Enable/Access Previous effort was made to run ADMB with pthreads. Open MPI in ADMB. How is Open Implemented a thread pool, but it didn’t work. MPI Used in ADMB Now? How it Works Development and Future Directions

  4. Previous Parallelization Efforts Why Open MPI? How to Enable/Access Previous effort was made to run ADMB with pthreads. Open MPI in ADMB. How is Open Implemented a thread pool, but it didn’t work. MPI Used in ADMB Now? How it Works Discovered that there were static global variables. Development and Future Directions

  5. Why Open MPI is the Solution Open MPI is an open source Message Passing Interface library Why Open MPI? which must be installed. How to Enable/Access Open MPI in ADMB. How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  6. Why Open MPI is the Solution Open MPI is an open source Message Passing Interface library Why Open MPI? which must be installed. How to Enable/Access Open MPI in ADMB. Open MPI gets around this by having separate memory How is Open (processes). MPI Used in ADMB Now? How it Works Development and Future Directions

  7. Why Open MPI is the Solution Open MPI is an open source Message Passing Interface library Why Open MPI? which must be installed. How to Enable/Access Open MPI in ADMB. Open MPI gets around this by having separate memory How is Open (processes). MPI Used in ADMB Now? How it Works A master process spawns slaves (copies) each containing its Development own memory. and Future Directions

  8. Why Open MPI is the Solution Open MPI is an open source Message Passing Interface library Why Open MPI? which must be installed. How to Enable/Access Open MPI in ADMB. Open MPI gets around this by having separate memory How is Open (processes). MPI Used in ADMB Now? How it Works A master process spawns slaves (copies) each containing its Development own memory. and Future Directions The master and slaves then communicate the important pieces of information.

  9. The Building Blocks Why Open Master Slave MPI? int is_master(void) int is_slave(void) How to Enable/Access void send_int_to_slave(int i, --> void get_int_from_master(int &i) Open MPI in int _slave_number) ADMB. void send_double_to_slave(const double v, --> double get_double_from_master(void) How is Open int _slave_number) MPI Used in ADMB Now? void send_ivector_to_slave(const ivector& v, --> ivector get_ivector_from_master(void) int _slave_number) How it Works Development void send_dvector_to_slave(const dvector& v, --> dvector get_dvector_from_master(void) and Future int _slave_number) Directions

  10. The Building Blocks Why Open Master Slave MPI? int is_master(void) int is_slave(void) How to Enable/Access void send_int_to_slave(int i, --> void get_int_from_master(int &i) Open MPI in int _slave_number) ADMB. void send_double_to_slave(const double v, --> double get_double_from_master(void) How is Open int _slave_number) MPI Used in ADMB Now? void send_ivector_to_slave(const ivector& v, --> ivector get_ivector_from_master(void) int _slave_number) How it Works Development void send_dvector_to_slave(const dvector& v, --> dvector get_dvector_from_master(void) and Future int _slave_number) Directions void get_int_from_slave(int &i, <-- void send_int_to_master(int i) int _slave_number) double get_double_from_slave(int _slave_number) <-- void send_double_to_master(const double v) dvector get_dvector_from_slave( <-- void send_dvector_to_master(const dvector& v) int _slave_number)

  11. How to Building ADMB to use Open MPI Why Open All portions of code containing Open MPI functionality should MPI? be enclosed in the macro USE_ADMPI . How to Enable/Access Open MPI in ADMB. How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  12. How to Building ADMB to use Open MPI Why Open All portions of code containing Open MPI functionality should MPI? be enclosed in the macro USE_ADMPI . How to Enable/Access Open MPI in ADMB. #if defined(USE_ADMPI) How is Open ... MPI Used in ADMB Now? // MPI code How it Works ... Development and Future #endif Directions

  13. How to Building ADMB to use Open MPI Why Open All portions of code containing Open MPI functionality should MPI? be enclosed in the macro USE_ADMPI . How to Enable/Access Open MPI in ADMB. #if defined(USE_ADMPI) How is Open ... MPI Used in ADMB Now? // MPI code How it Works ... Development and Future #endif Directions Must pass -DUSE_ADMPI (in g++ ) to compiler.

  14. How to Building ADMB to use Open MPI Why Open Open MPI recommends using one of their “wrapper compilers” MPI? e.g. mpicxx . How to Enable/Access Open MPI in ADMB. How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  15. How to Building ADMB to use Open MPI Why Open Open MPI recommends using one of their “wrapper compilers” MPI? e.g. mpicxx . How to Enable/Access Open MPI in ADMB. The configure script handles all of this (on Linux for now). How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  16. How to Building ADMB to use Open MPI Why Open Open MPI recommends using one of their “wrapper compilers” MPI? e.g. mpicxx . How to Enable/Access Open MPI in ADMB. The configure script handles all of this (on Linux for now). How is Open MPI Used in ADMB Now? To build: How it Works Development make --directories scripts/configure and Future Directions ./configure --enable-mpi make

  17. Use of -master and -nslaves Program will only run in parallel if you specify: -master Why Open MPI? -master -nslaves <num_slaves> How to Enable/Access Open MPI in ADMB. How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  18. Use of -master and -nslaves Program will only run in parallel if you specify: -master Why Open MPI? -master -nslaves <num_slaves> How to Enable/Access Open MPI in ADMB. Example How is Open MPI Used in ADMB Now? ./program -master How it Works Development and Future will run with one master process and one slave process. Directions

  19. Use of -master and -nslaves Program will only run in parallel if you specify: -master Why Open MPI? -master -nslaves <num_slaves> How to Enable/Access Open MPI in ADMB. Example How is Open MPI Used in ADMB Now? ./program -master How it Works Development and Future will run with one master process and one slave process. Directions ./program -master -nslaves <num_slaves> will run with one master process and <num_slaves> slave processes.

  20. How is Open MPI Used in ADMB Now? Why Open MPI? How to Enable/Access Open MPI in ADMB. How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  21. How is Open MPI Used in ADMB Now? The Hessian calculation for standard ADMB models (Thanks to Dave). Why Open MPI? How to Enable/Access Open MPI in ADMB. How is Open MPI Used in ADMB Now? How it Works Development and Future Directions

  22. How is Open MPI Used in ADMB Now? The Hessian calculation for standard ADMB models (Thanks to Dave). Why Open Example MPI? How to Enable/Access Open MPI in ./catage -master -nslaves 2 ADMB. How is Open The master does the minimization. Slave(s) wait for master MPI Used in ADMB Now? then split up the Hessian calculation. How it Works Development and Future Directions

  23. How is Open MPI Used in ADMB Now? The Hessian calculation for standard ADMB models (Thanks to Dave). Why Open Example MPI? How to Enable/Access Open MPI in ./catage -master -nslaves 2 ADMB. How is Open The master does the minimization. Slave(s) wait for master MPI Used in ADMB Now? then split up the Hessian calculation. How it Works Development Estimating row 1 out of 38 for hessian and Future Directions Estimating row 20 out of 38 for hessian Estimating row 2 out of 38 for hessian Estimating row 3 out of 38 for hessian Estimating row 21 out of 38 for hessian ...

  24. How is Open MPI Used in ADMB Now? Separable Models: With a slight change to the tpl file. PROCEDURE_SECTION Why Open int j=0; MPI? for (int i=1;i<=nh;i++) { How to fun(i,j,u(i),log_theta1,beta); Enable/Access } Open MPI in ADMB. How is Open MPI Used in ADMB Now? SEPARABLE_FUNCTION void fun( int i,int & j ,const prevariable& ui, How it Works const prevariable& log_theta1, const dvar_vector& beta) Development f += 0.9189385 + 0.5*square(ui); // N(0,1) likelihood contribution from u’s and Future ... Directions for (ii=1;ii<=nump(i);ii++) { j++; dvariable log_lambda=beta(0)+beta(1)*TRT(j)+beta(2)*CARD(j)+log(gi); dvariable lambda=mfexp(log_lambda); f += lambda*S(j) - log_lambda; } ...

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend