I am running the following script to change the name by which I call my GROMACS command from gmx
to gmx_196g
. The script employs CMake:
cd gromacs-2019.6/build_stage3/
suffix=196g
install_path=/home/my_username/software/gmx_2019/.local
OPTFLAGS="-Ofast -mtune=broadwell"
cmake3 .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=icc -DCMAKE_C_FLAGS_RELEASE="$OPTFLAGS" \
-DCMAKE_CXX_COMPILER=icpc -DCMAKE_CXX_FLAGS_RELEASE="$OPTFLAGS" \
-DGMX_MPI=ON -DGMX_OPENMP=ON \ -DGMX_GPU=CUDA -DGMX_CUDA_TARGET_SM=60 \
-DGMX_SIMD=AVX2_256 -DGMX_DOUBLE=OFF \ -DGMX_FFT_LIBRARY=mkl \
-DGMX_DEFAULT_SUFFIX=OFF -DGMX_BINARY_SUFFIX=_${suffix} -DGMX_LIBS_SUFFIX=_${suffix} \
-DCMAKE_INSTALL_PREFIX=${install_path}
make -j 8 make install
cd ../../
However, I am receiving this error:
CMake Error: The source directory "/home/my_username/software/gmx_2019/gromacs-2019.6/build_stage3/ -DGMX_FFT_LIBRARY=mkl" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** No rule to make target 'make'. Stop.
Why is the error highlighting -DGMX_FFT_LIBRARY=mkl and my source directory? I am confused as to why this is happening... Any advice you have would be appreciated!
The backslash characters in this context are meant to be line continuation characters, escaping the literal newlines.
When you place a backslash in the middle of a line, it is escaping the following character, so for example in
-DGMX_MPI=ON -DGMX_OPENMP=ON \ -DGMX_GPU=CUDA -DGMX_CUDA_TARGET_SM=60 \
the \ -DGMX_GPU=CUDA
is read as a single token starting with a literal space. Because it doesn't begin with a dash, cmake
is interpreting it as a source directory instead of an option.
Either remove such superfluous backslashes
-DGMX_MPI=ON -DGMX_OPENMP=ON -DGMX_GPU=CUDA -DGMX_CUDA_TARGET_SM=60 \
or use them as intended i.e. as line-continuations
-DGMX_MPI=ON -DGMX_OPENMP=ON \
-DGMX_GPU=CUDA -DGMX_CUDA_TARGET_SM=60 \
making sure that there are no trailing characters after the \
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments