patchGNU Octave - Patches: patch #7504, add an nprocs function

 
 

patch #7504: add an nprocs function

Submitter:  Iain Murray <imurray>
Submitted:  Sat 12 Mar 2011 06:09:32 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 17 Mar 2011 12:33:18 PM UTC, comment #2: 

As reported on the octave-maintainers list, I messed up and my previous changeset didn't actually use gnulib. The attached changeset (applied after the changeset Rik applied) will, I hope, fix things up.

(file #22943)

Iain Murray <imurray>
Wed 16 Mar 2011 10:07:35 PM UTC, comment #1: 

I added a wee bit of input checking and also configured the help text to be added to the manual.  The patch was applied in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/a1b2da4967ac) and is available when building from the Mercurial source repository.

Rik <rik5>
Group administrator
Sat 12 Mar 2011 06:09:32 PM UTC, original submission:  

While searching for how to get the number of CPUs in Octave I found:

http://octave.1599824.n4.nabble.com/Read-the-number-of-cpus-on-Linux-td2295117.html

jwe wrote "I see an nproc module in gnulib that appears to be portable to current systems of interest...Would someone like to contribute a function for this purpose?"

The attachment is the entirely boiler-plate implementation of this if you want it. (Also exposes nprocs_conf.)

Currently the m-file I use to count CPUs is here:
http://homepages.inf.ed.ac.uk/imurray2/code/imurray-matlab/num_cores.m
It has separate hacks for Windows, Mac and Linux. But I can't test Windows or MacOS as I don't currently run either. Having a built-in cross-platform function would be nice.

Iain Murray <imurray>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #22943:  nproc_gnulib.diff added by imurray (4KiB - text/x-patch)
file #22911:  nprocs.diff added by imurray (3KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by imurray (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-03-17 imurray Attached File- Added nproc_gnulib.diff, #22943
    2011-03-16 rik5 Open/ClosedOpen Closed
    2011-03-12 imurray Attached File- Added nprocs.diff, #22911

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code