# ${FFTW}_LIBRARIES - List of libraries when using FFTW.
# ${FFTW}_PKG - The name of the pkg-config package needed
# ${FFTW}_HAVE_SIMD - True if FFTW was built with SIMD support
-# ${FFTW}_HAVE_AVX - True if FFTW was built with AVX support
+# ${FFTW}_HAVE_SSE - True if FFTW was built with SSE support
+# ${FFTW}_HAVE_SSE2 - True if FFTW was built with SSE2 support
# ${FFTW}_FOUND - True if FFTW was found
# where ${FFTW} is FFTW or FFTWF
endif()
# Check for FFTW3 compiled with --enable-sse
- foreach(SSE_FUNCTION ${${FFTW}_FUNCTION_PREFIX}_have_simd_sse)
+ foreach(SSE_FUNCTION ${${FFTW}_FUNCTION_PREFIX}_have_simd_sse ${${FFTW}_FUNCTION_PREFIX}_have_sse)
if (FFTW_LIBRARY_CHANGED)
unset(${FFTW}_HAVE_${SSE_FUNCTION} CACHE)
endif()
check_library_exists("${${FFTW}_LIBRARIES}" "${SSE_FUNCTION}" "" ${FFTW}_HAVE_${SSE_FUNCTION})
if(${FFTW}_HAVE_${SSE_FUNCTION})
set(${FFTW}_HAVE_SSE TRUE)
+ set(${FFTW}_HAVE_SIMD TRUE)
break()
endif()
endforeach()
# Check for FFTW3 compiled with --enable-sse2
- foreach(SSE2_FUNCTION ${${FFTW}_FUNCTION_PREFIX}_have_simd_sse2)
+ foreach(SSE2_FUNCTION ${${FFTW}_FUNCTION_PREFIX}_have_simd_sse2 ${${FFTW}_FUNCTION_PREFIX}_have_sse2)
if (FFTW_LIBRARY_CHANGED)
unset(${FFTW}_HAVE_${SSE2_FUNCTION} CACHE)
endif()
check_library_exists("${${FFTW}_LIBRARIES}" "${SSE2_FUNCTION}" "" ${FFTW}_HAVE_${SSE2_FUNCTION})
if(${FFTW}_HAVE_${SSE2_FUNCTION})
set(${FFTW}_HAVE_SSE2 TRUE)
+ set(${FFTW}_HAVE_SIMD TRUE)
break()
endif()
endforeach()
- # Check for FFTW3 with 128-bit AVX compiled with --enable-avx
- foreach(AVX_128_FUNCTION ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx_128)
- if (FFTW_LIBRARY_CHANGED)
- unset(${FFTW}_HAVE_${AVX_128_FUNCTION} CACHE)
- endif()
- check_library_exists("${${FFTW}_LIBRARIES}" "${AVX_128_FUNCTION}" "" ${FFTW}_HAVE_${AVX_128_FUNCTION})
- if(${FFTW}_HAVE_${AVX_128_FUNCTION})
- set(${FFTW}_HAVE_AVX_128 TRUE)
- break()
- endif()
- endforeach()
-
- # Check for FFTW3 with 128-bit AVX2 compiled with --enable-avx2
- foreach(AVX2_128_FUNCTION ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx2_128)
- if (FFTW_LIBRARY_CHANGED)
- unset(${FFTW}_HAVE_${AVX2_128_FUNCTION} CACHE)
- endif()
- check_library_exists("${${FFTW}_LIBRARIES}" "${AVX2_128_FUNCTION}" "" ${FFTW}_HAVE_${AVX2_128_FUNCTION})
- if(${FFTW}_HAVE_${AVX2_128_FUNCTION})
- set(${FFTW}_HAVE_AVX2_128 TRUE)
- break()
- endif()
- endforeach()
+ # Check for any other SIMD support in FFTW
+ if (NOT ${FFTW}_HAVE_SIMD)
+ foreach(SIMD_FCT
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx2
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx2_128
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx512
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx_128_fma
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_altivec
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_neon
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_vsx
+ ${${FFTW}_FUNCTION_PREFIX}_have_simd_altivec
+ ${${FFTW}_FUNCTION_PREFIX}_have_altivec) # Name used before FFTW 3.3
+ if (FFTW_LIBRARY_CHANGED)
+ unset(${FFTW}_HAVE_${SIMD_FCT} CACHE)
+ endif()
+ check_library_exists("${${FFTW}_LIBRARIES}" "${SIMD_FCT}" "" ${FFTW}_HAVE_${SIMD_FCT})
+ if(${FFTW}_HAVE_${SIMD_FCT})
+ set(${FFTW}_HAVE_SIMD TRUE)
+ break()
+ endif()
+ endforeach()
+ endif()
- #in 3.3 sse function name has changed
- foreach(SIMD_FCT ${${FFTW}_FUNCTION_PREFIX}_have_simd_sse2;${${FFTW}_FUNCTION_PREFIX}_have_simd_avx;${${FFTW}_FUNCTION_PREFIX}_have_simd_altivec;${${FFTW}_FUNCTION_PREFIX}_have_simd_neon;${${FFTW}_FUNCTION_PREFIX}_have_sse2;${${FFTW}_FUNCTION_PREFIX}_have_sse;${${FFTW}_FUNCTION_PREFIX}_have_altivec)
- if (FFTW_LIBRARY_CHANGED)
- unset(${FFTW}_HAVE_${SIMD_FCT} CACHE)
- endif()
- check_library_exists("${${FFTW}_LIBRARIES}" "${SIMD_FCT}" "" ${FFTW}_HAVE_${SIMD_FCT})
- if(${FFTW}_HAVE_${SIMD_FCT})
- set(${FFTW}_HAVE_SIMD TRUE)
- break()
- endif()
- endforeach()
#Verify FFTW is compiled with fPIC (necessary for shared libraries)
if (CMAKE_OBJDUMP AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND BUILD_SHARED_LIBS AND NOT CYGWIN)
execute_process(COMMAND ${CMAKE_OBJDUMP} --reloc ${${FFTW}_LIBRARY} OUTPUT_VARIABLE ${FFTW}_OBJDUMP)
if ((${GMX_SIMD} MATCHES "SSE" OR ${GMX_SIMD} MATCHES "AVX") AND NOT ${FFTW}_HAVE_SIMD)
message(WARNING "The fftw library found is compiled without SIMD support, which makes it slow. Consider recompiling it or contact your admin")
else()
- if(${GMX_SIMD} MATCHES "AVX" AND NOT (${FFTW}_HAVE_SSE OR ${FFTW}_HAVE_SSE2 OR ${FFTW}_HAVE_AVX_128 OR ${FFTW}_HAVE_AVX2_128))
- # If we end up here we have an AVX Gromacs build, and FFTW with SIMD, but no 128-bit SIMD, this means AVX is enabled for FFTW.
- message(WARNING "The FFTW library was compiled with neither --enable-sse nor --enable-sse2; those would have enabled SSE(2) SIMD instructions. This will give suboptimal performance. You should (re)compile the FFTW library with both SSE2 and AVX instruction support (use both --enable-sse2 and --enable-avx). The FFTW library will determine at runtime which SIMD instruction set is fastest for different parts of the FFTs.")
+ if(${GMX_SIMD} MATCHES "AVX" AND NOT (${FFTW}_HAVE_SSE OR ${FFTW}_HAVE_SSE2))
+ # If we end up here we have an AVX Gromacs build, and FFTW
+ # with SIMD. FFTW 3.3.5 will have the behaviour that
+ # configuring with AVX support also adds SSE support, which is
+ # what we want. There is no good way to detect the FFTW
+ # version, however.
+ message(WARNING "The FFTW library was compiled with neither --enable-sse nor --enable-sse2; those would have enabled SSE(2) SIMD instructions. This will give suboptimal performance. You should (re)compile the FFTW library with both SSE2 and AVX instruction support (use both --enable-sse2 and --enable-avx). More recent versions of FFTW compile support for such narrower SIMD by default.")
endif()
+ set(FFT_STATUS_MESSAGE "Using external FFT library - FFTW3")
endif()
- set(FFT_STATUS_MESSAGE "Using external FFT library - FFTW3")
endif()
set(FFT_LIBRARIES ${${FFTW}_LIBRARIES})
\hspace{0.3em} {\wwwpage} ({\gmxyear})
\end{quote}
However, we prefer that you cite (some of) the {\gromacs}
-papers~\cite{Bekker93a,Berendsen95a,Lindahl2001a,Spoel2005a,Hess2008b,Pronk2013}
+papers~\cite{Bekker93a,Berendsen95a,Lindahl2001a,Spoel2005a,Hess2008b,Pronk2013,Pall2015,Abraham2015}
when you publish your results. Any future development depends on academic research
grants, since the package is distributed as free software!
year = {2000},
}
+@incollection {Pall2015,
+author = {P{\'a}ll, Szil{\'a}rd and Abraham, Mark James and Kutzner, Carsten and Hess, Berk and Lindahl, Erik},
+title = { Tackling Exascale Software Challenges in Molecular Dynamics Simulati\
+ons with {GROMACS} },
+booktitle = {Solving Software Challenges for Exascale },
+editor = { Markidis, Stephano and Laure, Erwin },
+pages = { 3--27 },
+year = { 2015 },
+volume = { 8759 },
+publisher = { Springer International Publishing Switzerland },
+address = { London }
+}
+
+@article {Abraham2015,
+author = { Abraham, Mark James and Murtola, Teemu and Schulz, Roland and P{\'a}ll, Szil{\'a}rd and Smith, Jeremy C. and Hess, Berk and Lindahl, Erik },
+title = { {GROMACS}: High performance molecular simulations through multi-level parallelism from laptops to supercomputers },
+journal = { {SoftwareX} },
+volume = { 1--2 },
+publisher = { John Wiley & Sons, Inc. },
+pages = { 19--25 },
+year = { 2015 },
+doi = "http://dx.doi.org/10.1016/j.softx.2015.06.001"
+}
+
@Misc{lmfit,
author = {Joachim Wuttke},
title = {lmfit},
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
}
dl[nl].index = gmx_residuetype_get_index(rt, thisres);
+ /* Prevent seg fault from unknown residues. If one adds a custom residue to
+ * residuetypes.dat but somehow loses it, changes it, or does analysis on
+ * another machine, the residue type will be unknown. */
+ if (dl[nl].index == -1)
+ {
+ gmx_fatal(FARGS, "Unknown residue %s when searching for residue type.\n"
+ "Maybe you need to add a custom residue in residuetypes.dat.",
+ thisres, __FILE__, __LINE__);
+ }
+
sprintf(dl[nl].name, "%s%d", thisres, ires+r0);
nl++;
}
{
double dt = (frame[cur].t-start_t)/(edat.nframes-1);
analyse_ener(opt2bSet("-corr", NFILE, fnm), opt2fn("-corr", NFILE, fnm),
- bFee, bSum, opt2parg_bSet("-nmol", npargs, ppa),
+ bFee, bSum, bFluct,
bVisco, opt2fn("-vis", NFILE, fnm),
nmol,
start_step, start_t, frame[cur].step, frame[cur].t,
sscanf(ptr, fmtlf, &time); /* printf("Time %f\n",time); */
/* Round time to fs */
- time = 1.0/1000*( static_cast<int> (time*1000+0.5) );
+ time = 1.0/1000*( static_cast<gmx_int64_t> (time*1000+0.5) );
/* get time step of pdo file */
if (count == 0)
for (i = 0; i < nt; i++)
{
/* Do you want that time frame? */
- t = 1.0/1000*( static_cast<int> ((y[0][i]*1000) + 0.5)); /* round time to fs */
+ t = 1.0/1000*( static_cast<gmx_int64_t> ((y[0][i]*1000) + 0.5)); /* round time to fs */
/* get time step of pdo file and get dstep from opt->dt */
if (i == 0)
"S. Páll, M. J. Abraham, C. Kutzner, B. Hess, E. Lindahl",
"Tackling Exascale Software Challenges in Molecular Dynamics Simulations with GROMACS",
"In S. Markidis & E. Laure (Eds.), Solving Software Challenges for Exascale",
- 8759, 2015, "3-27" }
+ 8759, 2015, "3-27" },
+ { "Abraham2015",
+ "M. J. Abraham, T. Murtola, R. Schulz, S. Páll, J. C. Smith, B. Hess, E. Lindahl",
+ "GROMACS: High performance molecular simulations through multi-level parallelism from laptops to supercomputers",
+ "SoftwareX",
+ 1, 2015, "19-25" },
};
#define NSTR (int)asize(citedb)
t_group *g;
gmx_bool bAppend, bStartFromCpt, bRerun;
gmx_mtop_atomlookup_t alook = NULL;
+ matrix boxCopy;
alook = gmx_mtop_atomlookup_init(mtop);
g->qc[i] = atom->q;
}
+ /* Make a t_pbc struct on all nodes so that the molecules
+ * chosen for an exchange can be made whole. */
snew(s->pbc, 1);
- set_pbc(s->pbc, -1, box);
-
+ /* Every node needs to call set_pbc() and therefore every node needs
+ * to know the box dimensions */
+ copy_mat(box, boxCopy);
+ if (PAR(cr))
+ {
+ gmx_bcast(sizeof(boxCopy), boxCopy, cr);
+ }
+ set_pbc(s->pbc, -1, boxCopy);
if (MASTER(cr))
{
if (fplog != NULL)
{
/* Print references after all software/hardware printing */
+ please_cite(fplog, "Abraham2015");
please_cite(fplog, "Pall2015");
please_cite(fplog, "Pronk2013");
please_cite(fplog, "Hess2008b");