Introduced a check for inline assembly.
- Welcome to GROMACS 3.0!
+ Welcome to GROMACS 3.1!
Note: Detailed, step-by-step installation instructions
are available on the website http://www.gromacs.org .
* SHORT INSTRUCTIONS FOR THE IMPATIENT:
-From version 3.0, the GROMACS compile and install procedure has
-been changed to simplify things for you. We now use a standard
+Starting with version 3.0, the GROMACS compile and install procedure
+was changed to simplify things for you. We now use a standard
autoconf script and makefiles created by automake, like most
GNU programs. This means your normal installation actions are
limited to:
Welcome to the official version of GROMACS!
-Starting with version 3.0, a lot of things have changed. Not only is the
-code significantly faster, but we also have a completely new installation
-process and license the package under the GPL (see the COPYING file).
+There are no significant changes to the installation or use between version
+3.1 and 3.0, so if you're already used to 3.0 you can just go ahead and update.
+A lot of things changed with version 3.0, though. Not only is the code
+significantly faster, but we also introduced a completely new installation
+process and licensed the package under the GPL (see the COPYING file).
If you are familiar with unix, it should be fairly trivial to compile and
install GROMACS. Installation instructions are available in the INSTALL file,
# fail on platforms where MPI executables can only be run through a batchqueue.
if test "$enable_mpi" = "yes"; then
- AC_CHECK_PROGS(MPICC, mpxlc mpicc mpcc hcc, $CC)
+ AC_CHECK_PROGS(MPICC, mpxlc mpicc mpcc hcc, $CC)
# now change the normal cc to the MPI one - see the comment above.
CC=$MPICC
AC_MSG_CHECKING([whether the MPI cc command works]) # be paranoid
fi
if test "$enable_fortran" = "yes"; then
- AC_F77_LIBRARY_LDFLAGS
- AC_F77_WRAPPERS
+ AC_F77_LIBRARY_LDFLAGS
+ AC_F77_WRAPPERS
fi
AC_PROG_CPP
+case "${host_cpu}" in
+ i?86)
+ # disable x86trunc if inlined assembly doesnt work
+ AC_MSG_CHECKING(if the C compiler supports inline assembly)
+ AC_TRY_LINK([],[float f;int i; asm("fld %1\nfistpl %0\n" : "=m" (*&i) : "f" (f));],[AC_MSG_RESULT(yes)
+AC_DEFINE(USE_X86TRUNC,,[Disable inline assembly truncation for x86 cpu])],[AC_MSG_RESULT(no)])
+ ;;
+ *) enable_x86_asm=no ;;
+esac
/* start the loop over i particles (neighborlists) */
outer_loop();
/* The innerloop creation is called from the outerloop creation */
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
if(bC && DO_TAB && DO_FORCE)
strcat(codebuffer,"asm(\"fldcw %%0\" : : \"m\" (*&x86_cwsave));\n");
#endif
(prec == 8) ? "double" : "single",
bC ? "C" : "Fortran 77",fn);
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
fprintf(stderr,">>> Using fast inline assembly gcc/x86 truncation. Since we are changing\n"
" the control word this might affect the numerical result slightly.\n");
#endif
init_block_data();
}
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
/* This is a very fast inline assembly truncation routine
* The slow step an most x86 chips is to store and restore
* the control word when we want to do truncation. Here it
* (But for MNO solvent we have to do it)
*/
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
/* store cw */
if(bC && DO_TAB) {
strcat(codebuffer,"asm(\"fnstcw %%0\" : \"=m\" (*&x86_cwsave));\n");
int table_index(char *rin)
{
assign("rt",rin);
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
if(bC)
code("x86trunc(rt,n0);");
else
int *idxptr,tix,tiy,tiz;
real *xptr,tx,ty,tz;
real rxx,ryx,ryy,rzx,rzy,rzz;
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
int x86_cw,x86_cwsave;
asm("fnstcw %0" : "=m" (*&x86_cwsave));
ty = ny + ny * ( xptr[YY] * ryy + xptr[ZZ] * rzy );
tz = nz + nz * ( xptr[ZZ] * rzz );
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
x86trunc(tx,tix);
x86trunc(ty,tiy);
x86trunc(tz,tiz);
range_check(idxptr[ZZ],nz);
#endif
}
-#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && !defined DISABLE_X86TRUNC)
+#if (defined __GNUC__ && (defined i386 || defined __386__) && !defined DOUBLE && defined USE_X86TRUNC)
asm("fldcw %0" : : "m" (*&x86_cwsave));
#endif