# NSPEC in Specfem3D\_globe

**URL:** <https://community.geodynamics.org/t/nspec-in-specfem3d-globe/1650>\
**Category:** SPECFEM\
**Created:** [January 18, 2021, 9:25am UTC](https://community.geodynamics.org/t/nspec-in-specfem3d-globe/1650 "2021-01-18T09:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiaming](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@Jiaming](https://community.geodynamics.org/u/Jiaming)\
**Post date:** [January 18, 2021, 9:25am UTC](https://community.geodynamics.org/t/nspec-in-specfem3d-globe/1650/1 "2021-01-18T09:25:45Z")

</div>

I got an error xspecfem3D while running Specfem3D\_Globe, it says:  
Error file dimension: nspec in file = 16448 but nspec desired:  
2936000  
please check file ./DATABASES\_MPI/proc000024\_reg1\_solver\_data.bin  
Error dimensions in solver\_data.bin  
Error detected, aborting MPI… proc 24  
Error file dimension: nspec in file = 16448 but nspec desired:  
2936000  
please check file ./DATABASES\_MPI/proc000031\_reg1\_solver\_data.bin  
Error dimensions in solver\_data.bin  
Error detected, aborting MPI… proc 31

I know NSPEC is in values\_from\_mesher.h generated by xmeshfem3D. How may I fix that?  
Really appreciate that.

---

<div class="post-metadata">

**Author:** ![dpeter](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/dpeter/32/227_2.png) [@dpeter](https://community.geodynamics.org/u/dpeter)\
**Post date:** [January 18, 2021, 9:44am UTC](https://community.geodynamics.org/t/nspec-in-specfem3d-globe/1650/2 "2021-01-18T09:44:33Z")

</div>

whenever you change the resolution (NEX) in your simulation setup (Par\_file), you need to re-compile the code and run mesher and solver again for your example.

SPECFEM3D\_GLOBE uses static arrays (for performance reasons), the error above checks if your solver was compiled with the same settings as your mesh files.

---

<div class="post-metadata">

**Author:** ![Jiaming](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@Jiaming](https://community.geodynamics.org/u/Jiaming)\
**Post date:** [January 29, 2021, 6:29am UTC](https://community.geodynamics.org/t/nspec-in-specfem3d-globe/1650/3 "2021-01-29T06:29:48Z")

</div>

Hi dpeter, Thanks for the reply. Yes, indeed, every time when I submit a new job, I have “make meshfem3D” and “make specfem3D” in bash file to recompile both executables with the same Par\_file. Maybe it is something else? Thanks.
