# Some problems exsit in continental\_extension.prm

**URL:** <https://community.geodynamics.org/t/some-problems-exsit-in-continental-extension-prm/2866>\
**Category:** ASPECT\
**Created:** [March 16, 2023, 12:17pm UTC](https://community.geodynamics.org/t/some-problems-exsit-in-continental-extension-prm/2866 "2023-03-16T12:17:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leisurely](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@leisurely](https://community.geodynamics.org/u/leisurely)\
**Post date:** [March 16, 2023, 12:17pm UTC](https://community.geodynamics.org/t/some-problems-exsit-in-continental-extension-prm/2866/1 "2023-03-16T12:17:02Z")

</div>

Dear all

I run continental\_extension.prm twice.

rand\_seed() should give the model two different result. However the two results are the same.This is why

[continental\_extension.prm](https://community.geodynamics.org/uploads/short-url/8qyDpqVg3mjHdXL66qYohfOrMOE.prm) (13.5 KB)

Best  
Xu

---

<div class="post-metadata">

**Author:** ![tjhei](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/tjhei/32/1163_2.png) [@tjhei](https://community.geodynamics.org/u/tjhei)\
**Post date:** [March 16, 2023, 1:38pm UTC](https://community.geodynamics.org/t/some-problems-exsit-in-continental-extension-prm/2866/2 "2023-03-16T13:38:15Z")

</div>

Hi Xu,

continental\_extension.prm uses “rand\_seed”, which produces random values based on a seed. This means it always produces the identical values when you rerun it.

If you want to have different results every time you run it, replace “rand\_seed(n)” by “rand()”.

Note that there is also a bug in deal.II 9.4 that causes rand\_seed to not be random at all, see [rand\_seed always returns the same value · Issue #5114 · geodynamics/aspect · GitHub](https://github.com/geodynamics/aspect/issues/5114)

---

<div class="post-metadata">

**Author:** ![leisurely](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@leisurely](https://community.geodynamics.org/u/leisurely)\
**Post date:** [March 16, 2023, 3:03pm UTC](https://community.geodynamics.org/t/some-problems-exsit-in-continental-extension-prm/2866/3 "2023-03-16T15:03:55Z")

</div>

Hi

Thanks for your response

After replace “rand\_seed(n)” by “rand()” in the prm. There are some errors

Message: \<Too many parameters for function “rand” at expression position 47\>  
Formula: \<if(x\>50.e3 && x\<150.e3 && y\>50.e3, 0.5 + rand(1), 0) \>  
Token:

Why does this happen

Best  
Xu

---

<div class="post-metadata">

**Author:** ![tjhei](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/tjhei/32/1163_2.png) [@tjhei](https://community.geodynamics.org/u/tjhei)\
**Post date:** [March 16, 2023, 3:16pm UTC](https://community.geodynamics.org/t/some-problems-exsit-in-continental-extension-prm/2866/4 "2023-03-16T15:16:12Z")

</div>

Replace “rand\_seed(1)” by “rand()” without arguments.

---

<div class="post-metadata">

**Author:** ![leisurely](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@leisurely](https://community.geodynamics.org/u/leisurely)\
**Post date:** [March 17, 2023, 12:03pm UTC](https://community.geodynamics.org/t/some-problems-exsit-in-continental-extension-prm/2866/5 "2023-03-17T12:03:21Z")

</div>

Thanks for your help
