/[escript]/trunk/paso/src/SystemMatrix_MatrixVector.c
ViewVC logotype

Annotation of /trunk/paso/src/SystemMatrix_MatrixVector.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1628 - (hide annotations)
Fri Jul 11 13:12:46 2008 UTC (11 years, 4 months ago) by phornby
File MIME type: text/plain
File size: 3191 byte(s)

Merge in /branches/windows_from_1456_trunk_1620_merged_in branch.

You will find a preserved pre-merge trunk in tags under tags/trunk_at_1625.
That will be useful for diffing & checking on my stupidity.

Here is a list of the conflicts and their resolution at this
point in time.


=================================================================================
(LLWS == looks like white space).

finley/src/Assemble_addToSystemMatrix.c - resolve to branch - unused var. may be wrong.....
finley/src/CPPAdapter/SystemMatrixAdapter.cpp - resolve to branch - LLWS
finley/src/CPPAdapter/MeshAdapter.cpp - resolve to branch - LLWS
paso/src/PCG.c - resolve to branch - unused var fixes.
paso/src/SolverFCT.c - resolve to branch - LLWS
paso/src/FGMRES.c - resolve to branch - LLWS
paso/src/Common.h - resolve to trunk version. It's omp.h's include... not sure it's needed,
but for the sake of saftey.....
paso/src/Functions.c - resolve to branch version, indentation/tab removal and return error
on bad unimplemented Paso_FunctionCall.
paso/src/SolverFCT_solve.c - resolve to branch version, unused vars
paso/src/SparseMatrix_MatrixVector.c - resolve to branch version, unused vars.
escript/src/Utils.cpp - resloved to branch, needs WinSock2.h
escript/src/DataExpanded.cpp - resolved to branch version - LLWS
escript/src/DataFactory.cpp - resolve to branch version
=================================================================================

This currently passes tests on linux (debian), but is not checked on windows or Altix yet.

This checkin is to make a trunk I can check out for windows to do tests on it.

Known outstanding problem is in the operator=() method of exceptions
causing warning messages on the intel compilers.

May the God of doughnuts have mercy on my soul.


1 ksteube 1312
2 jgs 150 /* $Id$ */
3    
4 ksteube 1312 /*******************************************************
5     *
6     * Copyright 2003-2007 by ACceSS MNRF
7     * Copyright 2007 by University of Queensland
8     *
9     * http://esscc.uq.edu.au
10     * Primary Business: Queensland, Australia
11     * Licensed under the Open Software License version 3.0
12     * http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15 dhawcroft 631
16 jgs 150 /**************************************************************/
17    
18     /* Paso: matrix vector product with sparse matrix */
19    
20     /**************************************************************/
21    
22     /* Copyrights by ACcESS Australia 2003,2004,2005 */
23     /* Author: gross@access.edu.au */
24    
25     /**************************************************************/
26    
27     #include "Paso.h"
28     #include "SystemMatrix.h"
29    
30     /**************************************************************************/
31    
32     /* raw scaled vector update operation: out = alpha * A * in + beta * out */
33    
34    
35     void Paso_SystemMatrix_MatrixVector(double alpha,
36 ksteube 1312 Paso_SystemMatrix* A,
37     double* in,
38     double beta,
39     double* out) {
40 jgs 150
41 ksteube 1312 double *snd_buffer=NULL, *rcv_buffer=NULL;
42     Paso_MPIInfo *mpi_info=A->mpi_info;
43    
44 gross 415 if (A->type & MATRIX_FORMAT_CSC) {
45 ksteube 1312 if ( mpi_info->size>1) {
46     Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: CSC is not supported by MPI.");
47     return;
48 gross 415 } else {
49 ksteube 1312 if (A->type & MATRIX_FORMAT_OFFSET1) {
50     Paso_SparseMatrix_MatrixVector_CSC_OFFSET1(alpha,A->mainBlock,in,beta,out);
51     } else {
52     Paso_SparseMatrix_MatrixVector_CSC_OFFSET0(alpha,A->mainBlock,in,beta,out);
53     }
54 gross 415 }
55 ksteube 1312 } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
56     Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: TRILINOS is not supported with MPI.");
57     return;
58 gross 415 } else {
59     if (A->type & MATRIX_FORMAT_OFFSET1) {
60 ksteube 1312 if ( mpi_info->size>1) {
61     Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: CSR with index 1 is not supported by MPI.");
62     return;
63     } else {
64     Paso_SparseMatrix_MatrixVector_CSR_OFFSET1(alpha,A->mainBlock,in,beta,out);
65     }
66 gross 415 } else {
67 ksteube 1312 if (Paso_noError()) {
68     Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(alpha,A,in,beta,out);
69     }
70 gross 415 }
71     }
72     }
73    
74     void Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(double alpha,
75 ksteube 1312 Paso_SystemMatrix* A,
76     double* in,
77     double beta,
78     double* out)
79     {
80     double *remote_values=NULL;
81     /* start exchange */
82     Paso_SystemMatrix_startCollect(A,in);
83     /* process main block */
84     Paso_SparseMatrix_MatrixVector_CSR_OFFSET0(alpha,A->mainBlock,in,beta,out);
85     /* finish exchange */
86     remote_values=Paso_SystemMatrix_finishCollect(A);
87     /* process couple block */
88 gross 1552 Paso_SparseMatrix_MatrixVector_CSR_OFFSET0(alpha,A->col_coupleBlock,remote_values,1.,out);
89 gross 415 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26