ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

is there a parallelized version? #565

Closed kalok87 closed 10 years ago

kalok87 commented 10 years ago

Dear developers,

I want to know if there is a parallelized version of topographica?

Thanks kalok Kam

Tobias-Fischer commented 10 years ago

Hi,

Topographica supports multiple cores out of the box. See http://ioam.github.io/topographica/User_Manual/multicore.html for more details.

Best Tobias

kalok87 commented 10 years ago

Hallo, Tobias

When I was trying to use that, I got an error.

[default] virtualenv/topographica> ./topographica -p openmp_threads=4 -g ./examples/tiny.ty -c 'topo.sim.run(10000)' In file included from /usr/nld/python-2.7.6-desktop/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0, from /usr/nld/python-2.7.6-desktop/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /usr/nld/python-2.7.6-desktop/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/kalok/.cache/scipy/python27_compiled/sc_bb5fd3c1dc09900c1d701cf61b004f5a0.cpp:22: /usr/nld/python-2.7.6-desktop/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] Launching GUI WARNING:root:Time: 010000.00 TopoConsole00313: 'openmp_threads' is unused. Output path: /home/kalok/Documents/Topographica

Can you help me?

jbednar commented 10 years ago

Oops; that documentation was out of date. I've updated it and vastly simplified it:

https://github.com/ioam/topographica/blob/master/doc/User_Manual/multicore.rst

Basically, OpenMP is always enabled unless you turn it off, so you don't need to do anything.

The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

ceball commented 10 years ago

Hi

Unfortunately the openmp documentation is currently out of date and/or a bit confusing (see e.g. #542, #541). 

I think you can ignore the 'openmp_threads' parameter, and hence the warning about it. In fact, as far as I know, you shouldn't have to do anything to get openmp working - are you sure multiple cores are not already being used?

Chris

kalok87 commented 10 years ago

Thank you, it helps me a lot.

jbednar commented 10 years ago

The public web page is now finally up to date as well: http://ioam.github.io/topographica/User_Manual/multicore.html

BTW, in addition to the OpenMP support, we have solid MPI support, allowing you to use more than one independent machine. This has been improved on several occasions over the years, but I am not completely certain about its present status, i.e. whether it has been merged into the main code. I do know that none of us have ended up using it, because we tend to use multiple machines simply to run multiple independent simulations. So though MPI is required for running the largest simulations, in practice we've focused on large numbers of smaller sims. and thus not kept the MPI support polished and up to date.