# Question about the compiler used in Mako template library

**URL:** <https://pyfr.discourse.group/t/question-about-the-compiler-used-in-mako-template-library/94>\
**Category:** General\
**Created:** [13 November 2015 10:15 UTC](https://pyfr.discourse.group/t/question-about-the-compiler-used-in-mako-template-library/94 "2015-11-13T10:15:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonio\_Garcia-Uceda](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Antonio\_Garcia-Uceda](https://pyfr.discourse.group/u/Antonio_Garcia-Uceda)\
**Post date:** [13 November 2015 10:15 UTC](https://pyfr.discourse.group/t/question-about-the-compiler-used-in-mako-template-library/94/1 "2015-11-13T10:15:55Z")

</div>

Dear all,

My name is Antonio Garcia-Uceda, and I’m working on research on Flux Reconstruction methods.

I’d like to ask you concerning the Mako template library used in PyFR to write and compile on the fly the solver kernerls. I’d like to know which compiler it uses to compile the resulting c++ code when using the openmp backend. Does it use the default compiler assigned to “gcc”? Is there any way in Mako settings to change this compiler?

Thanks a lot in advance.

Best regards,  
Antonio

---

<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:** [13 November 2015 10:21 UTC](https://pyfr.discourse.group/t/question-about-the-compiler-used-in-mako-template-library/94/2 "2015-11-13T10:21:57Z")

</div>

Hi Antonio,

You can set the compiler in the .ini file. Specifically set ‘cc’ under '[backend-openmp]’.

Cheers

Peter

---

<div class="post-metadata">

**Author:** ![Antonio\_Garcia-Uceda](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Antonio\_Garcia-Uceda](https://pyfr.discourse.group/u/Antonio_Garcia-Uceda)\
**Post date:** [13 November 2015 10:33 UTC](https://pyfr.discourse.group/t/question-about-the-compiler-used-in-mako-template-library/94/3 "2015-11-13T10:33:25Z")

</div>

Dear Peter,

Thanks. I guess if not specified in the .ini file it catches the one set by default in “gcc”, right?

I have another question: Do you know whether it’s possible to set in Mako to keep the c++ files (they are tmp.c I think) somewhere and not to delete them after the PyFR launch is finished?

Thanks once more.

Best regards  
Antonio

---

<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:** [13 November 2015 10:48 UTC](https://pyfr.discourse.group/t/question-about-the-compiler-used-in-mako-template-library/94/4 "2015-11-13T10:48:26Z")

</div>

Hi Antonio,

> Thanks. I guess if not specified in the .ini file it catches the  
> one set by default in "gcc", right?

The default compiler is "cc" if nothing is specified in the ini file.

> I have another question: Do you know whether it's possible to set  
> in Mako to keep the c++ files (they are tmp.c I think) somewhere  
> and not to delete them after the PyFR launch is finished?

Before running PyFR do:

export PYFR\_DEBUG\_OMP\_KEEP\_LIBS=true

and then all of the kernels (source and shared libraries) will be  
retained in your temporary directory; usually /tmp/pyfr-...-...

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![Antonio\_Garcia-Uceda](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Antonio\_Garcia-Uceda](https://pyfr.discourse.group/u/Antonio_Garcia-Uceda)\
**Post date:** [13 November 2015 11:02 UTC](https://pyfr.discourse.group/t/question-about-the-compiler-used-in-mako-template-library/94/5 "2015-11-13T11:02:13Z")

</div>

Thanks a lot for your reply

Antonio
