class_docstr: Support for FS commands that utilize OpenMP
  
  Sets the environment variable 'OMP_NUM_THREADS' to the number
  of threads specified by the input num_threads.
class_docstr_tok: ["Support","for","FS","commands","that","utilize","OpenMP","Sets","the","environment","variable","'OMP_NUM_THREADS","'","to","the","number","of","threads","specified","by","the","input","num_threads","."]
code: def __init__(self, **inputs):
      super().__init__(**inputs)
      self.inputs.on_trait_change(
          self._num_threads_update, "num_threads"
      )
      if not self._num_threads:
          self._num_threads = os.environ.get("OMP_NUM_THREADS", None)
          if not self._num_threads:
              self._num_threads = os.environ.get("NSLOTS", None)
      if not isdefined(self.inputs.num_threads) and self._num_threads:
          self.inputs.num_threads = int(self._num_threads)
      self._num_threads_update()
  
imports: import os
  from looseversion import LooseVersion
  from ...utils.filemanip import fname_presuffix
  from ..base import CommandLine, Directory, CommandLineInputSpec, isdefined, traits, TraitedSpec, File, PackageInfo
label_desc: Use image node_id 1 to create a new FSCommandOpenMP object from inherited base classes: FSCommand with example: obj = FSCommandOpenMP()