# Adding test in C/S mode for a plugin

**URL:** https://discourse.paraview.org/t/adding-test-in-c-s-mode-for-a-plugin/11682
**Category:** Development
**Created:** [March 23, 2023, 11:15am UTC](https://discourse.paraview.org/t/adding-test-in-c-s-mode-for-a-plugin/11682 "2023-03-23T11:15:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [March 23, 2023, 11:15am UTC](https://discourse.paraview.org/t/adding-test-in-c-s-mode-for-a-plugin/11682/1 "2023-03-23T11:15:07Z")

</div>

Hi,

I’m currently setting up test in C/S mode for a plugin that i’m in charge of.  
I’m using the `paraview_add_client_server_tests` function and it gave me satisfaction until i needed to run more than 2 servers through `mpiexec`.

First i have been trying to use the NUMPROCS keyword, but it seems to have no effect.  
I finally succeeded by using the environment variable `SMTESTDRIVER_MPI_NUMPROCS`.  
Is it the right way to specify the number of server required?

The other difficulty i was facing, is that my laptop has 4 physical cores with hyperthreading on each of them which gives me 8 virtual cores.  
However, by default, mpiexec refuses to launch more than 4 threads. I need to use the `--use-hwthread-cpus` mpiexec option.

It seems like, it is not possible to pass option to mpiexec dyamically during test execution. Am i right?  
The only way i found was to pass the `-DMPI_PREFLAGS="--use-hwthread-cpus"` cmake option to paraview and rebuild it.  
I was wondering if there was another, easier way, to do it?

Thanks in advance  
G.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 23, 2023, 11:50am UTC](https://discourse.paraview.org/t/adding-test-in-c-s-mode-for-a-plugin/11682/2 "2023-03-23T11:50:54Z")

</div>

> [@guillaume\_Peillex](#):
>
> `SMTESTDRIVER_MPI_NUMPROCS`.  
> Is it the right way to specify the number of server required?

Yes, that is the only way. NUMPROCS is not exposed but I think it should be. Do not hesitate to open an issue/MR for this.

> it is not possible to pass option to mpiexec dyamically during test execution.

Sadly not, but it could be an interesting option to add.

---

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [March 23, 2023, 1:00pm UTC](https://discourse.paraview.org/t/adding-test-in-c-s-mode-for-a-plugin/11682/3 "2023-03-23T13:00:18Z")

</div>

@mwestphal i opened [https://gitlab.kitware.com/paraview/paraview/-/issues/21833](https://gitlab.kitware.com/paraview/paraview/-/issues/21833).

Should i open another issue for the dynamic management of the mpiexec options?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 23, 2023, 1:07pm UTC](https://discourse.paraview.org/t/adding-test-in-c-s-mode-for-a-plugin/11682/4 "2023-03-23T13:07:09Z")

</div>

Yes, that would be two separate issues.

---

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [March 23, 2023, 2:16pm UTC](https://discourse.paraview.org/t/adding-test-in-c-s-mode-for-a-plugin/11682/5 "2023-03-23T14:16:29Z")

</div>

Ok. Done. [https://gitlab.kitware.com/paraview/paraview/-/issues/21834](https://gitlab.kitware.com/paraview/paraview/-/issues/21834)
