# Regarding CUDA and Gromacs installation

**URL:** <https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816>\
**Category:** User discussions\
**Created:** [March 24, 2021, 10:03pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816 "2021-03-24T22:03:07Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [March 24, 2021, 10:03pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/1 "2021-03-24T22:03:08Z")

</div>

GROMACS version: 2019  
GROMACS modification: Yes/No  
Here post your question  
I have a PC with GPU Nvidia GTX 1080. It has CentOS 7 and I have installed CUDA 11.2 (version). Then started installing Gromacs 2019, by below commands

cd gromacs-2019  
mkdir build  
cd build  
cmake … -DCMAKE\_INSTALL\_PREFIX=/usr/local/gromacs2019

_But when I give_ **make** _command, I get the following error_

vcc fatal : Unsupported gpu architecture ‘compute\_30’  
CMake Error at libgromacs\_generated\_nbnxm\_cuda.cu.o.Release.cmake:220

_Then I gave_ **cmake … -DGMX\_CUDA\_TARGET\_SM=“35;52;60;61;70;75,80”`**.

_But when I give_ **make check** _command_

_I am getting the error shown in image (screenshot attached)_

 ![gromacs](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/3505305e710c402519fd622fe4471962e5a12953.png)  
How is solve these errors? and complete Gromacs 2019 installation. Your suggestions and inputs will be of great help to me. Thank you in advance!

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [March 26, 2021, 12:32am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/2 "2021-03-26T00:32:51Z")

</div>

The former error you have addressed correctly.

Which GROMACS release are you using? If it is the initial 2019 release, please upgrade to 2019.6.

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [March 26, 2021, 12:51pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/3 "2021-03-26T12:51:49Z")

</div>

@pszilard Thank you very much for your reply. I have run MD simulations (50ns) of protein structures in the Gromacs 2019 version. I am planning to extend the simulation duration (to 100ns) for these structures in GPU machine by installing gromacs software.

If I install Gromacs 2019.6 version, Can I extend the simulation which was performed in Gromacs 2019 version?

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [March 29, 2021, 11:50am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/4 "2021-03-29T11:50:22Z")

</div>

> [@Yeshwanth](#):
>
> If I install Gromacs 2019.6 version, Can I extend the simulation which was performed in Gromacs 2019 version?

Yes, minor releases only do bugfixes and minor improvements. Do check the release notes of bugfix releases which document if any bugfix may alter continuation behavior (which generally should not be the case).

–  
Szilárd

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [March 29, 2021, 9:16pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/5 "2021-03-29T21:16:02Z")

</div>

@pszilard Thank you very much for your response

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [April 4, 2021, 4:31pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/6 "2021-04-04T16:31:40Z")

</div>

Dear sir,

I tried installing 2019.6, but I am getting these error below

[42%] Building NVCC (Device) object src/gromacs/CMakeFiles/libgromacs.dir/mdlib/nbnxn\_cuda/libgromacs\_generated\_nbnxn\_cuda.cu.o  
nvcc fatal : Unsupported gpu architecture ‘compute\_30’  
CMake Error at libgromacs\_generated\_nbnxn\_cuda.cu.o.Release.cmake:207 (message):  
Error generating  
/home/yashwanth/Downloads/gromacs 2019.6/build/src/gromacs/CMakeFiles/libgromacs.dir/mdlib/nbnxn\_cuda/./libgromacs\_generated\_nbnxn\_cuda.cu.o  
make[2]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/mdlib/nbnxn\_cuda/libgromacs\_generated\_nbnxn\_cuda.cu.o] Error 1  
make[1]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2  
make: \*\*\* [all] Error 2

Specifications of PC  
OS: CentOS 7 , Graphic card: Nvidia GTX 1080, Cuda version: cuda-11.2.2-1.x86\_64

Kindly help me solving these issue, it will be of great help to me

Looking forward to your valuable response [123|690x137](https://gromacs.bioexcel.eu/uploads/short-url/xMYBfuuQSPNF94HwrEHMlGdArPl.png)

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [April 12, 2021, 4:03pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/7 "2021-04-12T16:03:03Z")

</div>

This is a CUDA issue you can work around with by adding `-DGMX_CUDA_TARGET_SM="61"` to your cmake invocation (also add `-DGMX_CUDA_TARGET_COMPUTE="61"` to make GROMACS builds it future-proof to newer GPU architectures).

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [April 17, 2021, 6:43pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/8 "2021-04-17T18:43:40Z")

</div>

@pszilard Sorry for the delayed response! Thank you very much for your reply

cd gromacs-2019  
mkdir build  
cd build  
**cmake … -DGMX\_CUDA\_TARGET\_SM=“61” -DCMAKE\_INSTALL\_PREFIX=/usr/local/gromacs2019**  
make  
make check  
sudo make install  
source /usr/local/gromacs/bin/GMXRC

Is my cmake command format correct…? Is it the right way?

Looking forward for your valuable response

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [April 19, 2021, 8:47am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/9 "2021-04-19T08:47:21Z")

</div>

Yes, that looks correct. Best way to tell is to [check the docs](https://manual.gromacs.org/documentation/current/install-guide/index.html#cuda-gpu-acceleration) and/or try it.

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [April 19, 2021, 9:43am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/10 "2021-04-19T09:43:27Z")

</div>

@pszilard I am very grateful to you! I will try it. Which command in these [check the docs](https://manual.gromacs.org/documentation/current/install-guide/index.html#cuda-gpu-acceleration)  
should I execute? Thank you

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [April 19, 2021, 11:39am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/11 "2021-04-19T11:39:44Z")

</div>

The documentation section I pointed you at describes among other things the `GMX_CUDA_TARGET_SM` cmake option I previously suggested. That’s the option you should try.

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [April 19, 2021, 11:56am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/12 "2021-04-19T11:56:08Z")

</div>

@pszilard Thank you a lot! for your reply I surely will try these command

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [June 15, 2021, 6:31am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/13 "2021-06-15T06:31:47Z")

</div>

![Screenshot from 2021-06-15 11-30-53](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/a330aae6fef8e52945272fdc6f71e4515011d4f5.jpeg)

Hi! Due to Covid 19 cases, there was a lockdown here, I could not access the systems.

I tried the above command **cmake … -DGMX\_CUDA\_TARGET\_SM=“61” -DCMAKE\_INSTALL\_PREFIX=/usr/local/gromacs2019**

But when I give the “make” command I am getting these error ( screenshot attached )  
I would be very grateful if you could help me to solve these error and install Gromacs

Looking forward to hearing from you…

---

<div class="post-metadata">

**Author:** ![pjohansson](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pjohansson/32/316_2.png) [@pjohansson](https://gromacs.bioexcel.eu/u/pjohansson)\
**Post date:** [June 15, 2021, 7:02am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/14 "2021-06-15T07:02:13Z")

</div>

Hi,

could this be a typo with the quotation marks? I believe that straight quotes (`"61"`) are required around the value, but your command seems to use curly quotes (`“61”`).

Regards,  
Petter

---

<div class="post-metadata">

**Author:** ![Yeshwanth](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@Yeshwanth](https://gromacs.bioexcel.eu/u/Yeshwanth)\
**Post date:** [June 15, 2021, 7:29am UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/15 "2021-06-15T07:29:54Z")

</div>

@pjohansson  
Thank you very much for your valuable response, I put straight quotes ( `"61"` ) it worked

But if I give the command " make check " I am getting the following error ( screenshot attached )  
Your suggestions and inputs will be of great help

Looking forward to hearing from you

 ![Screenshot from 2021-06-15 12-55-17](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/6fa4bc85f2e658d375337426d6936a8eeed5ba71.jpeg)

---

<div class="post-metadata">

**Author:** ![s.pallav](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/s.pallav/32/1099_2.png) [@s.pallav](https://gromacs.bioexcel.eu/u/s.pallav)\
**Post date:** [August 31, 2022, 12:27pm UTC](https://gromacs.bioexcel.eu/t/regarding-cuda-and-gromacs-installation/1816/16 "2022-08-31T12:27:38Z")

</div>

Hi @Yeshwanth could you figure out a way to install the same?  
Hi@pszilard, I do have another gromacs installed but in a non-standard location and likewise I’m installing 2019.6 version with CUDA 11.7 and encountering errors as Yeshwant did which I have resolved but the compilation fails at make check with “Gpuutilistest failed”  
Thanking in advance.  
Regards,  
Pallav
