Package com.upmem.dpu
Class DpuSystem
- java.lang.Object
-
- com.upmem.dpu.DpuSystem
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOCATE_ALLConstant used in the allocation methods to allocate all DPUs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DpuSystemallocate()Allocate a DpuSystem with the default profile.static DpuSystemallocate(int nrDpus, java.lang.String profile)Allocate a number of DPUs with the given profile.static DpuSystemallocate(int nrDpus, java.lang.String profile, java.io.PrintStream logStream)Allocate a number of DPUs with the given profile and a default log stream.static DpuSystemallocate(DpuProfile profile)Allocate a DpuSystem with the given profile.static DpuSystemallocateRanks(int nrRanks, java.lang.String profile)Allocate a number of DPU ranks with the given profile.static DpuSystemallocateRanks(int nrRanks, java.lang.String profile, java.io.PrintStream logStream)Allocate a number of DPU ranks with the given profile and a default log stream.DpuSetAsyncasync()voidclose()voidcopy(byte[][] dstBuffers, DpuSymbol srcSymbol)voidcopy(byte[][] dstBuffers, java.lang.String srcSymbol)voidcopy(DpuSymbol dstSymbol, byte[] srcBuffer)voidcopy(DpuSymbol dstSymbol, byte[][] srcBuffers)voidcopy(java.lang.String dstSymbol, byte[] srcBuffer)voidcopy(java.lang.String dstSymbol, byte[][] srcBuffers)DpuDescriptiondescription()Return the description of the current DpuSystem.static DpuDescriptiondescription(java.lang.String profile)Fetch the DPU description for the given profile.java.util.List<Dpu>dpus()Provide the DPU devices in the set.voidexec()voidexec(java.io.PrintStream logStream)voidfree()Free the DPUs of the current DpuSystem.DpuProgramInfoload(java.lang.String dpuExecutable)voidlog()voidlog(java.io.PrintStream logStream)java.util.List<DpuRank>ranks()Provide the DPU ranks in the set.voidreset()
-
-
-
Field Detail
-
ALLOCATE_ALL
public static final int ALLOCATE_ALL
Constant used in the allocation methods to allocate all DPUs.- See Also:
- Constant Field Values
-
-
Method Detail
-
description
public static DpuDescription description(java.lang.String profile) throws DpuException
Fetch the DPU description for the given profile.- Parameters:
profile- The DPU profile.- Returns:
- The DPU description.
- Throws:
DpuException- When the profile is incorrect.- See Also:
DpuDescription,DpuException
-
allocate
public static DpuSystem allocate(int nrDpus, java.lang.String profile) throws DpuException
Allocate a number of DPUs with the given profile.- Parameters:
nrDpus- The number of DPUs to allocate.ALLOCATE_ALLto allocate all available DPUs.profile- The DPU profile. Use an empty string for the default profile.- Returns:
- The allocated DPU system.
- Throws:
DpuException- When the DPUs could not be allocated- See Also:
ALLOCATE_ALL,DpuException
-
allocate
public static DpuSystem allocate(int nrDpus, java.lang.String profile, java.io.PrintStream logStream) throws DpuException
Allocate a number of DPUs with the given profile and a default log stream.- Parameters:
nrDpus- The number of DPUs to allocate.ALLOCATE_ALLto allocate all available DPUs.profile- The DPU profile. Use an empty string for the default profile.logStream- The default stream where the DPU logs will be printed after execution.- Returns:
- The allocated DPU system.
- Throws:
DpuException- When the DPUs could not be allocated- See Also:
ALLOCATE_ALL,DpuException
-
allocateRanks
public static DpuSystem allocateRanks(int nrRanks, java.lang.String profile) throws DpuException
Allocate a number of DPU ranks with the given profile.- Parameters:
nrRanks- The number of DPU ranks to allocate.ALLOCATE_ALLto allocate all available DPUs.profile- The DPU profile. Use an empty string for the default profile.- Returns:
- The allocated DPU system.
- Throws:
DpuException- When the DPUs could not be allocated- See Also:
ALLOCATE_ALL,DpuException
-
allocateRanks
public static DpuSystem allocateRanks(int nrRanks, java.lang.String profile, java.io.PrintStream logStream) throws DpuException
Allocate a number of DPU ranks with the given profile and a default log stream.- Parameters:
nrRanks- The number of DPU ranks to allocate.ALLOCATE_ALLto allocate all available DPUs.profile- The DPU profile. Use an empty string for the default profile.logStream- The default stream where the DPU logs will be printed after execution.- Returns:
- The allocated DPU system.
- Throws:
DpuException- When the DPUs could not be allocated- See Also:
ALLOCATE_ALL,DpuException
-
allocate
public static DpuSystem allocate(DpuProfile profile) throws DpuException
Allocate a DpuSystem with the given profile.- Parameters:
profile- The DPU profile.- Returns:
- The allocated DPU system.
- Throws:
DpuException- When the DPUs could not be allocated- See Also:
DpuProfile,DpuException
-
allocate
public static DpuSystem allocate() throws DpuException
Allocate a DpuSystem with the default profile.- Returns:
- The allocated DPU system.
- Throws:
DpuException- When the DPUs could not be allocated- See Also:
DpuException
-
description
public DpuDescription description()
Return the description of the current DpuSystem.- Returns:
- The DPU description.
- See Also:
DpuDescription
-
free
public void free() throws DpuExceptionFree the DPUs of the current DpuSystem.The DpuSystem should not be used anymore after calling this method.
- Throws:
DpuException- When the DPUs could not be freed.- See Also:
DpuException
-
dpus
public java.util.List<Dpu> dpus()
Description copied from interface:DpuSetProvide the DPU devices in the set.
-
ranks
public java.util.List<DpuRank> ranks()
Description copied from interface:DpuSetProvide the DPU ranks in the set.
-
close
public void close() throws DpuException- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
DpuException
-
async
public DpuSetAsync async()
-
reset
public void reset() throws DpuException- Throws:
DpuException
-
load
public DpuProgramInfo load(java.lang.String dpuExecutable) throws DpuException
- Throws:
DpuException
-
copy
public void copy(java.lang.String dstSymbol, byte[] srcBuffer) throws DpuException- Throws:
DpuException
-
copy
public void copy(DpuSymbol dstSymbol, byte[] srcBuffer) throws DpuException
- Throws:
DpuException
-
copy
public void copy(java.lang.String dstSymbol, byte[][] srcBuffers) throws DpuException- Throws:
DpuException
-
copy
public void copy(DpuSymbol dstSymbol, byte[][] srcBuffers) throws DpuException
- Throws:
DpuException
-
copy
public void copy(byte[][] dstBuffers, java.lang.String srcSymbol) throws DpuException- Throws:
DpuException
-
copy
public void copy(byte[][] dstBuffers, DpuSymbol srcSymbol) throws DpuException- Throws:
DpuException
-
exec
public void exec() throws DpuException- Throws:
DpuException
-
exec
public void exec(java.io.PrintStream logStream) throws DpuException- Throws:
DpuException
-
log
public void log() throws DpuException- Throws:
DpuException
-
log
public void log(java.io.PrintStream logStream) throws DpuException- Throws:
DpuException
-
-