[gmx-developers] Re: Fortran acceleration + OpenMP strangeness
Christoph Junghans
junghans at votca.org
Thu May 31 18:17:09 CEST 2012
I know at least one user running the fortran kernel on SPARC, but
considering the fact that these kernels do not work with threads I
would vote for removing them.
Same for the power6 kernels, the only difference is the usage of
power6 hardware inv. sqrt. As far as I remember there was a bug in
that sqrt, which was fixed by a firmware update, which made the
hardware sqrt as slow as the normal inv. sqrt. (I am not 100% on
that!)
Fortran in general is only faster as the compiler can do more
optimization due to the fact that aliasing is not allowed in Fortran.
In C one can basically achieve nearly the same effect with the
restrict keyword. See:
<http://stackoverflow.com/questions/146159/is-fortran-faster-than-c>
Christoph
2012/5/31 Berk Hess <hess at kth.se>:
> On 05/31/2012 05:40 PM, Szilárd Páll wrote:
>>
>> On Thu, May 31, 2012 at 5:29 PM, Berk Hess<hess at kth.se> wrote:
>>>
>>> Hi,
>>>
>>> But on what platform(s) are Fortran kernels still faster?
>>> If this is only some obscure or old platform, we might want to get rid of
>>> them anyhow.
>>> It mostly does more bad than good, as many people seem to think Fortran
>>> is
>>> faster than C
>>> and therefore compile with Fortran and run into trouble.
>>
>> I'm not an advocate of the Fortran stuff, but I have personally never
>> heard about such incidents. Additionally, none of the alternative
>> acceleration types is simply "C", but rather SSE2, SSE4.1, AVX128,
>> Power6, etc. so I don't see how can such a confusion arise.
>>
>> --
>> Szilárd
>
> Maybe this is no longer an issue with cmake.
> With autoconf there was an enable-fortran flag, I don't see such a flag with
> cmake.
>
> Cheers,
>
> Berk
>>
>>
>>> Cheers,
>>>
>>> Berk
>>>
>>>
>>>
>>> On 05/31/2012 05:26 PM, Erik Lindahl wrote:
>>>>
>>>> Hi,
>>>>
>>>> Formally the Fortran77 standard specifies that all variables should be
>>>> static, which of course interferes in bad ways with threads.
>>>>
>>>> While there are some fortran compilers that require flags to deviCUDA
>>>> driver version is insufficient for CUDA runtime versionate from
>>>>
>>>> this, I don't think GNU is one of them.
>>>>
>>>> I was anyway contemplating whether to disable them (temporarily) and add
>>>> back together with the other kernels in a few days, so I suggest I do
>>>> that
>>>> in the detection patch.
>>>>
>>>> Cheers,
>>>>
>>>> Erik
>>>>
>>>> --
>>>> Erik Lindahl<erik at kth.se> <lindahl at cbr.su.se>
>>>> Professor of Theoretical& Computational Biophysics, KTH
>>>>
>>>> Professor of Computational Structural Biology, Stockholm University
>>>> Tel (KTH): +46 8 55378029 Tel (SU): +46 8 164675
>>>> Cell (Sweden): +46 73 4618050. Cell (US): +1 206 457 7887
>>>>
>>>> On 31 maj 2012, at 17:09, Szilárd Páll<szilard.pall at cbr.su.se> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I bumped into a strange issue when verifying the nbnxn code with
>>>>> Jenkins. Using the Fortran kernels, while the appropriate OpenMP flag
>>>>> is used and mdrun compiles fine, some tools fail to compile with a
>>>>> weird message complaining about missing symbols:
>>>>>
>>>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_get_thread_num'
>>>>> ../gmxlib/libgmx.so.6: undefined reference to `GOMP_parallel_end'
>>>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_get_num_threads'
>>>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_set_num_threads'
>>>>> ../gmxlib/libgmx.so.6: undefined reference to `GOMP_parallel_start'
>>>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_get_max_threads'
>>>>>
>>>>> i) Does anybody have an idea what could be wrong?
>>>>>
>>>>> ii) For what platforms are the fortran kernels still useful? If there
>>>>> is any platform where they provide a faster alternative to the plain C
>>>>> kernels, we should definitely keep them. Otherwise, deprecating them
>>>>> is an option.
>>>>>
>>>>> Cheers,
>>>>> --
>>>>> Szilárd
>>>>>
>
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the www interface
> or send it to gmx-developers-request at gromacs.org.
--
Christoph Junghans
Web: http://www.compphys.de
More information about the gromacs.org_gmx-developers
mailing list