Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9316511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:38:21+00:00 2026-06-19T02:38:21+00:00

Basically, I have a large object that I want to perform some function on,

  • 0

Basically, I have a large object that I want to perform some function on, that lends itself well to parallel processing. In this example, I have a large matrix and I want to compute all pairwise inner products between column vectors.

Please take a look at the following IPython Notebook.

I realise that the @interactive decorator is not necessary in this context and I tried removing the @require decorator but its impact is negligible.

My question is: Is there any way available to improve the performance of the parallel machinery?

I don’t know the implementation details of the map methods, could I avoid overhead by pushing the function that is executed in parallel to the engines in the view? I can’t imagine that it is sent with every argument, though.

Chunking the argument list myself and writing a function for remote use that works on that seems silly as well.

I tried the notebook on a four core machine and the results in the notebook are for a two core machine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:38:22+00:00Added an answer on June 19, 2026 at 2:38 am

    The main performance issue here is that the fortran-contiguous optimization you applied does not survive the network transfer, so mat on the engines is C-contiguous, not F-contiguous after the push.

    You can see this with:

    print mat.flags
    %px print mat.flags
    

    Adding:

    %px mat = numpy.asfortranarray(mat)
    

    Should get your performance back (as illustrated in my tweaked version of your notebook).

    For diagnosing this issue, I did my best to isolate where the bottlenecks were. Useful for this were the AsyncResult.serial_time and AsyncResult.wall_time. When the serial_time is long, that means the task is actually taking a long time on the engines, rather than spending lots of time in the IPython pipes. That led me to think that the task itself was slow on the engines, so I did the task remotely on one engine,
    and it was still slow (nothing parallel involved). Here’s a notebook tracking down the issue.

    Side note:

    The @interactive decorator is only necessary for functions that are not interactively defined (i.e. module functions, not functions defined in the notebook), so it’s redundant in your notebook.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large multidimensional array and I basically want to drop the first
I have rather large project that uses ICU regex classes. Basically it might run
I basically have a unix process running and it is doing some heavy processing
If I have an object that lazy loads an association with very large objects,
Just a bit of idle curiosity here. Basically, if I have an object that
I have in my model an object, that when modified requires a large number
I have a very large .json file on disk. I want to instantiate this
Basically I have a large set of data in excel, and I was wondering
Okay, basically, I have a large list of phone numbers in a text file
I have a very large php maintenance script (basically it recreates thumbnails for an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.