Package edu.jas.gb

Class GroebnerBaseDistributedHybridEC<C extends RingElem<C>>

  • Type Parameters:
    C - coefficient type
    All Implemented Interfaces:
    GroebnerBase<C>, java.io.Serializable

    public class GroebnerBaseDistributedHybridEC<C extends RingElem<C>>
    extends GroebnerBaseAbstract<C>
    Groebner Base distributed hybrid algorithm. Implements a distributed memory with multi-core CPUs parallel version of Groebner bases with executable channels. Using pairlist class, distributed multi-threaded tasks do reduction, one communication channel per remote node.
    See Also:
    Serialized Form
    • Field Detail

      • logger

        private static final org.apache.logging.log4j.Logger logger
      • debug

        private static final boolean debug
      • threads

        protected final int threads
        Number of threads to use.
      • DEFAULT_THREADS

        protected static final int DEFAULT_THREADS
        Default number of threads.
        See Also:
        Constant Field Values
      • threadsPerNode

        protected final int threadsPerNode
        Number of threads per node to use.
      • DEFAULT_THREADS_PER_NODE

        protected static final int DEFAULT_THREADS_PER_NODE
        Default number of threads per compute node.
        See Also:
        Constant Field Values
      • pool

        protected final transient java.util.concurrent.ExecutorService pool
        Pool of threads to use.
      • DEFAULT_PORT

        protected static final int DEFAULT_PORT
        Default server port.
        See Also:
        Constant Field Values
      • DHT_PORT

        protected final int DHT_PORT
        Default distributed hash table server port.
      • mfile

        protected final java.lang.String mfile
        machine file to use.
      • port

        protected final int port
        Server port to use.
      • dtp

        private final transient DistThreadPool dtp
        Distributed thread pool to use.
      • dhts

        private final transient DistHashTableServer<java.lang.Integer> dhts
        Distributed hash table server to use.
      • pairTag

        public static final java.lang.Integer pairTag
        Message tag for pairs.
      • resultTag

        public static final java.lang.Integer resultTag
        Message tag for results.
      • ackTag

        public static final java.lang.Integer ackTag
        Message tag for acknowledgments.
    • Constructor Detail

      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile)
        Constructor.
        Parameters:
        mfile - name of the machine file.
      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile,
                                               int threads)
        Constructor.
        Parameters:
        mfile - name of the machine file.
        threads - number of threads to use.
      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile,
                                               int threads,
                                               int port)
        Constructor.
        Parameters:
        mfile - name of the machine file.
        threads - number of threads to use.
        port - server port to use.
      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile,
                                               int threads,
                                               int threadsPerNode,
                                               int port)
        Constructor.
        Parameters:
        mfile - name of the machine file.
        threads - number of threads to use.
        threadsPerNode - threads per node to use.
        port - server port to use.
      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile,
                                               int threads,
                                               java.util.concurrent.ExecutorService pool,
                                               int port)
        Constructor.
        Parameters:
        mfile - name of the machine file.
        threads - number of threads to use.
        pool - ExecutorService to use.
        port - server port to use.
      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile,
                                               int threads,
                                               int threadsPerNode,
                                               PairList<C> pl,
                                               int port)
        Constructor.
        Parameters:
        mfile - name of the machine file.
        threads - number of threads to use.
        threadsPerNode - threads per node to use.
        pl - pair selection strategy
        port - server port to use.
      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile,
                                               int threads,
                                               int threadsPerNode,
                                               java.util.concurrent.ExecutorService pool,
                                               int port)
        Constructor.
        Parameters:
        mfile - name of the machine file.
        threads - number of threads to use.
        threadsPerNode - threads per node to use.
        port - server port to use.
      • GroebnerBaseDistributedHybridEC

        public GroebnerBaseDistributedHybridEC​(java.lang.String mfile,
                                               int threads,
                                               int threadsPerNode,
                                               java.util.concurrent.ExecutorService pool,
                                               PairList<C> pl,
                                               int port)
        Constructor.
        Parameters:
        mfile - name of the machine file.
        threads - number of threads to use.
        threadsPerNode - threads per node to use.
        pool - ExecutorService to use.
        pl - pair selection strategy
        port - server port to use.
    • Method Detail

      • terminate

        public void terminate​(boolean shutDown)
        Terminates the distributed thread pools.
        Parameters:
        shutDown - true, if shut-down of the remote executable servers is requested, false, if remote executable servers stay alive.
      • GB

        public java.util.List<GenPolynomial<C>> GB​(int modv,
                                                   java.util.List<GenPolynomial<C>> F)
        Distributed Groebner base.
        Parameters:
        modv - number of module variables.
        F - polynomial list.
        Returns:
        GB(F) a Groebner base of F or null, if a IOException occurs.
      • GBMaster

        java.util.List<GenPolynomial<C>> GBMaster​(int modv,
                                                  java.util.List<GenPolynomial<C>> F)
        Distributed hybrid Groebner base.
        Parameters:
        modv - number of module variables.
        F - non empty monic polynomial list without zeros.
        Returns:
        GB(F) a Groebner base of F or null, if a IOException occurs.
      • clientPart

        public static <C extends RingElem<C>> void clientPart​(java.lang.String host,
                                                              int threadsPerNode,
                                                              int port,
                                                              int dhtport)
                                                       throws java.io.IOException
        GB distributed client part.
        Parameters:
        host - the server runs on.
        port - the server runs.
        dhtport - of the DHT server.
        Throws:
        java.io.IOException