Best practice in compiling both cuda version and double precision version

Hi, I need to compile both cuda version and double precision version of gromacs. I see many people uses different ways of compiling them and was wondering what is the best practice in this case.

Some people do

cd gromacs-$GMX_VERSION
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs -D GMX_GPU=CUDA
make 
make install
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs -D GMX_DOUBLE=ON
make 
make install

So both versions are build in the same directory and installed in the same location as well. Some other peoples do

cd gromacs-$GMX_VERSION
mkdir build_cuda
cd build_cuda
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs/build_cuda -D GMX_GPU=CUDA
make 
make install
cd ..
mkdir build_d
cd build_d
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs/d -D GMX_DOUBLE=ON
make 
make install

So bother versions are build and installed separatly. I wonder is the first version fine or one could only do the second one? Thanks

Hi,

you can install several gmx_* executables into the same directory, you just have to take care that you don’t overwrite an existing one with a later installation process. But since double builds have _d appended by default, in your case that should be fine.

Best,
Carsten