setsmdeveloper / SETSM

The Surface Extraction from TIN-based Searchspace Minimization (SETSM) software is a fully automatic algorithm for deriving Digital Terrain Models (DTM) from pairs of satellite imagery.
Apache License 2.0
63 stars 19 forks source link

SETSM does not respect `-threads` argument #14

Open liamtoney opened 2 weeks ago

liamtoney commented 2 weeks ago

I'm trying to run SETSM on a cluster where I need to control the number of threads being used. However, it seems like setsm always uses all threads available even when I specify the -threads option.

Investigating the source code, I don't see anywhere where the number of threads is being specified. Is this feature not implemented?

liamtoney commented 2 weeks ago

After learning that this feature is not implemented yet, I tried specifying the environment variable OMP_NUM_THREADS directly before my setsm command. This limits the threads as expected, e.g.

OMP_NUM_THREADS=32 setsm <args>

results in CPU usage of 3,200%. Some OpenMP guidance on this is here.