...
 
Commits (2)
......@@ -264,6 +264,12 @@ Contains
Nullify(mphs%sls_precond_schur%sm_rhs)
Nullify(mphs%sls_precond_schur%dm_sol)
! File names
mphs%matfile = ""
mphs%rhsfile = ""
mphs%domfile = ""
mphs%bcfile = ""
!-------------------------------------------------------------------
! [3] Finish
!-------------------------------------------------------------------
......
......@@ -344,7 +344,6 @@
master = mphs%ikeep(IKEEP_HOSTRANK)
ndom = mphs%ikeep(IKEEP_NBDOMAINS)
if (mphs%icntl(ICNTL_MAPHYSTHREAD) == 1) then
Call MPH_init_multithread(mphs, rank, iinfo)
MPH_ONFAILURE_GOTO9999(iinfo)
......@@ -354,10 +353,27 @@
Call XMPH_state_stepstart(mphs, mphs%ikeep, mphs%rkeep,iinfo)
MPH_ONFAILURE_GOTO9999(iinfo)
write(matfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_matrix",rank+1,".mtx"
write(domfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_domain",rank+1,".dom"
write(rhsfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_rhs",rank+1,".mtx"
write(bcfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_bc",rank+1,".mtx"
! File names for dumping / loading
If (mphs%matfile == "") Then
write(matfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_matrix",rank+1,".mtx"
Else
write(matfile,'(A)') Trim(mphs%analysis_dump_prefix)//"/"//Trim(mphs%matfile)
End If
If (mphs%domfile == "") Then
write(domfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_domain",rank+1,".dom"
Else
write(matfile,'(A)') Trim(mphs%analysis_dump_prefix)//"/"//Trim(mphs%domfile)
End If
If (mphs%rhsfile == "") Then
write(rhsfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_rhs",rank+1,".mtx"
Else
write(rhsfile,'(A)') Trim(mphs%analysis_dump_prefix)//"/"//Trim(mphs%rhsfile)
End If
If(mphs%bcfile == "") Then
write(bcfile,'(A,A,I0,A)') Trim(mphs%analysis_dump_prefix),"/maphys_local_bc",rank+1,".mtx"
Else
write(bcfile,'(A)') Trim(mphs%analysis_dump_prefix)//"/"//Trim(mphs%bcfile)
End If
!-------------------------------------------------------------------------
! [-] Get the distributed system
......
......@@ -3,7 +3,7 @@
!> Module defining the derived type "XMPH_maphys_t"
Module XMPH_maphys_type
!* Modules *!
Use XMPH_sparse_matrix_type
Use XMPH_sls_mod
......@@ -26,24 +26,24 @@
! ===============
! USER PARAMETERS
! ===============
!
!
!> MPI communicator
!!
!!
!! The MPI Communicator used by maphys.\n
!! It must be set with a valid MPI Communicator before any call
!! to maphys.
!!
Integer :: comm
!!
Integer :: comm
! Input matrix (in coordinate format)
! ---------------------------------------
!> matrix symmetry
!! - 0 = unsymmetric
!! - 1 = symmetric
!! - 2 = SPD
!! .
Integer :: sym
Integer :: sym
!> order of the matrix
Integer :: n
!> number of entries in the sparse matrix.
......@@ -65,20 +65,20 @@
! Right-hand-side (in dense format ordered by columns)
! ----------------------------------------------------
Integer :: nrhs
integer , pointer :: rhs_rows (:)
XMPH_FLOAT , pointer :: rhs (:)
Integer :: nrhs
integer , pointer :: rhs_rows (:)
XMPH_FLOAT , pointer :: rhs (:)
! Solution (in dense format ordered by columns)
! ----------------------------------------------------
XMPH_FLOAT , pointer :: sol (:)
XMPH_FLOAT , pointer :: sol (:)
! Controls
! --------
Integer :: job
Integer(kind=4) :: icntl ( MAPHYS_ICNTL_SIZE )
Real (kind=8) :: rcntl ( MAPHYS_RCNTL_SIZE )
Integer :: job
Integer(kind=4) :: icntl ( MAPHYS_ICNTL_SIZE )
Real (kind=8) :: rcntl ( MAPHYS_RCNTL_SIZE )
! Statistics
! -----------
! version
......@@ -86,32 +86,32 @@
! on this process (MPI)
Integer(kind=4) :: iinfo ( MAPHYS_IINFO_SIZE )
Real (kind=8) :: rinfo ( MAPHYS_RINFO_SIZE )
Integer(kind=4) :: iinfo ( MAPHYS_IINFO_SIZE )
Real (kind=8) :: rinfo ( MAPHYS_RINFO_SIZE )
! on all process (MPI)
Integer(kind=4) :: iinfomin ( MAPHYS_IINFO_SIZE )
Integer(kind=4) :: iinfomax ( MAPHYS_IINFO_SIZE )
Real (kind=8) :: iinfoavg ( MAPHYS_IINFO_SIZE )
Real (kind=8) :: iinfosig ( MAPHYS_IINFO_SIZE )
Integer(kind=4) :: iinfomin ( MAPHYS_IINFO_SIZE )
Integer(kind=4) :: iinfomax ( MAPHYS_IINFO_SIZE )
Real (kind=8) :: iinfoavg ( MAPHYS_IINFO_SIZE )
Real (kind=8) :: iinfosig ( MAPHYS_IINFO_SIZE )
Real (kind=8) :: rinfomin ( MAPHYS_RINFO_SIZE )
Real (kind=8) :: rinfomax ( MAPHYS_RINFO_SIZE )
Real (kind=8) :: rinfomin ( MAPHYS_RINFO_SIZE )
Real (kind=8) :: rinfomax ( MAPHYS_RINFO_SIZE )
Real (kind=8) :: rinfoavg ( MAPHYS_RINFO_SIZE )
Real (kind=8) :: rinfosig ( MAPHYS_RINFO_SIZE )
Real (kind=8) :: rinfosig ( MAPHYS_RINFO_SIZE )
Integer(kind=4) :: iinfog ( MAPHYS_IINFOG_SIZE )
Real (kind=8) :: rinfog ( MAPHYS_RINFOG_SIZE )
Integer(kind=4) :: iinfog ( MAPHYS_IINFOG_SIZE )
Real (kind=8) :: rinfog ( MAPHYS_RINFOG_SIZE )
! =====================
! Internal working data
! =====================
! internal controls
! -----------------
Integer(kind=4) :: ikeep ( MAPHYS_IKEEP_SIZE )
Real (kind=8) :: rkeep ( MAPHYS_RKEEP_SIZE )
Integer(kind=4) :: ikeep ( MAPHYS_IKEEP_SIZE )
Real (kind=8) :: rkeep ( MAPHYS_RKEEP_SIZE )
! memory
Type(MPH_mem_t) :: mem
......@@ -119,37 +119,37 @@
! environement
Type(mph_env_t) :: env
! Description of the Non-overlapping domain Decomposition
! Description of the Non-overlapping domain Decomposition
! -------------------------------------------------------
! Local domain description (interface + interior)
type(maphys_domain_t) :: lc_domain
type(maphys_domain_t) :: lc_domain
! Necessary data to part the right hand side
Type(maphys_rhs_partition_t) :: part_rhs
! Blocs on the matrix of the domain
! [ Aii Aib ]
! [ Abi Abb ]
! Blocs on the matrix of the domain
! [ Aii Aib ]
! [ Abi Abb ]
! - i: interior related (nodes inside the domain)
! - b: boundary related (nodes on its interface )
Type(XMPH_sparse_matrix_t) :: sm_Aii , sm_Aib
Type(XMPH_sparse_matrix_t) :: sm_Aii , sm_Aib
Type(XMPH_sparse_matrix_t) :: sm_Abi , sm_Abb
! saved scalings on the local matrix
XMPH_FLOAT, pointer :: row_scaling (:)
XMPH_FLOAT, pointer :: col_scaling (:)
XMPH_FLOAT, pointer :: row_scaling (:)
XMPH_FLOAT, pointer :: col_scaling (:)
! linear system on a domain
! Its interior is solved with a sparse direct solver
! --------------------------------------------------
Type(XMPH_sls_t) :: sls_domain
Type(XMPH_sls_t) :: sls_domain
! On the interface : the schur complement linear system
! (solved with an iterative method)
! -----------------------------------------------------
! local schur complements matrices (exact or approximate)
Type(XMPH_dense_matrix_t) :: dm_schur ! exact
Type(XMPH_sparse_matrix_t) :: sm_schur ! approximate
Type(XMPH_dense_matrix_t) :: dm_schur ! exact
Type(XMPH_sparse_matrix_t) :: sm_schur ! approximate
! preconditioners for the iterative method
Type(XMPH_dls_t) :: dls_precond_schur
......@@ -159,12 +159,12 @@
Type(XMPH_dls_t) :: dls_secondprecond_schur ! only usefull during the global + local precond
Type(XMPH_sls_t) :: sls_secondprecond_schur ! only usefull during the global + local precond
Type(XMPH_dense_matrix_t) :: cgc_V0 !< local coarse space, only useful for coarse correction
Integer :: cgccomm
Integer :: cgccomm
! Multiple tolerances for multi-RHS
Real(kind = XMPH_FLOATKIND), pointer :: tolerances(:)
! Experimental: boundary conditions
! Use same API but with prefix bc_
......@@ -180,6 +180,11 @@
Integer , pointer :: bc_cols (:)
XMPH_FLOAT , pointer :: bc_values (:)
Character(len=MAPHYS_STRL) :: matfile
Character(len=MAPHYS_STRL) :: rhsfile
Character(len=MAPHYS_STRL) :: domfile
Character(len=MAPHYS_STRL) :: bcfile
#if HAVE_LIBPADDLE
! Paddle structure
Type(XPDL_paddle_t) :: pdls
......
......@@ -2,9 +2,9 @@
#include "mph_defs_f.h"
#include "mph_macros_f.h"
! define the partitioner to use (Scotch by default)
! define the partitioner to use (Metis by default)
#ifndef MAPHYS_MUMPS_ICNTL7
#define MAPHYS_MUMPS_ICNTL7 3
#define MAPHYS_MUMPS_ICNTL7 5
#endif
! define if MUMPS should log its messages (default : No)
......