edu.jas.gb
Class GroebnerBaseDistributedHybrid<C extends RingElem<C>>

java.lang.Object
  extended by edu.jas.gb.GroebnerBaseAbstract<C>
      extended by edu.jas.gb.GroebnerBaseDistributedHybrid<C>
Type Parameters:
C - coefficient type
All Implemented Interfaces:
GroebnerBase<C>, java.io.Serializable

public class GroebnerBaseDistributedHybrid<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. Using pairlist class, distributed multi-threaded tasks do reduction, one communication channel per remote node.

Author:
Heinz Kredel
See Also:
Serialized Form

Field Summary
static java.lang.Integer ackTag
          Message tag for acknowledgments.
 boolean debug
           
protected static int DEFAULT_PORT
          Default server port.
protected static int DEFAULT_THREADS
          Default number of threads.
protected static int DEFAULT_THREADS_PER_NODE
          Default number of threads per compute node.
static org.apache.log4j.Logger logger
           
static java.lang.Integer pairTag
          Message tag for pairs.
protected  ThreadPool pool
          Pool of threads to use.
protected  int port
          Server port to use.
static java.lang.Integer resultTag
          Message tag for results.
protected  int threads
          Number of threads to use.
protected  int threadsPerNode
          Number of threads per node to use.
 
Fields inherited from class edu.jas.gb.GroebnerBaseAbstract
blas, red, strategy
 
Constructor Summary
GroebnerBaseDistributedHybrid()
          Constructor.
GroebnerBaseDistributedHybrid(int threads)
          Constructor.
GroebnerBaseDistributedHybrid(int threads, int port)
          Constructor.
GroebnerBaseDistributedHybrid(int threads, int threadsPerNode, int port)
          Constructor.
GroebnerBaseDistributedHybrid(int threads, int threadsPerNode, PairList<C> pl, int port)
          Constructor.
GroebnerBaseDistributedHybrid(int threads, int threadsPerNode, ThreadPool pool, int port)
          Constructor.
GroebnerBaseDistributedHybrid(int threads, int threadsPerNode, ThreadPool pool, PairList<C> pl, int port)
          Constructor.
GroebnerBaseDistributedHybrid(int threads, ThreadPool pool, int port)
          Constructor.
 
Method Summary
 void clientPart(java.lang.String host)
          GB distributed client.
 java.util.List<GenPolynomial<C>> GB(int modv, java.util.List<GenPolynomial<C>> F)
          Distributed hybrid Groebner base.
 java.util.List<GenPolynomial<C>> minimalGB(java.util.List<GenPolynomial<C>> Fp)
          Minimal ordered groebner basis.
 void terminate()
          Cleanup and terminate.
 
Methods inherited from class edu.jas.gb.GroebnerBaseAbstract
cancel, commonZeroTest, extGB, extGB, GB, isGB, isGB, isReductionMatrix, isReductionMatrix, minimalExtendedGB, normalizeMatrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final org.apache.log4j.Logger logger

debug

public 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 ThreadPool pool
Pool of threads to use.


DEFAULT_PORT

protected static final int DEFAULT_PORT
Default server port.

See Also:
Constant Field Values

port

protected final int port
Server port 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

GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid()
Constructor.


GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid(int threads)
Constructor.

Parameters:
threads - number of threads to use.

GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid(int threads,
                                     int port)
Constructor.

Parameters:
threads - number of threads to use.
port - server port to use.

GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid(int threads,
                                     int threadsPerNode,
                                     int port)
Constructor.

Parameters:
threads - number of threads to use.
threadsPerNode - threads per node to use.
port - server port to use.

GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid(int threads,
                                     ThreadPool pool,
                                     int port)
Constructor.

Parameters:
threads - number of threads to use.
pool - ThreadPool to use.
port - server port to use.

GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid(int threads,
                                     int threadsPerNode,
                                     PairList<C> pl,
                                     int port)
Constructor.

Parameters:
threads - number of threads to use.
threadsPerNode - threads per node to use.
pl - pair selection strategy
port - server port to use.

GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid(int threads,
                                     int threadsPerNode,
                                     ThreadPool pool,
                                     int port)
Constructor.

Parameters:
threads - number of threads to use.
threadsPerNode - threads per node to use.
port - server port to use.

GroebnerBaseDistributedHybrid

public GroebnerBaseDistributedHybrid(int threads,
                                     int threadsPerNode,
                                     ThreadPool pool,
                                     PairList<C> pl,
                                     int port)
Constructor.

Parameters:
threads - number of threads to use.
threadsPerNode - threads per node to use.
pool - ThreadPool to use.
pl - pair selection strategy
port - server port to use.
Method Detail

terminate

public void terminate()
Cleanup and terminate.

Overrides:
terminate in class GroebnerBaseAbstract<C extends RingElem<C>>

GB

public java.util.List<GenPolynomial<C>> GB(int modv,
                                           java.util.List<GenPolynomial<C>> F)
Distributed hybrid 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.

clientPart

public void clientPart(java.lang.String host)
                throws java.io.IOException
GB distributed client.

Parameters:
host - the server runs on.
Throws:
java.io.IOException

minimalGB

public java.util.List<GenPolynomial<C>> minimalGB(java.util.List<GenPolynomial<C>> Fp)
Minimal ordered groebner basis.

Specified by:
minimalGB in interface GroebnerBase<C extends RingElem<C>>
Overrides:
minimalGB in class GroebnerBaseAbstract<C extends RingElem<C>>
Parameters:
Fp - a Groebner base.
Returns:
a reduced Groebner base of Fp.