From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37644 invoked by alias); 19 Jan 2016 17:02:58 -0000 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org Received: (qmail 37068 invoked by uid 89); 19 Jan 2016 17:02:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:157.56.111, Introduction, Hx-spam-relays-external:sk:DM2PR03, H*RU:sk:DM2PR03 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from mail-bn1bon0119.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (157.56.111.119) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Tue, 19 Jan 2016 17:02:55 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=patrick.alken@colorado.edu; Received: from palken-co-ll.ngdc.noaa.gov (140.172.179.43) by DM2PR0301MB0909.namprd03.prod.outlook.com (10.160.217.14) with Microsoft SMTP Server (TLS) id 15.1.365.19; Tue, 19 Jan 2016 17:02:51 +0000 Subject: Re: Sparse matrix extension To: References: From: Patrick Alken Message-ID: <569E6C33.1090505@colorado.edu> Date: Tue, 19 Jan 2016 17:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BLUPR19CA0026.namprd19.prod.outlook.com (25.162.230.164) To DM2PR0301MB0909.namprd03.prod.outlook.com (25.160.217.14) X-MS-Office365-Filtering-Correlation-Id: 294b3dfe-d25f-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;SRVR:DM2PR0301MB0909;UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001);SRVR:DM2PR0301MB0909;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0909; X-Forefront-PRVS: 0826B2F01B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(24454002)(479174004)(43784003)(377454003)(189002)(199003)(3846002)(75432002)(5001960100002)(4001350100001)(65806001)(2950100001)(189998001)(586003)(65816999)(92566002)(110136002)(65956001)(81156007)(5008740100001)(42186005)(40100003)(87266999)(66066001)(90282001)(106356001)(6116002)(1096002)(76176999)(23676002)(80316001)(50986999)(97736004)(450100001)(77096005)(59896002)(54356999)(2351001)(83506001)(230700001)(33656002)(101416001)(87976001)(89122001)(105586002)(107886002)(122386002)(19580395003)(47776003)(2906002)(64126003)(36756003)(5004730100002)(88552002)(15975445007)(50466002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0909;H:palken-co-ll.ngdc.noaa.gov;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: colorado.edu does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjAzMDFNQjA5MDk7MjM6Z2hPK29JRHkybld0bFZmL09BZjNNSGlU?= =?utf-8?B?RmNXeWZMakZqeVRDaHU5UkpydTNlZVE2SFR0R2ViQk1yeWRvaDE0a3h6R2dT?= =?utf-8?B?SDgza3Z3NjJHQ1ByS3RIeU5QK2pFY2FqMERvMktXVC9vZGwrQVV2elFsYUJu?= =?utf-8?B?M0xBanR4eTMxcFFUZWdTTW92TWpuOTNNc2s3Ty82WVdualdoV1pTeUFyOStx?= =?utf-8?B?eFFvbXYvNE92cFNlKzZEbDBJUXphNEpvbkoyeXBlQjZFK01zdWtTWTVxT2hP?= =?utf-8?B?ZlozcU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8w/KZwVZ5T1kob48ZMw+4zFbP9bg==;24:2zhMhr78KTywiyaUm9xBf9EVDofLfMR5B/UClgDw/siuCfJu6ZvrKn4KQUf9W+nSoC2il/lYVPF/cbcfys4B0K2tW92TJgwfCsxcYxfe8xM= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: colorado.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2016 17:02:51.6224 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0909 X-SW-Source: 2016-q1/txt/msg00001.txt.bz2 Hi Alexis, This looks like very good work! Adding compressed row storage has been on my todo list for a while. The 'gslsp' extension is unfortunately very out of date, and the current git contains newer code (including a GMRES iterative linear solver). I removed the gslsp extension from the web page a while back to reflect this. You can browse the latest manual to see the current sparse matrix capabilities (http://www.gnu.org/software/gsl/manual/gsl-ref.pdf) - there are 3 chapters: sparse matrices, sparse blas and sparse linear algebra - it looks like your contributions will fit into the sparse matrices chapter. Would you be able to verify that your changes are compatible with the current gsl.git repository? This will make it much easier for me to merge everything into the git when ready. It would be best if you made a new branch of gsl.git, and add your changes so I can then pull them from github or somewhere. I will try to find some time in the next few days to look over your code. Thanks again, Patrick On 01/19/2016 09:43 AM, Alexis Tantet wrote: > Dear GSLers, > > As a scientist rather than a developer, I have developed an extension > of the sparse matrix module (CRS, I/O, manipulation, see below), which > I have tested. These modifications conserve the structure of the > original module and be useful for a large number of sparse matrices > users. > > I'm not familiar with the contributing process here. My repository can > be found there: > https://github.com/atantet/gslsp > Unfortunately, I did not know of the gsl.git repository and I forked it froml: > https://github.com/drjerry/gslsp , > which seems to be a bit older than gsl.git. > > How can I push/merge to gsl.git ? Should it be as an update or another > extension? Is it necessary to adapt to the newest version of the code > ? > > Best regards, > Alexis Tantet > > CHANGES.md: > > Extension of the sparse matrix module of GSL > > =================================== > > Introduction > ------------ > > Usages of sparse matrices are numerous in scientific computing. > When numerical linear algebra problems become large, sparse > matrices become necessary to avoid memory overload and unnecessary > computations, at the cost of element access and matrix construction. > As a result, most large scale linear solvers or eigen solvers perform > on sparse matrices. > > Fortunately, a very useful sparse matrix module has recently been > introduced to GSL. > However, important features are still lacking, such has > Compressed Row Storage (CRS) matrices, input/output functions and > other matrix properties and manipulation functions. > This new version attempts to address this, conserving the original > structure of the module and conventions. > > Major changes > ------------- > > * Add CRS format and update functions manipulating compressed matrices : > - additional flag GSL_SPMATRIX_CRS and macro GSLSP_ISMATRIX ( > gsl_spmatrix.h ) > - additional members innerSize and outerSize used to iterate > matrix elements ( gsl_spmatrix.h ) > - rename some variables for coherence ( gsl_spmatrix.h , *.c ) > - update all functions on compressed matrices ( *.c ) > * Allow to sum duplicate elements when compressing ( spcompress.c ) : > - modify gsl_spmatrix_compress > - add gsl_spmatrix_sum_duplicate > * CCS <-> CRS and fast transpose inplace in spswap.c : > - add gsl_spmatrix_switch_major > - add gsl_spmatrix_transpose > * Add printing and scanning functions in spio.c : > - add gsl_spmatrix_fprintf > - add gsl_spmatrix_fscanf > * Add manipulation functions in spmanip.c (particularly useful for > Markov chain transition matrices) : > - add gsl_spmatrix_get_rowsum : get vector of sum over row elements > - add gsl_spmatrix_get_colsum : get vector of sum over column elements > - add gsl_spmatrix_div_rows : divide all elements of each row > by a vector element > - add gsl_spmatrix_div_cols : divide all elements of each > column by a vector element > * Add test functions in atprop.c : > - add gsl_spmatrix_gt_elements : greater than test for each matrix element > - add gsl_spmatrix_ge_elements : greater or equal than test for > each matrix element > - add gsl_spmatrix_lt_elements : lower than test for each matrix element > - add gsl_spmatrix_le_elements : lower or equal than test for > each matrix element > - add gsl_spmatrix_any : test if any non-zero element in matrix > > Other minor changes have been made, such as error tests. > test.c has also been updated to test new features.