Menu

set the number of cores used by saga

Christian
2015-03-25
2016-09-28
  • Christian

    Christian - 2015-03-25

    We use SAGA 2.1.4 on an UBUNTU-machine with 16 cores. No special program adjustments were made. Actually I run "TPI based Landform Classification" with a 2GByte DEM, very slow. The admin told me, only 10 from the 16 cpu's are used. Is there a possibility to adjust the number of cores used by SAGA?

     
  • Ludwig Hilger

    Ludwig Hilger - 2015-03-25

    if you click on "tool libraries" in the manager window you will find an option called "Number of cpu cores [physical processors]" in the tool library settings. You can enter the number of phyiscal processors of your machine there.

    I have never tested this but to me it sounds like what you are looking for. Btw, I would be interested in how to set this in cmd...

     
  • Volker Wichmann

    Volker Wichmann - 2015-03-25

    Hi,

    by default, SAGA should use all cores available (or reported by the system).

    With saga_cmd, you can use the --cores argument to define the number of cores to use:

    saga_cmd --help
    ...
    saga_cmd [-f, --flags][=qrsilpxo][-s, --story][=#][-c, --cores][=#] <LIBRARY> <MODULE> <OPTIONS>
    ...
    [-c], [--cores]  : number of physical processors to use for computation
    
     
  • Christian

    Christian - 2015-03-27

    Hey,
    in the meantime we discovered that the TPI based landform classification sometimes uses 10, sometimes 12 cores. Now I try to run it with the -c=16 command, but it has started in the batch with Saga Wetness Index, where apparently only 1 core can be used. Now I have to wait until its finished so the TPI Landforms can start.
    Thanks for the answers so far!!

     
  • Volker Wichmann

    Volker Wichmann - 2015-03-27

    Hi,

    as I already wrote, SAGA uses all cores by default, so it should not matter whether you provide all cores with the --cores argument or not. The argument was actually introduced to limit the number of cores used, because under certain circumstances it may not make sense to use all cores.

    It seems to me that the operating system is limiting the number of cores to a maximum of 12 cores, which might be the result of page swapping, i.e. some cores are just used for memory copying operations.

    BTW, the SAGA Wetness Index is parallelized too (but not all computational steps) and should also use all cores available by default.

     
  • Marcos

    Marcos - 2016-09-28

    For Basic terrain analysis algorithm, Saga uses all the cores only at the beginning of the process. Then, it only uses one. (Saga v. 2.2.3 under Ubuntu 16.04)

     
  • Volker Wichmann

    Volker Wichmann - 2016-09-28

    Hi,

    not all of the tools used in the Basic Terrian Analysis meta-tool are parallelized, i.e. use all cores. And sometimes this is not feasible to implement as not all computational operations can be split up on several cores easily. So your observation does not mean that something is going wrong. Also sometimes only specific computational tasks in a tool are parallelized but not all operations.

     

Log in to post a comment.