# Does pyfr support quasi-2D simulation with extrude direction using pseudo-spectral methods?

**URL:** <https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45>\
**Category:** General\
**Created:** [17 August 2014 15:01 UTC](https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45 "2014-08-17T15:01:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhang\_Wei](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@Zhang\_Wei](https://pyfr.discourse.group/u/Zhang_Wei)\
**Post date:** [17 August 2014 15:01 UTC](https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45/1 "2014-08-17T15:01:40Z")

</div>

Dear Pyfrer:  
I am very new to pyfr. I want to know does pyfr support quasi 2D simulation with one direction by spectrum method?

cheers

---

<div class="post-metadata">

**Author:** ![p.vincent](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/p.vincent/32/225_2.png) [@p.vincent](https://pyfr.discourse.group/u/p.vincent)\
**Post date:** [17 August 2014 15:09 UTC](https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45/2 "2014-08-17T15:09:13Z")

</div>

Not at the moment I’m afraid.

Cheers

Peter

---

<div class="post-metadata">

**Author:** ![Zhang\_Wei](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@Zhang\_Wei](https://pyfr.discourse.group/u/Zhang_Wei)\
**Post date:** [9 September 2014 17:04 UTC](https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45/3 "2014-09-09T17:04:39Z")

</div>

Dear Prof. Vincent:  
can I turn of cuda and make comparison for pure cpu and by cuda accelerations?  
because I noticed even if when I don’t have have backend-cuda, still the solver will run on graphic card.

cheers

---

<div class="post-metadata">

**Author:** ![p.vincent](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/p.vincent/32/225_2.png) [@p.vincent](https://pyfr.discourse.group/u/p.vincent)\
**Post date:** [9 September 2014 17:11 UTC](https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45/4 "2014-09-09T17:11:13Z")

</div>

Hi Zhang,

Thanks for your interest in PyFR. If you run pyfr-sim -h you will get:

_usage: pyfr-sim [-h] [–verbose] [–backend BACKEND] [–progress]_  
_[–nansweep N]_  
_{run,restart} …_

_Runs a PyFR simulation_

_positional arguments:_  
_{run,restart} sub-command help_  
_run run --help_  
_restart restart --help_

_optional arguments:_  
_-h, --help show this help message and exit_  
_–verbose, -v_  
_–backend BACKEND, -b BACKEND_  
_Backend to use_  
_–progress, -p show a progress bar_  
_–nansweep N, -n N check for NaNs every N steps_

Note the -b option to choose the backend you want to run with.

The default is -b cuda which will run the CUDA backend and look for an Nvidia GPU. If you want to use your CPU you can use the -b openmp backend, and if you want to use your AMD GPU you will need to use the -b opencl backend. However note the dependencies listed here [http://www.pyfr.org/user\_guide.php](http://www.pyfr.org/user_guide.php) for each backend.

Cheers

Peter

---

<div class="post-metadata">

**Author:** ![Zhang\_Wei](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@Zhang\_Wei](https://pyfr.discourse.group/u/Zhang_Wei)\
**Post date:** [9 September 2014 18:16 UTC](https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45/5 "2014-09-09T18:16:16Z")

</div>

Dear Dr Peter:  
thanks for your reply. I tried to use parameter but it doesn’t work. here is the error message:

wxw@cu02 test]$ pyfr-sim run couette\_flow\_2d.pyfrm couette\_flow\_2d.ini -b openmp  
[cu02:30246] [[13141,1],0] ORTE\_ERROR\_LOG: Data for specified key not found in file btl\_usnic\_cclient.c at line 88  
[cu02][[13141,1],0][btl\_usnic\_cclient.c:89:ompi\_btl\_usnic\_connectivity\_client\_init] usNIC connectivity client unable to db\_fetch local leader  
usage: pyfr-sim [-h] [–verbose] [–backend BACKEND] [–progress]  
[–nansweep N]  
{run,restart} …  
pyfr-sim: error: unrecognized arguments: -b openmp

I suppose it is because I don’t have openmp installed on the node if I can run serially without this parallel parameter?

cheers

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [9 September 2014 18:18 UTC](https://pyfr.discourse.group/t/does-pyfr-support-quasi-2d-simulation-with-extrude-direction-using-pseudo-spectral-methods/45/6 "2014-09-09T18:18:39Z")

</div>

As per the usage statement the BACKEND argument must come before  
run/restart. Changing the command to

&nbsp;&nbsp;$ pyfr-sim -b openmp run couette\_flow\_2d.pyfrm couette\_flow\_2d.ini

should sort it out.

Regards, Freddie.
