Command Line Arguments

Apart from the -iprefix and -oprefix options, EMFEM has many other command line arguments to gain more fine control of the computational process. The arguments can be divided into the following categories.

Linear solver

  • -inner_pc_type - This option controls what preconditioner will be used for solving the small linear system when appling the block-diagonal preconditioner. Options are:

    • direct - use a direct solver, solver type controled by -direct_solver_type

    • ams - use Auxiliary-Space Maxwell solver

    • mixed - when number of DoFs smaller than a certain threshold, use direct solver, otherwise use AMS solver. The threshold is specified by -pc_threshold.

  • -pc_threshold - specify the DoFs threshold for which preconditioner should be used.

  • -direct_solver_type - specify which direct solver should be used. Options are mumps and superlu_dist.

  • -K_max_it - controls the maximum iterations when solving the linear system. Default value is 100.

  • -e_rtol - controls the relative residual when solving the linear system. Default value is 1E-8.

  • -dual_rtol - controls the relative residual when solving the linear system for the dual problem. Default value is 1E-6.

Adaptive mesh refinements

  • -max_adaptive_refinements - This option controls the maximum number of adaptive mesh refinements. Default value is 0.

  • -max_dofs - specify the maximum number of DoFs will be allowd. Default value is 1000000.

  • -refine_fraction - controls how many cells will be refined. Default value is 0.1.

  • -max_rx_edge_length - The cells for which the receivers are located can be refined prior to the adaptive mesh refinement procedure. This options controls the maximum edge length of these cells. Default value is -1, means no refinements will be applied.

Parallel computation

  • -n_groups - Apart from the mesh decomposition parallel algorithm, EMFEM also uses the data decomposition algorithm to achive better parallel efficiency. The MPI processors can decomposed into several groups to apply frequency-wise parallelization. The number of groups is controled by this option. Default value is 1.

Options file

All the above options can be saved into an options file, then we can pass the options file through the -options_file option.

Here is an example:

-iprefix model/commemi3d1/commemi3d1
-oprefix model/commemi3d1/commemi3d1

-max_rx_edge_length 5

-refine_fraction 0.1

-inner_pc_type ams

-max_adaptive_refinements 5
-max_dofs 2000000

-n_groups 4

Save it into a file named options.cfg, then run EMFEM with

$ mpirun -np 8 ./emfem -options_file options.cfg