The solver “task_amc”, named by the algorithm AMC (advanced Monte-Carlo method), is used for solving non-LTE molecular level populations.
The user can check the command options by using “sparx help” with the task name

$ sparx help task_amc

Name:
  task_amc

Description:
  Non-LTE molecular excitation solver

Keywords:
      source=OldFile
             (No default)
             Name of input source model (HDF5 file)

         out=NewFile
             (No default)
             Name of output file (HDF5 file)
        ...

Commonly used options
source : input HDF file of the model
out       : output HDF file containing physical model and molecular population
pops    : initial population file
lte        : initial condition.
The value ‘True’ is for LTE assumption, ‘False’ for ground state distribution. The default is ‘True’
trace   : the switch to record the result of every step during the iteration. The default is ‘False’
snr      : demanding signal-noise-ratio. The default is 20.

$ sparx run task_amc source=model out=pops

sparx: Key 'overlap' not given, using default="0kms^-1"
sparx: Key 'lte' not given, using default="True"
...
sparx: Model geometry is 'sph1d'
sparx: Solving excitation for HCO+
sparx: Total 21 levels, 20 lines
sparx: Beginning convergence from LTE conditions
sparx: 
sparx: Iterating for convergence with FIXED set of random rays, Quasi Random Ray
sparx:  Iter.|Converged/Total|   Prcntg.| Max diff.|      Goal|  Elapsed|              Status
sparx: ------|---------------|----------|----------|----------|---------|--------------------
sparx:      1|      0/64     |     0.00%|7.8786e+03|5.0000e-03|000:00:00|->        64000 rays
sparx:      2|      0/64     |     0.00%|8.4630e+00|5.0000e-03|000:00:00|->        64000 rays
sparx:      3|      0/64     |     0.00%|5.3358e-01|5.0000e-03|000:00:00|->        64000 rays
...
      Converged!
sparx: 
sparx: Iterating for convergence with FULLY RANDOM rays,  Quasi Random Ray
sparx:  Iter.|Converged/Total|   Prcntg.| Max diff.|      Goal|  Elapsed|              Status
sparx: ------|---------------|----------|----------|----------|---------|--------------------
sparx:      1|     64/64     |   100.00%|1.8172e-02|5.0000e-02|000:00:03|->        64000 rays
sparx:      2|     64/64     |   100.00%|4.2857e-02|5.0000e-02|000:00:04|->        91000 rays
sparx:      3|     64/64     |   100.00%|3.7657e-02|5.0000e-02|000:00:05|->        97000 rays
...
      Converged!
sparx: 
sparx: Iterating for convergence with FIXED set of random rays, Quasi Random Ray
sparx:  Iter.|Converged/Total|   Prcntg.| Max diff.|      Goal|  Elapsed|              Status
sparx: ------|---------------|----------|----------|----------|---------|--------------------
sparx:      1|     33/64     |    51.56%|2.8726e-02|5.0000e-03|000:00:18|->       193000 rays
sparx:      2|     64/64     |   100.00%|2.5680e-04|5.0000e-03|000:00:19|->       193000 rays
sparx:      3|     64/64     |   100.00%|4.6238e-05|5.0000e-03|000:00:20|->       193000 rays
sparx:      4|     64/64     |   100.00%|1.3234e-05|5.0000e-03|000:00:20|->       193000 rays
sparx:      5|     64/64     |   100.00%|3.0766e-06|5.0000e-03|000:00:21|->       193000 rays
      Converged!
sparx: Wrote output model to 'pops'

The flag “snr” controls the accuracy of AMC algorithm. The default SNR value 20 means the result of the level populations could contain maximally 5% error. The SNR value should be comparable to the target observational data you’d like to simulate. And the error of the model generated by finite element method should also be checked by enabling “-e” flag in PRESPARX stage.

The default program is multithreading with doubling the number of cores. The flag “–parallel” could enable MPI passage between nodes. An “MPIHOST” file should be specified. Use the command to run the parallel job.

$ mpirun -v -machinefile MPIHOST -np $NPROCS sparx ....
The non-LTE solver : AMC