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

  • Home
  • SEARCH
  • 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 8357343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:26:49+00:00 2026-06-09T10:26:49+00:00

I want to be able to program multiple threads with gnu octave so it

  • 0

I want to be able to program multiple threads with gnu octave so it will utilize multiple processors.

I installed GNU Octave on Fedora 17 Linux and did the following:

yum install octave

Which installed on my computer the latest version of octave, 3.6.2. It works great, however when you multiply two huge matrices together it bogs down the one CPU that octave uses. It would be nice if the matrix multiplication utilizes all of the cores, since in this case the CPU is obviously the bottleneck.

Can octave fully utilize multi-core processors and run on multiple threads? Is there a library or compile time flag for this?

  • 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-09T10:26:51+00:00Added an answer on June 9, 2026 at 10:26 am

    Solution

    Octave itself is a single-thread application that runs on one core. You can get octave to use some libraries like ATLAS which utilize multiple cores. So while Octave only uses one core, when you encounter a heavy operation, octave calls functions in ATLAS that utilize many CPU’s.

    I was able to do this. First compile ‘ATLAS’ from source code and make it available to your system so that octave can find it and use those library functions. ATLAS tunes itself to your system and number of cores. When you install octave from source and specify ATLAS, it uses it, so when octave does a heavy operation like a huge matrix multiplication, ATLAS decides how many cpu’s to use.

    I was unable to get this to work for Fedora, but on Gentoo I could get it to work.

    I used these two links:
    ftp://ftp.gnu.org/gnu/octave/

    http://math-atlas.sourceforge.net/

    I ran the following octave core before and after ATLAS install:

    tic
    bigMatrixA = rand(3000000,80);
    bigMatrixB = rand(80,30);
    bigMatrixC = bigMatrixA * bigMatrixB;
    toc
    disp("done");
    

    The matrix multiplication goes much faster using multiple processors, which was 3 times faster than before with single core:

    Without Atlas: Elapsed time is 3.22819 seconds.
    With Atlas:    Elapsed time is 0.529 seconds.
    

    The three libraries I am using which speed things up are
    blas-atlas,
    cblas-atlas,
    lapack-atlas.

    If octave can use these instead of the default blas, and lapack libraries, then it will utilize multi core.

    It is not easy and takes some programming skill to get octave to compile from source with ATLAS.

    Drabacks to using Atlas:

    This Atlas software uses a lot of overhead to split your octave program into multiple threads. Sure it goes much faster if all you are doing is huge matrix multiplications, but most commands can’t be multi-threaded by atlas. If extracting every bit of processing power/speed out of your cores is top priority then you’ll have much better luck just writing your program to be run in parallel with itself. (Split your program into 8 equivalent programs that work on 1/8th of the problem and run them all simultaneously, when all are done, reassemble the results).

    Atlas helps a single threaded octave program behave a little bit more like a multi-threaded app but it is no silver bullet. Atlas won’t make your single threaded Octave program max out your 2,4,6,8 core processor. You’ll notice a performance boost, but the boost will leave you searching for a better way to use all the processor. The answer is writing your program to run in parallel with itself, and this takes a lot of programming skill.

    Suggestion

    Put your energy into vectorizing your heaviest operations and distributing the process over n simultaneous running threads. If you are waiting too long for a process to run, most likely the lowest hanging fruit to speed it up is using a more efficient algorithm or data structure.

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

Sidebar

Related Questions

I want to be able to distribute a program in Linux without distributing the
I want to be able to create multiple threads and send data to a
In the program I am writing, I want to be able to import CSV
I am creating a c++ program, but I want to be able to offer
I have a closed-source 3rd party program, and I want to be able to
I want my program to be able to write files in a sequential format,
I want to write a little program which is able to work with Google
I want to save my program's DataModel objects to a file, and be able
I'm having a complete program, but now, I want it to be able to
I want to create a daemon of a ruby program on Linux. I also

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.