franciscovargas / invertastic Goto Github PK
View Code? Open in Web Editor NEWThis project forked from agray3/invertastic
License: Apache License 2.0
This project forked from agray3/invertastic
License: Apache License 2.0
INVERTASTIC README ================== ----------------- Copyright 2016 The University of Edinburgh Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ----------------- About ----------------- Invertastic is a utility for performing large-scale dense SPD matrix inversions on parallel computers. For full details, please see A. Gray, "Invertastic: Large-scale Dense Matrix Inversion", ARCHER Whitepaper available at www.archer.ac.uk/documentation/white-papers/ This software is openly available as a central package on the UK ARCHER national supercomputing facility at /work/y07/y07/itastic Options ---------------- Invertastic accepts the following arguments: --size <N> specify size N for NxN square matrix to be inverted [--check] if specified, the code will multiply the original matrix by the resulting inverse, compare this product (element-wise) with the expected identity matrix, and print the maximum deviation. [--input <full path to input file>] if specified, the code will read the input matrix from the specified file. The format should be binary with NxN 8-byte (double precision) entries and no headers. If not specified to allow performance benchmarking and testing the code will create an SPD matrix on-the-fly using random numbers. [--output <full path to output file>] if specified, the code will write the binary output matrix to the specified file. The format will be binary with NxN 8-byte (double precision) entries and no headers. Compilation ---------------- Invertastic depends on MPI, PBLAS, BLACS, and ScaLAPACK libraries. The Makefile is currently configured for the ARCHER UK national supercomputing facility, using Intel MKL. To compile on ARCHER: module swap PrgEnv-cray PrgEnv-intel cd src make clean make To configure for other machines, the Makefile should be edited to specify the appropriate paths. Execution --------------- This distribution contains a sample job script, run_archer.sh, for running invertastic on ARCHER using the PBS job submission system.
Expressing the inverse in terms of its blocks :
This actually makes the matrix be 500GB in memory and given the total of 1024GB across nodes in Darwin there is a chance it may not crash until it allocates the auxiliary index memory blocks required for LU.
It may be a good idea to go through the source and prune for unnecessary allocations. Using CSD3 instead of Darwin can bring a total of 3TB of memory which should be more than enough for this task.
LU Factorisation:
https://www.gsp.com/cgi-bin/man.cgi?section=l&topic=PDGETRF
LU Inverse:
http://www.gsp.com/cgi-bin/man.cgi?section=l&topic=pdgetri
Line 10 in source (Cholesky factorisation):
Line 397 in 8ee5e03
Line 11 in source (Cholesky based inversion):
Line 409 in 8ee5e03
Source (EPPC University of Edinburgh):
No hashtable due to C, and the pain of creating an MPI struct. should be manageble with a 2D array :
MPI_Type_create_darray(...
becomes a pain because indexing then becomes n^2 (4971709^2 ... too big ) . Maybe given that keys are composite numbers from 1 to 1million there might be a way to create a simple hash. Its not going to grow in size .
Think about desigining a hash f(x,y)_{N} such that x,y \in 1, 1million and N = 4971709 . Could train a neural net to minimise the number of colisions xD .... but then hashing with an NN is not exactly cheap at test time.
What are the ods 4971709 is prime ... hurray.
Looking at sedgewicks notes (https://algs4.cs.princeton.edu/34hash/) it might be a good idea to just try out a modular hash and see where it goes:
int M = 4971709;
int R = 31;
int hash = (((x* R + y) % M) * R + x) % M;
int index = ( hash & 0x7fffffff ) % M;
In theory there might be no colisions. Next task would be to run an experiment using this hash and count the colisions. Can try with python first using map and set if too slow C it is.
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.