Package edu.jas.gb
Class GroebnerBaseDistributedEC<C extends RingElem<C>>
- java.lang.Object
-
- edu.jas.gb.GroebnerBaseAbstract<C>
-
- edu.jas.gb.GroebnerBaseDistributedEC<C>
-
- Type Parameters:
C- coefficient type
- All Implemented Interfaces:
GroebnerBase<C>,java.io.Serializable
public class GroebnerBaseDistributedEC<C extends RingElem<C>> extends GroebnerBaseAbstract<C>
Groebner Base distributed algorithm. Implements a distributed memory parallel version of Groebner bases with executable channels. Using pairlist class, distributed tasks do reduction, one communication channel per task.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_PORTDefault server port.protected static intDEFAULT_THREADSDefault number of threads.protected intDHT_PORTDefault distributed hash table server port.protected java.lang.Stringmfilemachine file to use.protected java.util.concurrent.ExecutorServicepoolPool of threads to use.protected intportServer port to use.protected intthreadsNumber of threads to use.-
Fields inherited from class edu.jas.gb.GroebnerBaseAbstract
blas, red, strategy
-
-
Constructor Summary
Constructors Constructor Description GroebnerBaseDistributedEC(java.lang.String mfile)Constructor.GroebnerBaseDistributedEC(java.lang.String mfile, int threads)Constructor.GroebnerBaseDistributedEC(java.lang.String mfile, int threads, int port)Constructor.GroebnerBaseDistributedEC(java.lang.String mfile, int threads, PairList<C> pl, int port)Constructor.GroebnerBaseDistributedEC(java.lang.String mfile, int threads, java.util.concurrent.ExecutorService pool, int port)Constructor.GroebnerBaseDistributedEC(java.lang.String mfile, int threads, java.util.concurrent.ExecutorService pool, PairList<C> pl, int port)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <C extends RingElem<C>>
voidclientPart(java.lang.String host, int port, int dhtport)GB distributed client part.java.util.List<GenPolynomial<C>>GB(int modv, java.util.List<GenPolynomial<C>> F)Distributed Groebner base.java.util.List<GenPolynomial<C>>minimalGB(java.util.List<GenPolynomial<C>> Fp)Minimal ordered groebner basis.voidterminate()Cleanup and terminate ExecutorService.voidterminate(boolean shutDown)Terminates the distributed thread pools.-
Methods inherited from class edu.jas.gb.GroebnerBaseAbstract
cancel, commonZeroTest, constructUnivariate, extGB, extGB, GB, GB, GB, isGB, isGB, isGB, isGB, isGB, isGB, isGBidem, isGBsimple, isMinimalGB, isReductionMatrix, isReductionMatrix, minimalExtendedGB, normalizeMatrix, normalizeZerosOnes, toString, univariateDegrees
-
-
-
-
Field Detail
-
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
-
pool
protected final transient java.util.concurrent.ExecutorService pool
Pool of threads to use. Note: No ComputerThreads for one node tests
-
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.
-
port
protected final int port
Server port to use.
-
mfile
protected final java.lang.String mfile
machine file to use.
-
-
Constructor Detail
-
GroebnerBaseDistributedEC
public GroebnerBaseDistributedEC(java.lang.String mfile)
Constructor.- Parameters:
mfile- name of the machine file.
-
GroebnerBaseDistributedEC
public GroebnerBaseDistributedEC(java.lang.String mfile, int threads)
Constructor.- Parameters:
mfile- name of the machine file.threads- number of threads to use.
-
GroebnerBaseDistributedEC
public GroebnerBaseDistributedEC(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.
-
GroebnerBaseDistributedEC
public GroebnerBaseDistributedEC(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.
-
GroebnerBaseDistributedEC
public GroebnerBaseDistributedEC(java.lang.String mfile, int threads, PairList<C> pl, int port)
Constructor.- Parameters:
mfile- name of the machine file.threads- number of threads to use.pl- pair selection strategyport- server port to use.
-
GroebnerBaseDistributedEC
public GroebnerBaseDistributedEC(java.lang.String mfile, int threads, java.util.concurrent.ExecutorService pool, PairList<C> pl, int port)
Constructor.- Parameters:
mfile- name of the machine file.threads- number of threads to use.pool- ExecutorService to use.pl- pair selection strategyport- server port to use.
-
-
Method Detail
-
terminate
public void terminate()
Cleanup and terminate ExecutorService.- Overrides:
terminatein classGroebnerBaseAbstract<C extends RingElem<C>>
-
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.
-
clientPart
public static <C extends RingElem<C>> void clientPart(java.lang.String host, 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
-
minimalGB
public java.util.List<GenPolynomial<C>> minimalGB(java.util.List<GenPolynomial<C>> Fp)
Minimal ordered groebner basis.- Specified by:
minimalGBin interfaceGroebnerBase<C extends RingElem<C>>- Overrides:
minimalGBin classGroebnerBaseAbstract<C extends RingElem<C>>- Parameters:
Fp- a Groebner base.- Returns:
- a reduced Groebner base of Fp.
-
-