# How to set the options of HPDDM?

**URL:** <https://community.freefem.org/t/how-to-set-the-options-of-hpddm/4123>\
**Category:** General Discussion\
**Created:** [November 4, 2025, 6:49am UTC](https://community.freefem.org/t/how-to-set-the-options-of-hpddm/4123 "2025-11-04T06:49:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lzjqingao](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lzjqingao](https://community.freefem.org/u/lzjqingao)\
**Post date:** [November 4, 2025, 6:49am UTC](https://community.freefem.org/t/how-to-set-the-options-of-hpddm/4123/1 "2025-11-04T06:49:26Z")

</div>

Dear FreeFEM community,

I’m calling HPDDM to solve a 3D elasticity problem by switching to hpddm within FFDDM. I have tried two methods to set the options of hpddm.

(1) Setting in the code

The key codes are:

- mesh3 ThGlobal = readmesh3(“xxx.mesh”);

The command line reads:

ff-mpirun -np 8 xxx.edp -hpddm\_verbosity 2

The codes can running normally, but the displayed options of HPDDM are not consistent with the setting ones:

┌------------------------------------┐  
│ HPDDM options used: │  
│ E3d\_orthogonalization: 1 │  
│ E3d\_schwarz\_coarse\_correction: 0 │ should be 2~balanced  
│ E3d\_verbosity: 5 │  
│ E3d\_schwarz\_method: 0 │ should be 3~asm  
│ E3d\_level\_2\_verbosity: 5 │  
│ E3d\_geneo\_nu: 20 │ should be 10  
│ E3d\_geneo\_threshold: 5.0e-01 │  
│ E3d\_krylov\_method: 2 │ correct  
│ E3d\_tol: 1.0e-06 │  
│ E3d\_variant: 1 │  
│ E3d\_gmres\_restart: 200 │  
│ E3d\_max\_it: 200

(2) Setting in the command line

ff-mpirun -np 8 xxx.edp -hpddm\_verbosity 2 **-hpddm\_schwarz\_method asm -hpddm\_geneo\_nu 10**

The displayed options read:

│ HPDDM options used: │  
│ E3d\_orthogonalization: 1 │  
│ E3d\_schwarz\_coarse\_correction: 0 │  
│ E3d\_verbosity: 5 │  
│ E3d\_schwarz\_method: 0 │  
│ E3d\_level\_2\_verbosity: 5 │  
│ E3d\_geneo\_nu: 20 │  
│ E3d\_geneo\_threshold: 5.0e-01 │  
│ E3d\_krylov\_method: 2 │  
│ E3d\_tol: 1.0e-06 │  
│ E3d\_variant: 1 │  
│ E3d\_gmres\_restart: 200 │  
│ E3d\_max\_it: 200 │  
│ geneo\_nu: 10 │  
│ schwarz\_method: 3 │  
│ verbosity: 2

The options with prefix E3d keep the same, and additional options (geneo\_nu/schwarz\_method) are consistent with the ones in command line. I wonder which ones are used in the computation.

It seems that the above two methods cannot control the options of HPDDM. Are there any mistakes in my setting? Or anyone can tell me how to set them correctly?

---

<div class="post-metadata">

**Author:** ![phtournier](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@phtournier](https://community.freefem.org/u/phtournier)\
**Post date:** [November 4, 2025, 9:41am UTC](https://community.freefem.org/t/how-to-set-the-options-of-hpddm/4123/2 "2025-11-04T09:41:34Z")

</div>

That is because ffddm options supersede hpddm options (you can see it e.g. here [FreeFem-sources/idp/ffddm\_functions.idp at develop · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/develop/idp/ffddm_functions.idp#L679-L688) )

In your case, you can control hpddm options by using ffddm command-line parameters `-ffddm_schwarz_method asm -ffddm_schwarz_coarse_correction BNN -ffddm_geneo_nu 10`

```auto
 ┌----------------------------------┐
 │ HPDDM options used: │
 │ E_geneo_nu: 10 │
 │ E_geneo_threshold: 0 │
 │ E_gmres_restart: 200 │
 │ E_level_2_verbosity: 5 │
 │ E_max_it: 200 │
 │ E_orthogonalization: 1 │
 │ E_schwarz_coarse_correction: 2 │
 │ E_schwarz_method: 3 │
 │ E_tol: 1.0e-06 │
 │ E_variant: 1 │
 │ E_verbosity: 5 │
 │ verbosity: 100 │
 └----------------------------------┘

```

---

<div class="post-metadata">

**Author:** ![lzjqingao](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lzjqingao](https://community.freefem.org/u/lzjqingao)\
**Post date:** [November 4, 2025, 11:29am UTC](https://community.freefem.org/t/how-to-set-the-options-of-hpddm/4123/3 "2025-11-04T11:29:43Z")

</div>

Hi Dr. Tournier, this method really works!

Many Thanks.
