Changeset 16068


Ignore:
Timestamp:
09/04/13 12:56:23 (12 years ago)
Author:
utke
Message:

CHG fixed initialization sequence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/toolkits/mumps/MpiDenseMumpsSolve.cpp

    r16066 r16068  
    2020/*}}}*/
    2121
    22 void MumpsSettings(DMUMPS_STRUC_C &theMumpsStruc,ISSM_MPI_Comm &comm) {
     22void MumpsInit(DMUMPS_STRUC_C &theMumpsStruc) {
    2323        theMumpsStruc.par          = 1; 
    2424        theMumpsStruc.sym          = 0;
    25         theMumpsStruc.comm_fortran = MPI_Comm_c2f(comm);
     25        theMumpsStruc.comm_fortran = MPI_Comm_c2f(IssmComm::GetComm());
     26        theMumpsStruc.job          = -1;
     27        dmumps_c(&theMumpsStruc);
     28}
     29
     30// must be preceded by a call to MumpsInit
     31void MumpsSettings(DMUMPS_STRUC_C &theMumpsStruc) {
    2632        /*Control statements:{{{ */
    2733        theMumpsStruc.icntl[1-1] = 6; //error verbose
     
    3541        theMumpsStruc.icntl[30-1] = 0;
    3642        /*}}}*/
    37 }
    38 
    39 // must be preceded by a call to MumpsSettings
    40 void MumpsInit(DMUMPS_STRUC_C &theMumpsStruc) {
    41         theMumpsStruc.job          = -1;
    42         dmumps_c(&theMumpsStruc);
    4343}
    4444
     
    7575                IssmPDouble *rhs) {
    7676        /*Initialize mumps: {{{*/
    77         ISSM_MPI_Comm   comm=IssmComm::GetComm();
    7877        DMUMPS_STRUC_C theMumpsStruc;
    79         MumpsSettings(theMumpsStruc,comm);
    8078        MumpsInit(theMumpsStruc);
     79        MumpsSettings(theMumpsStruc);
    8180        /*}}}*/
    8281        // now setup the rest of theMumpsStruc
     
    195194                   rhs);
    196195
     196if (my_rank==0) for (int i=0;i<Kff_M;++i) std::cout << i << " : " << rhs[i] << std::endl;
    197197        /*Now scatter from cpu 0 to all other cpus: {{{*/
    198198        ISSM_MPI_Scatterv( rhs, recvcounts, displs, ISSM_MPI_DOUBLE, uf, uf_m, ISSM_MPI_DOUBLE, 0, comm);
Note: See TracChangeset for help on using the changeset viewer.