Reputation: 624
The following program is trapping.
void main(){
fmat A,W,H;
W.load("w.csv"); //W is of size 150000x100
H.load("h.csv"); //H is of size 300000x100
A.set_size(W.n_rows,H.n_rows);
A.zeros();
A=W*H.t();
}
The above program is compiled using g++ 4.8 with fopenmp flag and run on ubuntu 64 bit with 384GB ram. I am using openblas. The W and H are any arbitrary random positive matrix.
The above code is trapping and creating core dump during multiplication. The code is successful till A.zeros(). I checked the ulimit and it is showing unlimited. I also tried to create A as sum of outer products of vectors of W and H. It is also trapping. Also, when W and H are SMALL the code is working and it NOT trapping.
How can I multiple two big matrices? Is there any size restriction?
Upvotes: 1
Views: 201
Reputation: 624
@mtall's answer in the above comment is the answer. Enable the ARMA_64BIT_WORD in include/armadillo_bits/config.hpp. The include directory can be found in the place where you installed armadillo. For example in my case it was in /usr/local.
Upvotes: 1