[gmx-users] New force fields

Erik Lindahl lindahl at stanford.edu
Sat May 4 01:15:36 CEST 2002


Hi,

>
>A solution could be to implement the inner loops with assembly embedded
>in C. At least they would be much more readable.
>
Yes, if that worked it would be nice, but unfortunately the gcc inlining 
syntax isn't
fully supported by the Intel compiler, it isn't supported at all by the 
Portland or other
third-party compilers on linux, and it's not supported with the Visual 
C++ compilers
in windows, so it would break a lot of architectures...

If it was possible I would definitely had preferred it, since the gnu 
assembler is really
lousy when it comes to catching compile-time errors. This is also the 
reason for the
very low amount of comments; the different assemblers refused to accept 
each others
comment formats....

Further, even with assembly-embedded-in-C the loops would have to be 
100% assembly
instructions, or the register allocator & instruction scheduler would 
fsck thing up. This
is actually the main reason Altivec (where we essentially use asm 
embedded in C) is
significantly slower than SSE.

It would also have been nice if we could write just the innermost part 
of the loop in assembly,
but the way gcc and current CPUs work it would involve an SSE/normal fp 
context switch at
every iteration, and that would kill performance.

Cheers,

Erik





More information about the gromacs.org_gmx-users mailing list