[Cado-nfs-discuss] OpenMP Usage

Emmanuel Thomé emmanuel.thome at inria.fr
Sun Nov 18 18:42:47 CET 2018


For sieving proper, price per byte of ram is excessive. For cofactorisation, gpus have always been integer-arithmetic impaired. People have tried (see 
https://infoscience.epfl.ch/record/203916/files/397.pdf ). Basically if a stock of gpus falls off a truck and you don't have to pay for them nor for their energy consumption, then yes you can use them somewhat profitably (but this was a few years ago, and the situation has not evolved for the better). If you have some money available to buy machines for sieving, just don't go for gpus.
E.

On November 18, 2018 5:59:12 PM GMT+01:00, Robert Pancoast <robertpancoast77 at gmail.com> wrote:
>Hello Emmanuel,
>
>I greatly appreciate your insight. Can you please provide more details
>as to why the GPUs do not work for sieving? I am curious about sieve
>subprogram and it’s details. 
>
>Thanks,
>Robert
>
>> On Nov 15, 2018, at 8:21 AM, Emmanuel Thomé <Emmanuel.Thome at inria.fr>
>wrote:
>> 
>> No.
>> 
>> (long answer: absolutely no interest in exploring GPUs for sieving.
>> Return over investment is not even provably positive).
>> 
>> E.
>> 
>>> On Thu, Nov 15, 2018 at 05:43:48AM -0500, Robert Pancoast wrote:
>>> Hello Emmanuel,
>>> 
>>> Thanks for the information. I am specifically curious about OpenMP
>because the latest release supports offload to Nvidia GPU. What are
>your thoughts on accelerating the Cado-nfs system with GPU?
>>> 
>>> Thanks,
>>> Robert
>>> 
>>>>> On Nov 15, 2018, at 2:35 AM, Emmanuel Thomé
><Emmanuel.Thome at inria.fr> wrote:
>>>>> 
>>>>> On Wed, Nov 14, 2018 at 07:06:23PM -0500, Robert Pancoast wrote:
>>>>> Hello Emmanuel,
>>>>> 
>>>>> I appreciate the insight.  Is it possible to convert the
>subprograms
>>>>> that use C++11 threads.and posix threads to use OpenMP?
>>>> 
>>>> Probably not, and we won't do that anyway. These are three
>different
>>>> interfaces to mostly the same bare bones, and it's pointless to
>express a
>>>> strong preference or dislike for one versus the others. All have
>pros and
>>>> cons. The idea of convenience or habits for the person programming
>the
>>>> software comes first.
>>>> 
>>>>> Additionally,
>>>>> which subprograms compose the majority of execution time
>throughout
>>>>> factorization?
>>>> 
>>>> sieving (aka "las" in cado-nfs).
>>>> 
>>>> E.
>>>> 
>>>>> 
>>>>> Thanks,
>>>>> Robert
>>>>>>> On Wed, Nov 14, 2018 at 2:54 AM Emmanuel Thomé
><Emmanuel.Thome at inria.fr> wrote:
>>>>>>> 
>>>>>>> On Tue, Nov 13, 2018 at 09:22:07PM -0500, Robert Pancoast wrote:
>>>>>>> Greetings,
>>>>>>> 
>>>>>>> I have an interest in further exploring cado-nfs usage, but it
>has been quite some time since I have looked into the sources. In the
>current codebase, does there exist openMP usage? What are the major
>stages of a factorization, and which (if any) utilization openMP?
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> cado-nfs does use openmp. More broadly, cado-nfs has been using
>threads
>>>>>> from day one. This being said, cado-nfs comprises many
>subprograms, and
>>>>>> their use of threads varies. Here's a quick recap off the top of
>my head
>>>>>> (with some help from "git grep"):
>>>>>> 
>>>>>> 
>>>>>> polyselect:
>>>>>>   main program uses posix threads.
>>>>>>   root optimization uses openmp.
>>>>>>   DL polyselect uses openmp.
>>>>>> 
>>>>>> sieve:
>>>>>>   "makefb" uses posix threads.
>>>>>>   "las" uses posix threads and C++11 threads.
>>>>>>   "batch cofactorization" uses openmp.
>>>>>> 
>>>>>> filter:
>>>>>>   heavylifting of relation i/o uses posix threads (with
>minimalist
>>>>>>   locking) (this is pervasive in almost all of the filter code).
>>>>>>   some spots in "merge" and "replay" use openmp.
>>>>>> 
>>>>>> linear algebra:
>>>>>>   most of the code uses posix threads, as well as MPI.
>>>>>>   linear generator computation uses openmp and MPI (subject to
>evolve soon).
>>>>>> 
>>>>>> other:
>>>>>>   "characters" and "sqrt" use posix threads.
>>>>>>   "crtalgsqrt" uses posix threads and MPI.
>>>>>> 
>>>>>> 
>>>>>> Whether some code is written to use posix threads or openmp or
>c++11
>>>>>> threads or whatnot depends on multiple factors. Some things are
>best done
>>>>>> in one model rather than another. Some of the authors have a
>preference
>>>>>> towards one model rather than another, too.
>>>>>> 
>>>>>> E.

-- 
Sent from my phone. Please excuse brevity and misspellings.


More information about the Cado-nfs-discuss mailing list