Code Monkey home page Code Monkey logo

Comments (7)

m-reuter avatar m-reuter commented on September 15, 2024

-threads is equivalent with -openmp . Additionally, we set the itkthreads to the same, which is set to 4 by the parallel flag.

from fastsurfer.

tashrifbillah avatar tashrifbillah commented on September 15, 2024

which is set to 4 by the parallel flag

It is modified by -openmp <num> according to the documentation I attached before. Where do you get direction about itkthreads?

from fastsurfer.

LeHenschel avatar LeHenschel commented on September 15, 2024

It is the default when you only specify -parallel for recon-all: https://github.com/freesurfer/freesurfer/blob/dev/scripts/recon-all#L7317

    case "-parallel":
      set DoParallel = 1;
      if ( ! $OMP_NUM_SET ) then
        # the user can override this thread count with -openmp
        setenv OMP_NUM_THREADS 4
        setenv FS_OMP_NUM_THREADS 4 # support for re-entrant recon-all
      endif
      # override: -itkthreads <num_threads>
      setenv ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS 4
      breaksw

from fastsurfer.

tashrifbillah avatar tashrifbillah commented on September 15, 2024

Sure, all I am saying is-- the default should be modified by -openmp <num> flag. I don't see any documentation on FreeSurfer that says modify that using -itkthreads flag.

from fastsurfer.

LeHenschel avatar LeHenschel commented on September 15, 2024

I do not quite understand what you mean. If you set -parallel in FreeSurfer, the ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS and OMP_NUM_THREADS will both be set to 4 as per the code I posted above. You can separately set a different value with -openmp and -itkthreads:

https://github.com/freesurfer/freesurfer/blob/dev/scripts/recon-all#L7328
https://github.com/freesurfer/freesurfer/blob/dev/scripts/recon-all#L7337

Do you want us to include a separate flag for -itkthreads in FastSurfer, so you can set this to a value of your choice?

from fastsurfer.

tashrifbillah avatar tashrifbillah commented on September 15, 2024

The two references help. Thanks.

Do you want us to include a separate flag for -itkthreads

No, you are good.

from fastsurfer.

tashrifbillah avatar tashrifbillah commented on September 15, 2024

Referencing my thread from FreeSurfer forum. It looks like -parallel openmp <num> is enough for parallelization:

https://www.mail-archive.com/[email protected]/msg67061.html

from fastsurfer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.