# Compile OpenIFS with different compiler flags

**URL:** <https://forum.ecmwf.int/t/compile-openifs-with-different-compiler-flags/12158>\
**Category:** OpenIFS\
**Tags:** openifs-40r1, openifs-installation-and-compilation\
**Created:** [28 December 2017 10:21 UTC](https://forum.ecmwf.int/t/compile-openifs-with-different-compiler-flags/12158 "2017-12-28T10:21:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glenn\_Carver](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/g/e495f1/32.png) [@Glenn\_Carver](https://forum.ecmwf.int/u/Glenn_Carver)\
**Post date:** [28 December 2017 10:21 UTC](https://forum.ecmwf.int/t/compile-openifs-with-different-compiler-flags/12158/1 "2017-12-28T10:21:47Z")

</div>

Hi,

I would like to compile certain OpenIFS directories with some more debug flags, rather than applying this to all of OpenIFS.

The reason is that when I use these debug flags on all of OpenIFS I get some errors in parts of OpeniFS that I'm not concerned with.

I've tried using the FCM configuration:

build.prop{fc.flags}[cosp2] = -O0 -g -fp-model precise -ftz -debug all -ftrapuv -check bounds -check all -traceback -warn interfaces

for the directory "cosp2".

While the above line in my oifs-config file compiles, it is completely ignored. Is there a way to compile some directories with different flags than others?

Best,

/M

---

<div class="post-metadata">

**Author:** ![Glenn\_Carver](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/g/e495f1/32.png) [@Glenn\_Carver](https://forum.ecmwf.int/u/Glenn_Carver)\
**Post date:** [30 December 2017 13:08 UTC](https://forum.ecmwf.int/t/compile-openifs-with-different-compiler-flags/12158/2 "2017-12-30T13:08:01Z")

</div>

Hi Marston,

I think the cause is:

```
build.prop{fc.flags}[cosp2] =
```

should be:

```
oifs.prop{fc.flags][cosp2] =
```

The oifs.cfg file creates an 'instance' of the 'build' class with this line near the top of the oifs.cfg file:

```
step.class[oifs] = build
```

so all 'build' properties need to be called 'oifs'. This was done to give more flexibility in the future.

You could also do this:

```
build.prop{class,fc.flags} =
```

This means the properties apply to all instances of the build class. In your case, the syntax is correct but they only apply to the default 'build' which OpenIFS doesn't use, that's why it has no effect.

Best regards,&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Glenn

---

<div class="post-metadata">

**Author:** ![Marston\_Ward](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Marston\_Ward](https://forum.ecmwf.int/u/Marston_Ward)\
**Post date:** [2 January 2018 11:17 UTC](https://forum.ecmwf.int/t/compile-openifs-with-different-compiler-flags/12158/3 "2018-01-02T11:17:40Z")

</div>

Hi Glenn,

Thanks. I missed that. Now I got it to work.
