Giter VIP home page Giter VIP logo

invertastic's Introduction

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.





 









invertastic's People

Contributors

agray3 avatar franciscovargas avatar

Watchers

 avatar  avatar

invertastic's Issues

Inverse in terms of block matrix

Expressing the inverse in terms of its blocks :

image

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.

Edit lines 10 and 11 in pseudocde corresponding to source in order to work with LU factorisation and not cholesky

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):

pdpotrf_( &uplo, &matSize, matrix, &ONE,&ONE,desc, &info );

Line 11 in source (Cholesky based inversion):

pdpotri_( &uplo, &matSize, matrix, &ONE,&ONE, desc, &info );

image

Source (EPPC University of Edinburgh):

invertasticGray.pdf

Design simple 2D array based hash table like hack

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.