# Exec error : exec assert

**URL:** <https://community.freefem.org/t/exec-error-exec-assert/1293>\
**Category:** General Discussion\
**Created:** [October 31, 2021, 11:16pm UTC](https://community.freefem.org/t/exec-error-exec-assert/1293 "2021-10-31T23:16:17Z")\
**Posts on this page:** 14\
**Page:** 2

<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:** [November 3, 2021, 7:12am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/21 "2021-11-03T07:12:20Z")

</div>

I guess you need to build your own `.tar.gz` by using the same [Dockerfile](https://github.com/FreeFem/FreeFem-docker/blob/master/freefem-docker/Dockerfile) but with modifying the file `macro_ddm.idp`.

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [November 5, 2021, 11:55am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/22 "2021-11-05T11:55:10Z")

</div>

Dear @prj ,

Do you have other solutions? I realise this issue may also cause instability of my algorithm, which I observed a lot and really have no idea.

My sequetial code works well, and my parallel code agrees perfectly with the sequential one at the first few steps, but the parallel code breaks down after some unpredicted steps, and it breaks down differently using diffetent processors.

The problem is I am not quite familiar with docker, if you have an easier solution, it would be really appreciated.

Best,  
Yongxing.

---

<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:** [November 5, 2021, 11:58am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/23 "2021-11-05T11:58:18Z")

</div>

This is a trivial solution (just modifying a single file), but you are using a complicated tool (Singularity container), so I can’t be of much more assistance here…

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [November 5, 2021, 12:10pm UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/24 "2021-11-05T12:10:43Z")

</div>

OK, let me try to learn how to use docker. You know, your Mattransfer( ) in FreeFem provides the interpolation matrix which is a perfect tool to implement my algorithm in parallel. I have not seen other sofwares which provide this function, are there some you can suggest?

---

<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:** [November 5, 2021, 12:13pm UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/25 "2021-11-05T12:13:59Z")

</div>

Almost all standard finite element codes implement such a function.

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [November 7, 2021, 5:51pm UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/26 "2021-11-07T17:51:46Z")

</div>

Dear @prj ,

I am back for further help…  
I have fixed my singularity container with the modification of file `macro_ddm.idp`, as you suggested, which did not work correctly unfortunately.

**problem 1** : for the simple working example [test.edp](https://community.freefem.org/uploads/short-url/vloeXosYRCzO6elCMZjD1hMFxRJ.edp) (988 Bytes). Your know, previously when using 8 processors, there was an error at line 1484, which disappeared if using `-Dpartitioner=scotch`. Now applying your modification of file `macro_ddm.idp`, it is funny: there is no error `without -Dpartitioner=scotch`, but there is an error at line 1487 with it – NOT line 1484 but it is the same error as shown in the following screenshot.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/49e1eff20c86df94dd729e7ff2520f3c3f1f535b.png)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/3b62eb8f392d62bec04890ed42905e8f665a8de5.png)

**Problem 2** : for my long/real script, the error at line 1487 quickly appears no matter using `-Dpartitioner=scot`ch or not. Three errors for three tests are all the same which are shown as follows:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/82e7cfb2dc2527708925ef2619b3b51a3277a68e.png)

![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/ecadef8670986a34e16e6a91e284046129b1b072.png)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/1e31205fce5917711cae730b3ad4e8fd2d8fa783.png)

---

<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:** [November 8, 2021, 8:03am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/27 "2021-11-08T08:03:51Z")

</div>

~~I’m not sure you applied the patch properly. On my machine, with the patch, for `test.edp` with the previously supplied meshes, the script runs to completion with `-np 8` with _or_ without `-Dpartitioner=scotch`. Or maybe you need to switch to the `develop` branch instead of using version 4.9?~~ Nevermind, I’m seeing that it also sometimes fail on my machine. I have another fix in the pipeline but I have a busy beginning of week. I will send it to you by Wednesday (but hopefully sooner if I catch a break). Sorry for this.

---

<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:** [November 10, 2021, 7:23pm UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/28 "2021-11-10T19:23:03Z")

</div>

Could you please try the following patch instead?

```auto
diff --git a/idp/macro_ddm.idp b/idp/macro_ddm.idp
index ea8c0861..66c1e27e 100644
--- a/idp/macro_ddm.idp
+++ b/idp/macro_ddm.idp
@@ -1745,2 +1745,3 @@ ENDIFMACRO
     meshN interpolateExchange;
+ fespace PhExchangePrivate(gluedExchange, P0);
     fespace VhExchangePrivate(gluedExchange, Pk);
@@ -1751,4 +1752,4 @@ ENDIFMACRO
             if(recvTh[index].nt) {
- fespace VhRestrictionPrivate(recvTh[index], Pk);
- matrix R = interpolate(VhRestrictionPrivate, VhExchangePrivate);
+ fespace PhRestrictionPrivate(recvTh[index], P0);
+ matrix R = interpolate(PhRestrictionPrivate, PhExchangePrivate);
                 if(R.nnz != R.n) {
@@ -1757,3 +1758,8 @@ ENDIFMACRO
                 }
- for[i, j, v : R] uExchange[][j] += exchangeU[index][i];
+ int[int] I, J;
+ real[int] C;
+ [I, J, C] = R;
+ fespace VhRestrictionPrivate(recvTh[index], Pk);
+ int[int] restriction = restrict(VhRestrictionPrivate, VhExchangePrivate, J);
+ for[i, v : restriction] uExchange[][v] += exchangeU[index][i];
             }

```

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [November 11, 2021, 10:59am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/29 "2021-11-11T10:59:02Z")

</div>

thank you very much @prj , i will try it soon and will let you know the result.

---

<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:** [November 11, 2021, 11:53am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/30 "2021-11-11T11:53:41Z")

</div>

Please do that as soon as you can. There will be a new FreeFEM release by the end of this week, so if the patch works OK for you, I’ll include that in the `develop` branch which will become version 4.10. Then, you won’t have to play around with Docker patches.

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [November 12, 2021, 8:44am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/31 "2021-11-12T08:44:41Z")

</div>

@prj : I have NOT seen the same error for all the tests using P1b/P1 element, I will update to you later for the test using P2/P1 and P2/P1dc elements.

---

<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:** [November 12, 2021, 8:51am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/32 "2021-11-12T08:51:11Z")

</div>

That’s promising, thanks! Waiting for your later update to merge this in and release 4.10. BTW, you do get _correct_ results, right? 😃

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [November 12, 2021, 8:52am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/33 "2021-11-12T08:52:07Z")

</div>

Yes, my results are correct. Thank you very much!

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [November 12, 2021, 10:14am UTC](https://community.freefem.org/t/exec-error-exec-assert/1293/34 "2021-11-12T10:14:12Z")

</div>

I can confirm that there is no error for my other four tests in both 2D and 3D (previously showed the exec assert error at line 1487). Thanks again for all your help!

[Previous page](https://community.freefem.org/t/exec-error-exec-assert/1293.md?page=1)
