fommil / matrix-toolkits-java Goto Github PK
View Code? Open in Web Editor NEW:rocket: High Performance Linear Algebra OOP
License: GNU Lesser General Public License v3.0
:rocket: High Performance Linear Algebra OOP
License: GNU Lesser General Public License v3.0
I'm looking at the matrix market file format from http://math.nist.gov/MatrixMarket/formats.html#MMformat, and the readMatrixSize code doesn't parse it correctly, unless I'm terribly mistaken somewhere.
I hope I'm not missing something here, but I picked a sparse matrix from matrix market at random(http://math.nist.gov/MatrixMarket/data/misc/hamm/memplus.html) and it isn't getting read by very basic code:
FileReader r = new FileReader(args[0]);
MatrixVectorReader mr = new MatrixVectorReader(r);
CompRowMatrix mat = new CompRowMatrix(mr);
The responsible code is below
int numRows = getInt(), numColumns = getInt();
// --------- this consumes the entry count ----------------
int size = getInt();
// For coordinate matrices we also read the number of entries
if (info.isDense())
return new MatrixSize(numRows, numColumns, info);
else {
// -------- so this actually reads the next integer --------------
int numEntries = getInt();
Original author: [email protected] (April 01, 2009 16:57:11)
What steps will reproduce the problem?
Calling AbstractMatrix.rank1(double alpha, Vector x), where alpha != 1,
results in an incorrect result. Example code:
import java.util.Arrays;
import no.uib.cipr.matrix.DenseMatrix;
import no.uib.cipr.matrix.DenseVector;
public class Rank1Broken {
public static void main(String[] args) {
DenseVector v = new DenseVector(new double [] {1, 2, 3});
// These two lines yield the same result -- good.
DenseMatrix M1 = new DenseMatrix(3, 3);
M1.rank1(1, v);
DenseMatrix M2 = new DenseMatrix(3, 3);
M2.rank1(1, v, v);
if (!Arrays.equals(M1.getData(), M2.getData())) {
throw new RuntimeException("M1 != M2");
}
// Setting alpha != 1 causes the above to break.
// Specifically, matrix M3 now contains an invalid result
DenseMatrix M3 = new DenseMatrix(3, 3);
M3.rank1(3, v);
DenseMatrix M4 = new DenseMatrix(3, 3);
M4.rank1(3, v, v);
if (!Arrays.equals(M3.getData(), M4.getData())) {
throw new RuntimeException("M3 != M4");
}
}
}
What is the expected output? What do you see instead?
Matrix M3 should be identical to matrix M4. Instead, they are not equal,
as there is a bug in the rank1(double alpha, Vector x) method of
AbstractMatrix.
Changing the AbstractMatrix.rank1(double alpha, Vector x) behavior to the
following should fix the problem, e.g.:
// Old method
public Matrix rank1(double alpha, Vector x) {
return rank1(1, x, x);
}
// Fixed method
public Matrix rank1(double alpha, Vector x) {
return rank1(alpha, x, x);
}
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=12
Original author: [email protected] (June 22, 2008 19:55:58)
see junit case
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=5
now that we have offset support in netlib-java, we should consider a Vector implementation that takes an array, an offset, and a length, and behaves just like a DenseVector... including support from DenseVector and DenseMatrix for the BLAS routines.
We could potentially add similar support for "sub matrices", but that's probably a much rarer use case.
Original author: PaulJohnLeonard (January 05, 2010 11:37:47)
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Testcase:
testColumnBiCGstab_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest):
FAILED
expected:<0.5243072402384373> but was:<0.0>
junit.framework.AssertionFailedError: expected:<0.5243072402384373> but
was:<0.0>
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:260)
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testColumnBiCGstab_1(DistIterativeSolverTest.java:176)
Test no.uib.cipr.matrix.distributed.DistIterativeSolverTest FAILED
What version of the product are you using? On what operating system?
SVN at 11:36 5'th jan (GMT)
Please provide any additional information below.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=19
Hi,
I am trying to arrange a benchmark and I need to include MTJ-N to prove it is faster than other libraries when working with big matrices. I am trying to deploy a simple application in ubuntu from the command line (An amazon EC2 instance). When I try to execute my application (which for now makes a simple multiplication), a NoClassDefFoundError exception is thrown. I am not an expert on this area, so I might be missing something.
I would appreciate if you could provide help to solve this issue of mine. The following are the steps that ended causing the crash. I would like to point I have followed the tutorial provided in the readme of MTJ (http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html):
1st -> Creation of my application
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=MTJapp -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
2nd -> Build project
mvn package
3rd -> Run application
java -cp target/MTJapp-1.0-SNAPSHOT.jar mtj.MTJ
When I execute the problem, the following error occurs:
ubuntu@ip-10-75-135-32:~/MTJ/MTJApp$ java -cp target/MTJApp-1.0-SNAPSHOT.jar mtj.MTJ 10 10 10 r.txt multiplication true
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
at mtj.MTJ.runOperation(MTJ.java:42)
at mtj.MTJ.main(MTJ.java:99)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 2 more
My pom.xml dependencies as for now:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mtj</groupId>
<artifactId>MTJApp</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>MTJApp</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.googlecode.matrix-toolkits-java</groupId>
<artifactId>mtj</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.github.fommil.netlib</groupId>
<artifactId>all</artifactId>
<version>1.1.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.12.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.fommil</groupId>
<artifactId>java-logging</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>16.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
And the following is my simple matrix multiplication application:
import no.uib.cipr.matrix.Matrix;
import no.uib.cipr.matrix.Matrices;
import no.uib.cipr.matrix.DenseMatrix;
public class Multiplication{
public Multiplication(){}
public void run(){
Matrix A = Matrices.random(10, 10);
Matrix B = Matrices.random(10, 10);
DenseMatrix C = new DenseMatrix (10,10);
A.mult(B,C);
}
public static void main(String[] args){
Multiplication mult = new Multiplication();
mult.run();
}
}
I would appreciate any help you could provide me with this problem.
Original author: [email protected] (April 14, 2009 16:32:34)
(originally reported by Subramanya Sadasiva over e-mail)
The QR with permutation is AP = QR and not PA = QR.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=14
Hi
I am new to MTJ, evaluating if its the right way to go for my dataset.
I am looking for examples and documentation.
The overview.html says
"Visit the homepage
for the most recent releases, examples and documentation."
But I cannot find that URL
I can find http://www.cipr.uni.no/ but no search gives me mtj
Original author: [email protected] (December 22, 2010 21:05:14)
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I expected that newMat would be the same as mat. Instead, newMat will be the same as new DenseMatrix(new double[]{{4,1.1},{1.2,1.3}})
because when info.isDense(), MatrixVectorReader.readMatrixSize(info) forgets to read the third int that is the size of the matrix, and thus causes the first entry in the array to be that number, which is 4 in the above example. To remedy this, getInt() must be called once more; the value can be ignored.
What version of the product are you using? On what operating system?
The jar file is called mtj-0.9.12.jar
I'm using Windows XP x64 (2003)
Please provide any additional information below.
It's very possible I have an out-of-date jar file
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=26
e.g. (in Scala)
def pseudoSolve(m: Matrix, b: Vector) = {
val svd = SVD.factorize(m)
val ps = new BandMatrix(m.numRows(), 0, 0)
// calculate pseudo-inverse of sigma
svd.getS.zipWithIndex.foreach { case (v, i) =>
if (v > 0.001) ps.set(i, i, 1 / v)
}
val tmpA = new DenseVector(b.size())
svd.getU.transMult(b, tmpA)
val tmpB = new DenseVector(b.size())
ps.mult(tmpA, tmpB)
tmpA
svd.getVt.transMult(tmpB, tmpA)
}
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Original author: [email protected] (April 06, 2009 15:56:14)
What steps will reproduce the problem?
no.uib.cipr.matrix.Vector bv = new DenseVector(bb);
Matrix am = new DenseMatrix(aa);
no.uib.cipr.matrix.Vector xv = new DenseVector(am.numColumns());
for (int x = 0; x < am.numColumns(); x++) {
xv.set(x, 1);
}
xv = Matrices.random(xv.size());
xv = am.solve(bv, xv);
What is the expected output? What do you see instead?
Expected to solve for xv.
What I see instead:
** On entry to DGELS parameter number 8 had an illegal value
What version of the product are you using? On what operating system?
Both 9.11 and 9.10 produce this problem. 9.9 works fine for some reason.
Please provide any additional information below.
...
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=13
Original author: [email protected] (March 11, 2009 15:48:57)
As Vector already is.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=11
it would be great to be able to do parallel sets, and then effectively do streaming adjacency matrix construction as part of an Observable/RX pattern.
Original author: [email protected] (September 15, 2010 22:39:56)
What steps will reproduce the problem?
Trying to do a rank 1 update on a non-square matrix results in an IndexOutOfBoundsException with the message "!A.isSquare".
What is the expected output? What do you see instead?
It should be possible to do rank 1 updates on non-square matrices. In AbstractMatrix.checkRank1(Vector x, Vector y), the isSquare() check should be removed.
What version of the product are you using? On what operating system?
Version 0.9.12 (current).
Please provide any additional information below.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=24
Original author: [email protected] (January 10, 2011 11:41:41)
getUsed() seems to count all, not only nonzero entries, and iterator() also goes through all, not only non-zero entries. If compact() is called the iterator goes first through nonzero entries and when these are exhausted, wrong index (0) is reported.
double[] tfVector = {0.0,0.5,0.0,0.4,0.0};
DenseVector dense= new DenseVector(tfVector, false);
SparseVector vectorTF = new SparseVector(dense);
assertTrue(vectorTF.getUsed()== 2); // vectorTF.getUsed() returns 5
for (Iterator<VectorEntry> it = vectorTF.iterator();it.hasNext();iterations++)
{
VectorEntry ve= it.next();
int index = ve.index();
double value = ve.get();
assertTrue(tfVector[index]== value);
}
assertTrue(nonZero == 2); // error, iterations ==5
if the same code is run after
vectorTF.compact();
then
assertTrue(vectorTF.getUsed()== 2); // also fails, since vectorTF.getUsed() returns also 5
assertTrue(nonZero == 2); // also fails, but the order of iterations changes, index=1 in first. iter,index =3 in second iter and index=0 for remaining three iters.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=27
Hi,
I am trying to use MTJ. and was looking at this API :http://www.inf.uni-konstanz.de/algo/lehre/ws05/pp/mtj/index.html . I couldn't find a function which will do an element-wise product between a given Matrix and Vector.
Am I looking at the right API doc ?
Thanks,
There are several situations where the toString
method of a Matrix
is called. This happens for example when debugging in an IDE or using a REPL like ScalaLab. If the matrix is big, an OutOfMemoryError will be thrown.
Would it be possible to modify the toString
method to print only parts of the matrix?
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
at java.lang.StringBuilder.append(StringBuilder.java:132)
at java.lang.StringBuilder.append(StringBuilder.java:179)
at java.lang.StringBuilder.append(StringBuilder.java:72)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:3202)
at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2757)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2708)
at java.util.Formatter.format(Formatter.java:2488)
at java.util.Formatter.format(Formatter.java:2423)
at no.uib.cipr.matrix.AbstractMatrix.toString(AbstractMatrix.java:787)
Original author: [email protected] (September 07, 2009 09:35:18)
What steps will reproduce the problem?
which should probably correspond to CompRowMatrix.
What version of the product are you using? On what operating system?
0.9.12
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=18
doubly linked for both normal and transpose iteration, plus pointers to the start of rows/columns to dramatically reduce lookup and insertion time.
Original author: [email protected] (January 12, 2009 15:50:45)
The formula for computing beta is incorrect.
Compare with http://www.netlib.org/templates/double//ChebyREVCOM.f
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=10
Original author: [email protected] (June 22, 2008 19:52:57)
See the testcase DenseLUTest.testDenseLUToInput
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=1
Original author: [email protected] (October 13, 2010 10:48:08)
What steps will reproduce the problem?
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
0.9.12
Please provide any additional information below.
Previous versions implements this feature.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=25
Original author: [email protected] (October 11, 2011 04:51:10)
What steps will reproduce the problem?
Create a dense m-by-n matrix where m*n > Integer.MAX_VALUE.
Sometimes this will create a negative array size exception.
Other times it will not fail until a call that iterates over m and n, which will result in an index out of bounds exception.
What is the expected output? What do you see instead?
A dense matrix cannot have more than Integer.MAX_VALUE elements in Java, since array sizes are represented using ints (signed with 32-bits). Thus, it should fail on creation rather than causing strange bugs later on.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=32
Original author: [email protected] (June 22, 2008 19:55:39)
see junit case
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=4
I'm quite interested in MTJ, but I can't go very far without documentation!
Hi Sam,
I noticed, that you have published a new release of mtj (and net-lib). Before you moved to github, you provided an easy-to-use (compiled) jar file of mtj (and net-lib). Is it possible, that you still create a compiled version of mtj (and net-lib) or, if a version is still available, can you give me a download link?
regards
Micha
Original author: [email protected] (July 28, 2009 10:54:57)
When I'm using SparseVector.zero(), I think it's better to set "used" to zero.
When I'm using SparseVector, most of the time, I want to iterate over the
non-zero entry of the matrix. If it doesn't set "used" to zero, it will waste a
lot of time.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=17
I am using MTJ in two amd64 environments: linux and OSX. I have my application in a single jar. When I run this jar on OSX the library is blazingly fast (I use only SymmDenseEVD.factorize for matrices of size ca. 2500), but on Linux it takes 10 times more time to compute the same thing.
Note that:
Oct 02, 2014 12:47:08 PM com.github.fommil.jni.JniLoader liberalLoad
INFO: successfully loaded /tmp/jniloader7176148666719042216netlib-native_system-linux-x86_64.so
Is this behaviour expected or not? May I debug it somehow?
EDIT: I have checked on another Linux machine (with inteli i7) and it works as quickly as on OSX. Could this bad performance related to the CPU vendor (AMD)?
Original author: [email protected] (July 07, 2008 21:49:58)
Many thread visibility problems were found in the test cases for the no.uib.cipr.matrix.distributed
classes. This concerns me as it makes me wonder if there are similar bugs in the classes
themselves, making the package unsafe for multi-threaded use.
See http://javablog.co.uk/2007/06/15/variable-visibility-across-threads-and-final-fields/ for a
typical example of the sort of bugs we expect may be present.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=8
Original author: rafael%[email protected] (November 12, 2008 21:20:13)
Hi all,
This is not actually a problem, I would like just to suggest to incorporate
in your project the patches found at:
http://developer.berlios.de/patch/?group_id=8855
I posted these patches in the ressim project site some time ago. The first
one contains a the QR factorization with pivoting and the second one is a
unit test for it.
With the best regards.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=9
Original author: [email protected] (June 22, 2008 19:55:18)
see junit case
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=3
Original author: [email protected] (February 28, 2011 02:25:07)
One of the calls to "converged" of the IterationMonitor in the solve method of BiCGstab provides an "x" that is not up-to-date. This is problematic for my purposes where I've created my own IterationMonitor that uses the "x" as well as "r" vectors to determine if proper convergence is reached. There is a simple solution I believe. The current code (version 0.9.13) has
...
if (iter.converged(s, x))
return x.add(alpha, phat);
M.apply(s, shat);
A.mult(shat, t);
omega = t.dot(s) / t.dot(t);
x.add(alpha, phat);
...
I'm suggesting that x is updated before calling converged. As far as I can tell, this shouldn't cause any problems.
...
x.add(alpha, phat); // update x first
if (iter.converged(s, x))
return x; //.add(alpha, phat);
M.apply(s, shat);
A.mult(shat, t);
omega = t.dot(s) / t.dot(t);
//REMOVE: x.add(alpha, phat);
...
Thank you.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=30
Original author: [email protected] (June 22, 2008 20:13:06)
What steps will reproduce the problem?
ant test
What is the expected output? What do you see instead?
all tests run to completion... but they hang once they hit the DistIterativeSolverTest
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=6
Original author: [email protected] (September 06, 2012 13:29:22)
What steps will reproduce the problem?
java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)
What is the expected output? What do you see instead?
junit tests should succeed
What version of the product are you using? On what operating system?
the latest from the svn
Please provide any additional information below.
Tests that failed:
[junit] Testsuite: no.uib.cipr.matrix.DenseLUTest
[junit] Tests run: 4, Failures: 0, Errors: 1, Time elapsed: 0.534 sec
[junit]
[junit] Testcase: testDenseLUToInput(no.uib.cipr.matrix.DenseLUTest): Caused an ERROR
[junit] Row 1, Col 0 wasn't equal! -1.0 3.0
[junit] java.lang.AssertionError: Row 1, Col 0 wasn't equal! -1.0 3.0
[junit] at no.uib.cipr.matrix.DenseLUTest.testDenseLUToInput(DenseLUTest.java:152)
[junit]
[junit]
[junit] Test no.uib.cipr.matrix.DenseLUTest FAILED
[junit] Testsuite: no.uib.cipr.matrix.DenseMatrixTest
[junit] Tests run: 18, Failures: 1, Errors: 0, Time elapsed: 22.849 sec
[junit]
[junit] Testcase: testRowBiCGstab_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest): FAILED
[junit] expected:<0.8103673448063133> but was:<0.0>
[junit] junit.framework.AssertionFailedError: expected:<0.8103673448063133> but was:<0.0>
[junit] at no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:271)
[junit] at no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testRowBiCGstab_1(DistIterativeSolverTest.java:133)
[junit]
[junit]
[junit] Test no.uib.cipr.matrix.distributed.DistIterativeSolverTest FAILED
[junit] Testsuite: no.uib.cipr.matrix.distributed.PointToPointTest
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=35
Original author: [email protected] (June 22, 2008 19:55:06)
see junit case
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=2
Original author: [email protected] (October 14, 2012 16:16:32)
Move from ant to mvn and start pushing your own artifacts.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=36
Original author: [email protected] (January 15, 2010 23:43:40)
I'd like to minimize the construction costs when loading
(many, largish) sparse matrices from data retrieved in
binary form from disk. I can store the data in an appropriate
representation, would it be reasonable to add constructors with
signatures like:
public CompColMatrix(int numRows, int numColumns,
int [] columnPointer, int [] rowIndex, double [] data);
or is there a better way?
BTW, would questions like this be better posed in a discussion group
somewhere?
Thanks!
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=20
Original author: [email protected] (May 16, 2009 11:22:13)
The API for reading and writing Matrix Market files is both cumbersome and confusing. A simple API
would be a welcome improvement.
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=16
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
To compare against other libraries (and to show off natives/GPU) it might be useful to include comparisons of typical operations. i.e. redo
http://blog.mikiobraun.de/2009/04/some-benchmark-numbers-for-jblas.html
Related to fommil/netlib-java#37
Original author: [email protected] (July 07, 2008 21:43:12)
Testcase: testRowGMRES_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest): FAILED
expected:<0.5869419669838227> but was:<0.0>
junit.framework.AssertionFailedError: expected:<0.5869419669838227> but was:<0.0>
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:260)
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testRowGMRES_1(DistIterativeSolverTest.jav
a:95)
Testcase: testRowBiCGstab_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest): FAILED
expected:<0.8288524841557755> but was:<0.0>
junit.framework.AssertionFailedError: expected:<0.8288524841557755> but was:<0.0>
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:260)
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testRowBiCGstab_1(DistIterativeSolverTest.j
ava:122)
Test no.uib.cipr.matrix.distributed.DistIterativeSolverTest FAILED
/Users/samuel/Documents/Java/matrix-toolkits-java/nbproject/build-impl.xml:572: Some
tests failed; see details above.
BUILD FAILED (total time: 50 seconds)
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=7
Original author: [email protected] (December 03, 2011 20:44:40)
Hi,
there is a problem with the MatrixVectorWriter (mtj-0.9.14, Ubuntu) based on the default Locale. If the Locale is e.g. GERMAN, the double values get a comma "," instead of a dot "." like:
5,859622945927e-08 instead of 5.859622945927e-08
format("% .12e\n", data[i]);
means:
format(Locale.GERMAN, "% .12e\n", data[i]);
The MatrixVectorReader runs in an Exception because the getDouble()-Function doesn't regard the (default) Locale:
Exception in thread "Thread-3" java.lang.NumberFormatException: For input string: "5,859622945927e-08"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242)
at java.lang.Double.parseDouble(Double.java:527)
at no.uib.cipr.matrix.io.MatrixVectorReader.getDouble(MatrixVectorReader.java:637)
at no.uib.cipr.matrix.io.MatrixVectorReader.readArray(MatrixVectorReader.java:330)
regards
Micha
Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=34
Would need LWJGL loader, fallback and parameter setting to trigger offloading.
Hi,
I downloaded the "zip" file from git repo and then tried to build the project using maven.
Running no.uib.cipr.matrix.LowerSymmDenseMatrixTest
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.BLAS
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.BLAS
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.LAPACK
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemLAPACK
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.LAPACK
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeRefLAPACK
[Other Test Cases Truncated]
Results :
Tests run: 2447, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.380 s
[INFO] Finished at: 2014-09-05T13:43:28+05:30
[INFO] Final Memory: 11M/292M
[INFO] ------------------------------------------------------------------------
How can I avoid these, since these are required for achieving best performance.
Thank You,
Amit.
simply rewrite the fortran example usage of ARPACK into Java and use the MTJ API for Matrix
calls.
After generating the mtj jar using maven , mtj-1.0.2-SNAPSHOT.jar , using it gives this class definition not found error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/github/fommil/netlib/BLAS
at no.uib.cipr.matrix.DenseMatrix.multAdd(DenseMatrix.java:306)
at no.uib.cipr.matrix.AbstractMatrix.mult(AbstractMatrix.java:317)
at no.uib.cipr.matrix.AbstractMatrix.mult(AbstractMatrix.java:313)
Caused by: java.lang.ClassNotFoundException: com.github.fommil.netlib.BLAS
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Any suggestions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.