[Debichem-devel] chemfp: New upstream release 1.1p1 available

Andrew Dalke dalke at dalkescientific.com
Wed Mar 6 00:13:56 UTC 2013


On Mar 6, 2013, at 12:12 AM, Michael Banck wrote:
> I am now filing this as a wishlist bug to keep track of it.

Okay.

> OpenMP should be doable.
> 
> If the SSSE3 support is not runtime-detected, we will have to configure
> it out on ia32, as the baseline is currently a regular i686 CPU (without
> SSE) I believe.

There are two aspects related to detection.

The first is, does the compiler understand OpenMP and SSSE3, and if
so, what are the command-line flags? Chemfp has a set of hard-coded
flags. For Debian, which has a gcc more recent than 4.1, this will
work just fine. The options are:

    # I'm going to presume that everyone is using an Intel-like processor
    "gcc": OMP("-fopenmp") + SSSE3("-mssse3") + ["-O3"],

where OPM and SSSE3 differ based on the values of

   --with-openmp / --without-openmp
   --with-ssse3 / --without-ssse3


I do not have experience in compiling this with non-Intel-like
processors. It may be worthwhile to invest in a Raspberry Pi
just to have experience with making it portable to ARM. However,
this is a low-priority thought for me. For ARM support it will
likely be best to just use the --without-* flags.

> On amd64 I am less sure, but I think there are some x86-64 CPUs around
> which do not support it.  I assume the code will result in a SIGILL on
> those CPUs?  That might also be a problem.

The second part of the detection is to see if the CPU supports
the instruction. After all, the compiler might be able to
generate code that the CPU can't actually use. This should not
be a problem. Chemfp has a run-time check to see if the chip-specific
instructions are available. These look like:


int chemfp_has_ssse3(void) {
#if defined(GENERATE_SSSE3)
  return (get_cpuid_flags() & bit_SSSE3);
#else
  (void)(get_cpuid_flags); /* suppress compiler warning */
  return 0;
#endif
}

where 'get_cpuid_flags()' is based on cpuid(info, &eax, &ebx, &ecx, &edx).

The same is true for POPCNT support on even newer instruction
sets.

If there is a problem, let me know and I will gladly work
to make it fit what Debian needs.

Cheers,

				Andrew
				dalke at dalkescientific.com





More information about the Debichem-devel mailing list