# Error in macro\_ddm.idp

**URL:** https://community.freefem.org/t/error-in-macro-ddm-idp/2358
**Category:** General Discussion
**Created:** [March 27, 2023, 3:07pm UTC](https://community.freefem.org/t/error-in-macro-ddm-idp/2358 "2023-03-27T15:07:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![yhao](https://avatars.discourse-cdn.com/v4/letter/y/5fc32e/32.png) [@yhao](https://community.freefem.org/u/yhao)
#### Post date: [March 27, 2023, 3:07pm UTC](https://community.freefem.org/t/error-in-macro-ddm-idp/2358/1 "2023-03-27T15:07:09Z")

</div>

Dear all,

I am working on a PETSc code. I met a problem when I used the sentence:

`build(Mesh, s, intersection, D, Pk, mpiCommWorld)`

It returns an error:

```auto
Error line number 682, in file macro: buildOverlapEdgePeriodicRecursive in /usr/local/ff++/mpich3/lib/ff++/4.8/idp/macro_ddm.idp, before token =
syntax error
  current line = 682 mpirank 0 / 4
Compile error : syntax error
	line number :682, =
error Compile error : syntax error
	line number :682, =
 code = 1 mpirank: 0

```

Do you know whats going on here?  
[neohook.edp](https://community.freefem.org/uploads/short-url/dEyQn7QBbf1cT4nogJXvZjsJ5q2.edp) (37.5 KB)

Thank you!

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [March 27, 2023, 3:42pm UTC](https://community.freefem.org/t/error-in-macro-ddm-idp/2358/2 "2023-03-27T15:42:59Z")

</div>

You have a macro named `u`, which clash with a variable name in `macro_ddm.idp`, so you need to rename your macro. Additionally, you should not use the very old macro `build()`, and instead switch to `createMat()` (but the problem will remain). I will rename the variable in `macro_ddm.idp` as well to avoid futur clashes.

---

<div class="post-metadata">

### Author: ![yhao](https://avatars.discourse-cdn.com/v4/letter/y/5fc32e/32.png) [@yhao](https://community.freefem.org/u/yhao)
#### Post date: [March 28, 2023, 2:37pm UTC](https://community.freefem.org/t/error-in-macro-ddm-idp/2358/3 "2023-03-28T14:37:12Z")

</div>

Hi prj,

Thank you. I have renamed the macro, however, another error popped up:

```auto
Error line number 682, in file macro: buildOverlapEdgePeriodicRecursive in /usr/local/ff++/mpich3/lib/ff++/4.8/idp/macro_ddm.idp, before token )
 Sorry you mixte formulation with and without array 
  current line = 682 mpirank 0 / 4

```

Could you help me with it?

Thank you!

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [March 28, 2023, 4:03pm UTC](https://community.freefem.org/t/error-in-macro-ddm-idp/2358/4 "2023-03-28T16:03:37Z")

</div>

You will need to upload the updated code first. Also, you are still using the deprecated function.
