parallel processing - Computing usage of independent cores and binding a process to a core -


i working mpi, , have hierarchy of operations. particular value of parameter _param, launch 10 trials, each running specific process on distinct core. n values of _param, code runs in hierarchy as:

driver_file -> launches 1 process checks if available processes more 10. if more 10 available, launches instance of process specific _param value passed argument coupling_file

coupling_file -> elementary computation, , launches 10 processes using mpi_comm_spawn(), each corresponding trial_file while passing _trial argument

trial_file -> computes work, returns values coupling_file

i facing 2 dilemmas, namely:

  1. how evaluate required condition cores in driver_file? in, how find out how many processes have been terminated, can correctly schedule processes on idle cores? thought maybe adding blocking mpi_recv() , use pass variable tell me when process has been finished, i'm not sure if best solution.

  2. how ensure processes assigned different cores? had thought using mpiexec --bind-to-core --bycore -n 1 coupling_file launch 1 coupling_file. followed mpiexec --bind-to-core --bycore -n 10 trial_file launched coupling_file. however, if binding processes core, don't want same core have two/more processes. in, don't want _trial_1 of _coupling_1 run on core x, launch process of coupling_2 launches _trial_2 gets bound core x.

any input appreciated. thanks!

if option you, i'd drop spawning processes thing altogether, , instead start processes @ once. can partition them chunks working on single task. translation of concept example be:

  • use 1 master (rank 0)
  • partition rest groups of 10 processes, maybe create new communicator each group if needed, each group has 1 leader process, known master.

in code can like:

if master:     send specific _param each group leader (with non-blocking send)     loop on different _params         use mpi_waitany or mpi_waitsome find groups ready else     if groupleader:         loop endlessly             mpi_recv _params master             coupling_file             mpi_bcast group             process trial_file     else         loop endlessly             mpi_bcast (get data groupleader)             process trial file 

i think, following approach allow solve both issues. availability of process groups gets detected mpi_wait*, though might want change logic above, notify master @ end of task sends new data then, not during previous trial still running, , process group might faster. , pinning resolved have fixed number of processes, can pinned during usual startup.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -