# Segmentation fault(core dumped) while using genrestr

**URL:** https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277
**Category:** User discussions
**Created:** [December 16, 2020, 2:46am UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277 "2020-12-16T02:46:51Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![syk1311](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@syk1311](https://gromacs.bioexcel.eu/u/syk1311)
#### Post date: [December 16, 2020, 2:46am UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/1 "2020-12-16T02:46:51Z")

</div>

GROMACS version:2020.1  
GROMACS modification: No  
when I follow the tutorial (2) to run the program, it processed to generate “strong\_posre.itp”, an errors occurs:  
Reading sturcture file  
Select group to position restrain  
Segmentation fault(core dumped)

---

<div class="post-metadata">

### Author: ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)
#### Post date: [December 16, 2020, 9:41am UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/2 "2020-12-16T09:41:16Z")

</div>

Hi,  
Please provide more information on the problem, command-line that gives error with all the option and the error you got.  
Best regards  
Alessandra

---

<div class="post-metadata">

### Author: ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)
#### Post date: [December 16, 2020, 10:58am UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/3 "2020-12-16T10:58:51Z")

</div>

This is a known bug that has been fixed. Upgrade to 2020.4 and try again.

---

<div class="post-metadata">

### Author: ![syk1311](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@syk1311](https://gromacs.bioexcel.eu/u/syk1311)
#### Post date: [December 16, 2020, 1:53pm UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/4 "2020-12-16T13:53:35Z")

</div>

> [@syk1311](#):
>
> Segmentation fault(core dumped)

Thank you very much. I checked my gromacs program. I find that I downloaded version 2020.4, but when I finished the installation, use gmx --version to check the version number, and give a prompt message: 2020.1-ubuntu-2020.1-1. I dont konw where the problem is？

Best regards.

---

<div class="post-metadata">

### Author: ![syk1311](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@syk1311](https://gromacs.bioexcel.eu/u/syk1311)
#### Post date: [December 16, 2020, 1:59pm UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/5 "2020-12-16T13:59:50Z")

</div>

> [@alevilla](#):
>
> Please provide more information on the problem, command-line that gives error with all the option and the error you got.  
> Best regards  
> Alessandra

When I preform the simulation according to the website “[KALP-15 in DPPC](http://www.mdtutorials.com/gmx/membrane_protein/03_solvate.html)”. It proceeds to generate the “strong\_posre.itp” file (using the command “gmx genrestr -f KALP\_newbox.gro -o strong\_posre.itp -fc 100000 100000 100000”) Then, an error occurs:  
Reading sturcture file  
Select group to position restrain  
Segmentation fault(core dumped).  
And I use VMD to check my structure, There is no problem.  
Thanks.

---

<div class="post-metadata">

### Author: ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)
#### Post date: [December 16, 2020, 2:28pm UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/6 "2020-12-16T14:28:44Z")

</div>

You need to uninstall the 2020.1 package that you installed via the package manager, compile and install 2020.4 from source, and add the 2020.4 installation to your PATH. The installation instructions in the manual explain how to do that.

---

<div class="post-metadata">

### Author: ![syk1311](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@syk1311](https://gromacs.bioexcel.eu/u/syk1311)
#### Post date: [December 16, 2020, 2:49pm UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/7 "2020-12-16T14:49:21Z")

</div>

Thank you, Sir.  
I used the following command to install Gromacs 2020.4.  
“tar xfz gromacs-2020.4.tar.gz  
cd gromacs-2020.4  
mkdir build  
cd build  
cmake … -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON  
make  
make check  
sudo make install  
source /usr/local/gromacs/bin/GMXRC”  
Can’t I use this installation method？  
Best regerds

---

<div class="post-metadata">

### Author: ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)
#### Post date: [December 16, 2020, 5:51pm UTC](https://gromacs.bioexcel.eu/t/segmentation-fault-core-dumped-while-using-genrestr/1277/8 "2020-12-16T17:51:48Z")

</div>

That is a minimal build process that may work if all the required components are in the default locations. You still have to uninstall the 2020.1 Ubuntu package before you can use 2020.4, because /usr/bin (where Ubuntu installs the gmx binary) comes first in the `$PATH` before /usr/local/gromacs/bin.
