Java COMPSs Matrix Multiplication, out-of-core using files, reproducible example, data persistence False, MareNostrum V
**Name:** Matrix Multiplication
**Contact Person:** support-compss@bsc.es
**Access Level:** public
**License Agreement:** Apache2
**Platform:** COMPSs
# Description
Matrix multiplication is a binary operation that takes a pair of matrices and produces another matrix.
If A is an n×m matrix and B is an m×p matrix, the result AB of their multiplication is an n×p matrix defined only if the number of columns m in A is equal to the number of rows m in B. When multiplying A and B, the elements of the rows in A are multiplied with corresponding columns in B.
In this implementation, A and B are square matrices (same number of rows and columns), and so it is the result matrix C. Each matrix is divided in N blocks of M doubles. The multiplication of two blocks is done by a multiply task method with a simple three-nested-loop implementation. When executed with COMPSs, the main program generates N^3^ tasks arranged as N^2^ chains of N tasks in the dependency graph.
N and M have been hardcoded to 6 and 8 respectively.
# Execution instructions
Usage:
```
runcompss --classpath=application_sources/jar/matmul.jar matmul.files.Matmul inputFolder/ outputFolder/
```
where:
* inputFolder: folder where input files are located
* outputFolder: folder where output files are located
# Execution Example
```
runcompss matmul.files.Matmul dataset/inputs/ dataset/outputs/
```
# Build
## Option 1: Native java
```
javac src/main/java/matmul/*/*.java
cd src/main/java/; jar cf matmul.jar matmul/
cd ../../../; mv src/main/java/matmul.jar jar/
```
## Option 2: Maven
```
mvn clean package
```
- Publisher
- [<#ROCrate::Organization https://ror.org/05sd8tv96 @properties={"@id"=>"https://ror.org/05sd8tv96", "@type"=>"Organization", "name"=>"Barcelona Supercomputing Center"}>]
- License
- Apache-2.0
Contents
-
Matmul.java
Size: 4697
Format: text/plain
-
complete_graph.svg
Size: 141286
Format: [["image/svg+xml", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/fmt/92 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/fmt/92", "@type"=>"WebSite", "name"=>"Scalable Vector Graphics"}>]]
-
Block.java
Size: 4189
Format: text/plain
-
MatmulImpl.java
Size: 940
Format: text/plain
-
MatmulItf.java
Size: 1464
Format: text/plain
-
App_Profile.json
Size: 346
Format: ["application/json", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/fmt/817 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/fmt/817", "@type"=>"WebSite", "name"=>"JSON Data Interchange Format"}>]
-
compss_submission_command_line.txt
Size: 322
Format: text/plain
-
java_matmul_reproducible_mn5.yaml
Size: 2236
Format: ["YAML", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/fmt/818 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/fmt/818", "@type"=>"WebSite", "name"=>"YAML"}>]
-
matmul.jar
Size: 9090
Format: [["application/java-archive", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/x-fmt/412 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/x-fmt/412", "@type"=>"WebSite", "name"=>"Java Archive Format"}>]]
-
resources.xml
Size: 983
-
project.xml
Size: 289
-
matmul.jar
Size: 9090
Format: [["application/java-archive", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/x-fmt/412 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/x-fmt/412", "@type"=>"WebSite", "name"=>"Java Archive Format"}>]]
-
MatmulImpl.class
Size: 812
Format: [["Java .class", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415", "@type"=>"WebSite", "name"=>"Java Compiled Object Code"}>]]
-
Matmul.class
Size: 4508
Format: [["Java .class", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415", "@type"=>"WebSite", "name"=>"Java Compiled Object Code"}>]]
-
MatmulItf.class
Size: 642
Format: [["Java .class", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415", "@type"=>"WebSite", "name"=>"Java Compiled Object Code"}>]]
-
Block.class
Size: 4540
Format: [["Java .class", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/x-fmt/415", "@type"=>"WebSite", "name"=>"Java Compiled Object Code"}>]]
-
.gitkeep
Size: 0
-
pom.properties
Size: 129
-
compss-api-2.8.rc2101.jar
Size: 27687
Format: [["application/java-archive", <#ROCrate::ContextualEntity https://www.nationalarchives.gov.uk/PRONOM/x-fmt/412 @properties={"@id"=>"https://www.nationalarchives.gov.uk/PRONOM/x-fmt/412", "@type"=>"WebSite", "name"=>"Java Archive Format"}>]]
-
createdFiles.lst
Size: 110
-
inputFiles.lst
Size: 410
-
pom.xml
Size: 4804
-
A.0.0
Size: 265
-
A.0.1
Size: 265
-
A.0.2
Size: 265
-
A.0.3
Size: 265
-
A.0.4
Size: 265
-
A.0.5
Size: 265
-
A.1.0
Size: 265
-
A.1.1
Size: 265
-
A.1.2
Size: 265
-
A.1.3
Size: 265
-
A.1.4
Size: 265
-
A.1.5
Size: 265
-
A.2.0
Size: 265
-
A.2.1
Size: 265
-
A.2.2
Size: 265
-
A.2.3
Size: 265
-
A.2.4
Size: 265
-
A.2.5
Size: 265
-
A.3.0
Size: 265
-
A.3.1
Size: 265
-
A.3.2
Size: 265
-
A.3.3
Size: 265
-
A.3.4
Size: 265
-
A.3.5
Size: 265
-
A.4.0
Size: 265
-
A.4.1
Size: 265
-
A.4.2
Size: 265
-
A.4.3
Size: 265
-
A.4.4
Size: 265
-
A.4.5
Size: 265
-
A.5.0
Size: 265
-
A.5.1
Size: 265
-
A.5.2
Size: 265
-
A.5.3
Size: 265
-
A.5.4
Size: 265
-
A.5.5
Size: 265
-
B.0.0
Size: 265
-
B.0.1
Size: 265
-
B.0.2
Size: 265
-
B.0.3
Size: 265
-
B.0.4
Size: 265
-
B.0.5
Size: 265
-
B.1.0
Size: 265
-
B.1.1
Size: 265
-
B.1.2
Size: 265
-
B.1.3
Size: 265
-
B.1.4
Size: 265
-
B.1.5
Size: 265
-
B.2.0
Size: 265
-
B.2.1
Size: 265
-
B.2.2
Size: 265
-
B.2.3
Size: 265
-
B.2.4
Size: 265
-
B.2.5
Size: 265
-
B.3.0
Size: 265
-
B.3.1
Size: 265
-
B.3.2
Size: 265
-
B.3.3
Size: 265
-
B.3.4
Size: 265
-
B.3.5
Size: 265
-
B.4.0
Size: 265
-
B.4.1
Size: 265
-
B.4.2
Size: 265
-
B.4.3
Size: 265
-
B.4.4
Size: 265
-
B.4.5
Size: 265
-
B.5.0
Size: 265
-
B.5.1
Size: 265
-
B.5.2
Size: 265
-
B.5.3
Size: 265
-
B.5.4
Size: 265
-
B.5.5
Size: 265
-
C.0.0
Size: 392
-
C.0.1
Size: 392
-
C.0.2
Size: 392
-
C.0.3
Size: 392
-
C.0.4
Size: 392
-
C.0.5
Size: 392
-
C.1.0
Size: 392
-
C.1.1
Size: 392
-
C.1.2
Size: 392
-
C.1.3
Size: 392
-
C.1.4
Size: 392
-
C.1.5
Size: 392
-
C.2.0
Size: 392
-
C.2.1
Size: 392
-
C.2.2
Size: 392
-
C.2.3
Size: 392
-
C.2.4
Size: 392
-
C.2.5
Size: 392
-
C.3.0
Size: 392
-
C.3.1
Size: 392
-
C.3.2
Size: 392
-
C.3.3
Size: 392
-
C.3.4
Size: 392
-
C.3.5
Size: 392
-
C.4.0
Size: 392
-
C.4.1
Size: 392
-
C.4.2
Size: 392
-
C.4.3
Size: 392
-
C.4.4
Size: 392
-
C.4.5
Size: 392
-
C.5.0
Size: 392
-
C.5.1
Size: 392
-
C.5.2
Size: 392
-
C.5.3
Size: 392
-
C.5.4
Size: 392
-
C.5.5
Size: 392
-
compss-4500562.out
Size: 2674
Format: text/plain
-
compss-4500562.err
Size: 224
Format: text/plain