Commit 6deb32f9 authored by MARAIT Gilles's avatar MARAIT Gilles

Merge branch 'develop'

parents e6e5cfd5 51e96093
# Pastix
source $PASTIX_DIR/bin/pastix_env.sh
......@@ -5,6 +5,7 @@ cmake:
- cmake
script:
- echo "Installing with CMake"
- source .gitlab-ci-env.sh
- git submodule init
- git submodule update
- mkdir build
......
......@@ -12,7 +12,7 @@ endif(NOT CMAKE_BUILD_TYPE)
# The current version number
set (MAPHYS_VERSION_MAJOR 0.9)
set (MAPHYS_VERSION_MINOR 7)
set (MAPHYS_VERSION_MINOR 8)
set (MAPHYS_VERSION_PATCH 0)
set( MAPHYS_VERSION "${MAPHYS_VERSION_MAJOR}.${MAPHYS_VERSION_MINOR}.${MAPHYS_VERSION_PATCH}" )
......@@ -116,6 +116,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
option(MAPHYS_ITE_FABULOUS "Enable FABuLOuS as iterative Solver" OFF)
option(MAPHYS_HDS_SHLIB "Enable SHLIB as H-sparse Solver" OFF)
option(MAPHYS_SCOREP_INST "Enable scorep instrumentation for tracing/profiling" OFF)
option(MAPHYS_GENDISTSYS "Compile gendistsys" OFF)
# Build shared or static libraries
# --------------------------------
......@@ -212,12 +213,14 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
if( NOT MPI_FOUND)
find_package(MPI 3.0)
if (MPI_C_FOUND)
option(MAPHYS_MPI_3 "Build tests or not" ON)
add_definitions(-DMAPHYS_MPI_3)
else ()
find_package(MPI REQUIRED)
endif()
endif()
if (MPI_C_FOUND)
# Clean CMAKE_C_FLAGS
string(REPLACE ";" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
message(STATUS "MPI FOUND " ${MPI_C_FOUND})
message(STATUS "MPI VERSION " ${MPI_Fortran_VERSION})
if (MPI_C_INCLUDE_PATH)
......@@ -243,53 +246,43 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
#---------------------------------------------------
if (MAPHYS_SDS_PASTIX)
if (PASTIX_VER_6)
find_package(PASTIX6 REQUIRED
COMPONENTS SEQ SCOTCH
OPTIONAL_COMPONENTS METIS PARSEQ STARPU)
if (PASTIX_LIBRARIES)
message(STATUS "Use PASTIX 6")
message(STATUS "Include: ${PASTIX_INCLUDE_DIRS}")
message(STATUS "Lib: ${PASTIX_LIBRARIES}")
include_directories( ${PASTIX_INCLUDE_DIRS} )
list(APPEND MAPHYS_EXTRA_LIBRARIES ${PASTIX_LIBRARIES})
clean_liblist(PASTIX_LIBRARIES MAPHYS_EXTRA_LINK_FLAGS)
add_definitions(-DHAVE_LIBPASTIX_6)
else()
message(FATAL_ERROR "PaStiX is required but was not found."
" Please provide a PaStiX library in your environment or "
"configure with -DMAPHYS_SDS_PASTIX=OFF."
"Note that you can give the path to your PASTIX installation "
"by setting PASTIX_DIR cmake variable.")
endif(PASTIX_LIBRARIES)
if(PASTIX_VER_6)
find_package(PASTIX REQUIRED SEQ SCOTCH FORTRAN )
else()
find_package(PASTIX REQUIRED
OPTIONAL_COMPONENTS MPI STARPU SCOTCH PTSCOTCH METIS)
endif()
if (PASTIX_FOUND)
add_definitions(-DHAVE_LIBPASTIX)
if (PASTIX_FOUND)
if (PASTIX_INCLUDE_DIRS)
include_directories( ${PASTIX_INCLUDE_DIRS} )
endif()
if (PASTIX_LIBRARY_DIRS)
list(REMOVE_DUPLICATES PASTIX_LIBRARY_DIRS)
link_directories( ${PASTIX_LIBRARY_DIRS} )
foreach(_dir ${PASTIX_LIBRARY_DIRS_DEP})
set(MAPHYS_EXTRA_LINK_FLAGS "${MAPHYS_EXTRA_LINK_FLAGS} -L${_dir}")
endforeach()
message(STATUS "PASTIX library found is located in: ${PASTIX_LIBRARY_DIRS}")
endif()
list(APPEND MAPHYS_EXTRA_LIBRARIES ${PASTIX_LIBRARIES_DEP})
clean_liblist(PASTIX_LIBRARIES_DEP MAPHYS_EXTRA_LINK_FLAGS)
if ( PASTIX_VERSION_MAJOR EQUAL 6 )
add_definitions(-DHAVE_LIBPASTIX_6)
else()
message(FATAL_ERROR "PaStiX is required but was not found."
" Please provide a PaStiX library in your environment or "
"configure with -DMAPHYS_SDS_PASTIX=OFF."
"Note that you can give the path to your PASTIX installation "
"by setting PASTIX_DIR cmake variable.")
add_definitions(-DHAVE_LIBPASTIX)
endif()
if (PASTIX_INCLUDE_DIRS)
include_directories( ${PASTIX_INCLUDE_DIRS} )
endif()
if (PASTIX_LIBRARY_DIRS)
list(REMOVE_DUPLICATES PASTIX_LIBRARY_DIRS)
link_directories( ${PASTIX_LIBRARY_DIRS} )
foreach(_dir ${PASTIX_LIBRARY_DIRS_DEP})
set(MAPHYS_EXTRA_LINK_FLAGS "${MAPHYS_EXTRA_LINK_FLAGS} -L${_dir}")
endforeach()
message(STATUS "PASTIX library found is located in: ${PASTIX_LIBRARY_DIRS}")
endif()
list(APPEND MAPHYS_EXTRA_LIBRARIES ${PASTIX_LIBRARIES_DEP})
clean_liblist(PASTIX_LIBRARIES_DEP MAPHYS_EXTRA_LINK_FLAGS)
else()
message(FATAL_ERROR "PaStiX is required but was not found."
" Please provide a PaStiX library in your environment or "
"configure with -DMAPHYS_SDS_PASTIX=OFF."
"Note that you can give the path to your PASTIX installation "
"by setting PASTIX_DIR cmake variable.")
endif()
endif(MAPHYS_SDS_PASTIX)
# MaPHyS might depend on MUMPS sparse direct solver
......@@ -523,7 +516,16 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
if (MAPHYS_BLASMT)
if (BLAS_LIBRARIES)
add_definitions(-DMULTITHREAD_VERSION)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
set( _openmp_flag )
if( OPENMP_FOUND )
if( OpenMP_Fortran_FLAGS )
set( _openmp_flag ${OpenMP_Fortran_FLAGS} )
else()
set( _openmp_flag ${OpenMP_C_FLAGS} )
endif()
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_openmp_flag}")
list(APPEND MAPHYS_EXTRA_LIBRARIES ${_openmp_flag})
if (BLAS_PAR_LIBRARIES)
# automatically found by find_package
list(APPEND MAPHYS_EXTRA_LIBRARIES ${BLAS_PAR_LIBRARIES})
......@@ -627,7 +629,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
# ----------------------
add_subdirectory( toolkit )
add_subdirectory( gendistsys )
if(MAPHYS_GENDISTSYS)
add_subdirectory( gendistsys )
endif()
# Ctest
# -----
......
......@@ -67,7 +67,8 @@ various implementations.
| Version | Tarball | Documentation | Refcard | Date |
|-------------------------+---------+---------------------+---------------+----------------|
| *0.9.7.0 (recommended)* | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.7.0.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.7_users_guide.pdf][Documentation-0.9.7]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.7_refcard.pdf][Refcard-0.9.7]] | March 2018 |
| *0.9.8.0 (recommended)* | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.8.0.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.8_users_guide.pdf][Documentation-0.9.8]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.8_refcard.pdf][Refcard-0.9.8]] | September 2018 |
| 0.9.7.0 | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.7.0.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.7_users_guide.pdf][Documentation-0.9.7]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.7_refcard.pdf][Refcard-0.9.7]] | March 2018 |
| 0.9.6.0 | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.6.0.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.6_users_guide.pdf][Documentation-0.9.6]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.6_refcard.pdf][Refcard-0.9.6]] | September 2017 |
| 0.9.5.1 | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.5.1.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.5_users_guide.pdf][Documentation-0.9.5]] | | May 2017 |
| 0.9.5.0 | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.5.0.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.5_users_guide.pdf][Documentation-0.9.5]] | | March 2017 |
......@@ -76,8 +77,6 @@ various implementations.
| 0.9.4.0 | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.4.0.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_0.9.4_users_guide.pdf][Documentation-0.9.4]] | | October 2016 |
| 0.9.3 | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.3.tar.gz][Tarball]] | [[http://morse.gforge.inria.fr/misc/maphys_users_guide.pdf][Documentation-0.9.3]] | | 2015 |
|-------------------------+---------+---------------------+---------------+----------------|
Also check the new [[http://morse.gforge.inria.fr/misc/maphys_0.9.6_refcard.pdf][refcard]] for control parameters and info outputs.
* Links
......
This diff is collapsed.
This diff is collapsed.
Subproject commit a5142c9b74e6bfa007142aff48c3c70f99805995
Subproject commit dfb60ed9fc7d0813e41fbde05115d6d2360b5989
......@@ -714,26 +714,31 @@ The execution of \maphys{} can be controlled by the user through the 2 arrays \t
\item [0]: Use \mumps, distributed mode
\iftoggle{devversion}{
\textcolor{red}{
\\ \*\emph{Enumeration: CGC\_STRAT\_MumpsDist}}
\\ \*\emph{Enumeration: CGC\_STRAT\_SparseDist}}
}{}
\item [1]: Use \lapack, sequential only
\iftoggle{devversion}{
\textcolor{red}{
\\ \*\emph{Enumeration: CGC\_STRAT\_Lapack}}
\\ \*\emph{Enumeration: CGC\_STRAT\_DenseCentralized}}
}{}
\item [2]: Use \ref{itm:icntl13} sparse direct solver with \ref{itm:icntl52} processes
\iftoggle{devversion}{
\textcolor{red}{
\\ \*\emph{Enumeration: CGC\_STRAT\_withSDS}}
\\ \*\emph{Enumeration: CGC\_STRAT\_SparseCentralized}}
}{}
\item [3]: Duplicate coarse problem on groups of MPI processes with \ref{itm:icntl52} processes per group
\iftoggle{devversion}{
\textcolor{red}{
\\ \*\emph{Enumeration: CGC\_STRAT\_withSDS\_Dup}}
\\ \*\emph{Enumeration: CGC\_STRAT\_SparseReplicatedCentr}}
}{}
\item[Default]: 0
\item [4]: Make groups of \ref{itm:icntl52} processes, centralize the problem on each group master and compute the coarse grid with a distributed sparse direct solver on these masters
\iftoggle{devversion}{
\textcolor{red}{
\\ \*\emph{Enumeration: CGC\_STRAT\_SparseHierachicalDist}}
}{}
\item[Default]: 2
\end{description}
\item [ICNTL(52)\label{itm:icntl52}]: Corresponds to the number of MPI processes in use to compute and apply the 2-level coarse preconditioner from a centralized input with a sparse direct solver. Only in use with \ref{itm:icntl51} = 2 or 3
\item [ICNTL(52)\label{itm:icntl52}]: Corresponds to the number of MPI processes in use to compute and apply the 2-level coarse preconditioner from a centralized input with a sparse direct solver. Only in use with \ref{itm:icntl51} = 2, 3 or 4
\iftoggle{devversion}{
\textcolor{red}{
\\ \*\emph{Enumeration: ICNTL\_CGC\_NPROCS}}
......@@ -805,6 +810,14 @@ The execution of \maphys{} can be controlled by the user through the 2 arrays \t
\item [N $>0$]: Recompute the preconditioner each N iteration(s)
\item[Default]: 0
\end{description}
\item [ICNTL(62)\label{itm:icntl62}]: Control MUMPS's ICNTL of 7: the ordering tool (scotch/metis/pord...)
\iftoggle{devversion}{
\textcolor{red}{
\\ \*\emph{Enumeration: ICNTL\_MUMPS\_ORDERING}}
}{}
\begin{description}
\item[Default]: 5
\end{description}
\end{description}
\subsection{RCNTL}
\textbf{mphs\%RCNTL} is an integer array of size \textbf{MAPHYS\_RCNTL\_SIZE}.
......
......@@ -12,7 +12,7 @@
\newcommand{\maphys}{\textsc{MaPHyS}\xspace}
\newcommand{\mpi}{\textsc{MPI}\xspace}
\begin{document}
\section*{\maphys version 0.9.7.0 }
\section*{\maphys version 0.9.8.0 }
\subsection*{ICNTL}
\begin{longtable}[H]{| p{.1\textwidth} | p{.7\textwidth} | p{.1\textwidth} |} \hline
Parameter & Description and values & Default value\\ \hline
......@@ -165,11 +165,12 @@ ICNTL(50) & What to do when \mumps requires more working space. & 0\\
& $>0$: Each time the error occurs, this value is added to the extra workspace ICNTL(47). & \\
& -1: Each time the error occurs, the extra workspace ICNTL(47) is multiplied by RCNTL(5). & \\
\hline
ICNTL(51) & Strategy to apply the 2-level coarse preconditioner & 0\\
ICNTL(51) & Strategy to apply the 2-level coarse preconditioner & 2\\
& 0: Use \mumps, distributed mode & \\
& 1: Use \lapack, sequential only & \\
& 2: Use ICNTL(13) sparse direct solver with ICNTL(52) processes & \\
& 3: Duplicate coarse problem on groups of MPI processes with ICNTL(52) processes per group & \\
& 4: Make groups of ICNTL(52) processes to centralize, and compute with distributed SDS on the masters. & \\
\hline
ICNTL(52) & Number of MPI processes to compute and apply the 2-level coarse preconditioner & 1\\
\hline
......@@ -191,6 +192,8 @@ ICNTL(61) & Frequency to recompute the preconditioner when ICNTL(60) = 1 & 0\\
& 0: Never recompute the preconditioner & \\
& N $>0$: Recompute the preconditioner each N iteration(s) & \\
\hline
ICNTL(62) & Control MUMPS's ICNTL of 7: the ordering tool (scotch/metis/pord...) & 5\\
\hline
\end{longtable}
\subsection*{RCNTL}
\begin{longtable}[H]{| p{.1\textwidth} | p{.7\textwidth} | p{.1\textwidth} |} \hline
......
......@@ -113,14 +113,15 @@ if(MAPHYS_ORDERING_PADDLE AND MAPHYS_SDS_PASTIX)
set_tests_properties(cmph_examplekv_paddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(zmph_examplekv_paddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
add_test(smph_examplekv_distpaddle mpirun -np 4 ./smph_paddle real_bcsstk17_distpaddle.in)
add_test(dmph_examplekv_distpaddle mpirun -np 4 ./dmph_paddle real_bcsstk17_distpaddle.in)
add_test(cmph_examplekv_distpaddle mpirun -np 4 ./cmph_paddle complex_young1c_distpaddle.in)
add_test(zmph_examplekv_distpaddle mpirun -np 4 ./zmph_paddle complex_young1c_distpaddle.in)
set_tests_properties(smph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(dmph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(cmph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(zmph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
# Removed at the moment -> does not work (error in paddle ?)
#add_test(smph_examplekv_distpaddle mpirun -np 4 ./smph_paddle real_bcsstk17_distpaddle.in)
#add_test(dmph_examplekv_distpaddle mpirun -np 4 ./dmph_paddle real_bcsstk17_distpaddle.in)
#add_test(cmph_examplekv_distpaddle mpirun -np 4 ./cmph_paddle complex_young1c_distpaddle.in)
#add_test(zmph_examplekv_distpaddle mpirun -np 4 ./zmph_paddle complex_young1c_distpaddle.in)
#set_tests_properties(smph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
#set_tests_properties(dmph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
#set_tests_properties(cmph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
#set_tests_properties(zmph_examplekv_distpaddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
endif()
###
### END CMakeLists.txt
......
......@@ -11,5 +11,6 @@ ICNTL(21) = 1
ICNTL(24) = 500
ICNTL(26) = 500
ICNTL(22) = 3
ICNTL(51) = 0
RCNTL(21) = 1.0e-7
RCNTL(11) = 1.0e-6
......@@ -351,11 +351,11 @@ Program XMPH_example_ff
write(6,'(A12,A20,A3,A20)') "| ","Computed (x)"," | ","Theoretical (x*)"
write(6,'(A)') repeat("_",53)
If(norhs == 1 ) Then
do i = 1, 10
do i = 1, min(10, mphs%n)
write(*,'(A,I2,A,ES20.10,A,ES20.10)') "|sol(", i, ")| | ", abs(mphs%sol(i))," | ", abs(sol(i))
end do
Else
do i = 1, 10
do i = 1, min(10, mphs%n)
write(*,'(A,I2,A,ES20.10)') "|sol(", i, ")| | ", abs(mphs%sol(i))
end do
End If
......
......@@ -201,9 +201,8 @@ Program XMPH_example_ff
! [4] Performs all steps (from Analysis to cleanup phases)
!-----------------------------------------------------------------------------
do istep = 1, 10
Call XMPH_maphys_Driver(mphs)
end do
Call XMPH_maphys_Driver(mphs)
istep = 4
iinfo = mphs%iinfog(1)
If (iinfo < 0) goto 9999
......
......@@ -737,28 +737,32 @@ ICNTL: ################################
51:
NAME: ICNTL_CGC_STRAT
DEFAULT: 0
DEFAULT: 2
BRIEF: 'Strategy to apply the 2-level coarse preconditioner'
DESCRIPTION: 'Controls the strategy of the application of the coarse level preconditioner.'
VALUES:
0:
NAME: CGC_STRAT_MumpsDist
NAME: CGC_STRAT_SparseDist
DESCRIPTION: 'Use \mumps, distributed mode'
1:
NAME: CGC_STRAT_Lapack
NAME: CGC_STRAT_DenseCentralized
DESCRIPTION: 'Use \lapack, sequential only'
2:
NAME: CGC_STRAT_withSDS
NAME: CGC_STRAT_SparseCentralized
DESCRIPTION: 'Use ICNTL(13) sparse direct solver with ICNTL(52) processes'
3:
NAME: CGC_STRAT_withSDS_Dup
NAME: CGC_STRAT_SparseReplicatedCentr
DESCRIPTION: 'Duplicate coarse problem on groups of MPI processes with ICNTL(52) processes per group'
4:
NAME: CGC_STRAT_SparseHierachicalDist
BRIEF: 'Make groups of ICNTL(52) processes to centralize, and compute with distributed SDS on the masters.'
DESCRIPTION: 'Make groups of ICNTL(52) processes, centralize the problem on each group master and compute the coarse grid with a distributed sparse direct solver on these masters'
52:
NAME: ICNTL_CGC_NPROCS
DEFAULT: 1
BRIEF: 'Number of MPI processes to compute and apply the 2-level coarse preconditioner'
DESCRIPTION: 'Corresponds to the number of MPI processes in use to compute and apply the 2-level coarse preconditioner from a centralized input with a sparse direct solver. Only in use with ICNTL(51) = 2 or 3'
DESCRIPTION: 'Corresponds to the number of MPI processes in use to compute and apply the 2-level coarse preconditioner from a centralized input with a sparse direct solver. Only in use with ICNTL(51) = 2, 3 or 4'
55:
NAME: ICNTL_FABULOUS_OrthoType
......@@ -813,6 +817,11 @@ ICNTL: ################################
N $>0$:
DESCRIPTION: 'Recompute the preconditioner each N iteration(s)'
62:
NAME: ICNTL_MUMPS_ORDERING
DEFAULT: 5
DESCRIPTION: "Control MUMPS's ICNTL of 7: the ordering tool (scotch/metis/pord...)"
RANGE: '0-7'
RCNTL: ################################
2:
......
......@@ -268,10 +268,11 @@ Module MPH_maphys_enum
! Strategy to apply the 2-level coarse preconditioner
Integer, Parameter :: ICNTL_CGC_STRAT = 51
Integer, Parameter :: IKEEP_CGC_STRAT = 51
Integer, Parameter :: CGC_STRAT_MumpsDist = 0
Integer, Parameter :: CGC_STRAT_Lapack = 1
Integer, Parameter :: CGC_STRAT_withSDS = 2
Integer, Parameter :: CGC_STRAT_withSDS_Dup = 3
Integer, Parameter :: CGC_STRAT_SparseDist = 0
Integer, Parameter :: CGC_STRAT_DenseCentralized = 1
Integer, Parameter :: CGC_STRAT_SparseCentralized = 2
Integer, Parameter :: CGC_STRAT_SparseReplicatedCentr = 3
Integer, Parameter :: CGC_STRAT_SparseHierachicalDist = 4
! Number of MPI processes to compute and apply the 2-level coarse preconditioner
Integer, Parameter :: ICNTL_CGC_NPROCS = 52
......@@ -301,6 +302,10 @@ Module MPH_maphys_enum
Integer, Parameter :: ICNTL_MULTISOLVE_PCD_RECOMP = 61
Integer, Parameter :: IKEEP_MULTISOLVE_PCD_RECOMP = 61
! Control MUMPS's ICNTL of 7: the ordering tool (scotch/metis/pord...)
Integer, Parameter :: ICNTL_MUMPS_ORDERING = 62
Integer, Parameter :: IKEEP_MUMPS_ORDERING = 62
! Control parameters RCNTL
! Eigen vectors target for \fabulous DR algo.
......@@ -319,19 +324,19 @@ Module MPH_maphys_enum
Integer, Parameter :: RCNTL_MUMPS_WS_mult = 5
Integer, Parameter :: RKEEP_MUMPS_WS_mult = 5
! Threshold used to Sparsify the LU factors while using PILUT.
! Threshold used to sparsify the LU factors while using PILUT.
Integer, Parameter :: RCNTL_ILU_LUThreshold = 8
Integer, Parameter :: RKEEP_ILU_LUThreshold = 8
! Threshold used to Sparsify the schur complement while computing it with PILUT.
! Threshold used to sparsify the schur complement while computing it with PILUT.
Integer, Parameter :: RCNTL_ILU_SCHURThreshold = 9
Integer, Parameter :: RKEEP_ILU_SCHURThreshold = 9
! The threshold used to Sparsify the Schur complement while computing a sparse preconditioner.
! The threshold used to sparsify the Schur complement while computing a sparse preconditioner.
Integer, Parameter :: RCNTL_PCD_SparsifyThreshold = 11
Integer, Parameter :: RKEEP_PCD_SparsifyThreshold = 11
! Threshold used to Sparsify the global part of the preconditioner (ICNTL(21)=7).
! Threshold used to sparsify the global part of the preconditioner (ICNTL(21)=7).
Integer, Parameter :: RCNTL_PCD_SecondSparsifyThreshold = 12
Integer, Parameter :: RKEEP_PCD_SecondSparsifyThreshold = 12
......@@ -605,15 +610,15 @@ Module MPH_maphys_enum
! Extra definitions for IKEEP
Integer, Parameter :: IKEEP_CURJOB = 62
Integer, Parameter :: IKEEP_MPIRANK = 63
Integer, Parameter :: IKEEP_HOSTRANK = 64
Integer, Parameter :: IKEEP_NODES = 65
Integer, Parameter :: IKEEP_NODEID = 66
Integer, Parameter :: IKEEP_NODECOMM = 67
Integer, Parameter :: IKEEP_NBDOMAINS = 68
Integer, Parameter :: IKEEP_SCHUR_UselessAfter = 69
Integer, Parameter :: IKEEP_SYMMETRY = 70
Integer, Parameter :: IKEEP_CURJOB = 63
Integer, Parameter :: IKEEP_MPIRANK = 64
Integer, Parameter :: IKEEP_HOSTRANK = 65
Integer, Parameter :: IKEEP_NODES = 66
Integer, Parameter :: IKEEP_NODEID = 67
Integer, Parameter :: IKEEP_NODECOMM = 68
Integer, Parameter :: IKEEP_NBDOMAINS = 69
Integer, Parameter :: IKEEP_SCHUR_UselessAfter = 70
Integer, Parameter :: IKEEP_SYMMETRY = 71
Integer, Parameter :: CURJOB_IsAnalysis = 1
Integer, Parameter :: CURJOB_IsFacto = 2
Integer, Parameter :: CURJOB_IsPrecond = 3
......
......@@ -238,6 +238,8 @@ Contains
End If
rkeep(RKEEP_MUMPS_WS_mult) = rcntl(RCNTL_MUMPS_WS_mult)
Call set_enum(IKEEP_MUMPS_ORDERING,ICNTL_MUMPS_ORDERING,0,7)
Call set_schur
End subroutine set_fac
!****
......@@ -397,7 +399,7 @@ Contains
Call MPH_logWithInfo(MSG_WARNING, ikeep(kp),&
"CGC -> Number of eigen value kept unset. Take :")
End If
Call set_enum(IKEEP_CGC_STRAT,ICNTL_CGC_STRAT,0,3)
Call set_enum(IKEEP_CGC_STRAT,ICNTL_CGC_STRAT,0,4)
Call set_strictlyPositiveI(np,ICNTL_CGC_NPROCS)
end subroutine set_cgc
!****
......
......@@ -169,7 +169,7 @@ Contains
! [-] Perform resolution until factorization
!-------------------------------------------------------------------------
Call XMPH_sds_analyze (Aii_factors,info)
Call XMPH_sds_analyze (Aii_factors,ikeep,info)
MPH_ONFAILURE_GOTO9999(info)
Call XMPH_sds_Factorize (Aii_factors,ikeep,rkeep,info)
......@@ -298,7 +298,7 @@ Contains
Call XMPH_sds_set_multithread (Aii_factors, thread_icntl, info)
MPH_ONFAILURE_GOTO9999(info)
Call XMPH_sds_analyze (Aii_factors,info)
Call XMPH_sds_analyze (Aii_factors,ikeep,info)
MPH_ONFAILURE_GOTO9999(info)
!-------------------------------------------------------------------------
......
......@@ -84,12 +84,17 @@ Contains
nullify( mphs%cols )
nullify( mphs%values )
mphs%write_matrix = ""
mphs%analysis_dump_prefix = ""
nullify( mphs%permtab )
nullify( mphs%sizetab )
!-------------------------------------------------------------------
! [1.3] Right-hand-side & Solution (in dense format ordered by columns)
!-------------------------------------------------------------------
mphs%nrhs = 1
nullify( mphs%rhs_rows )
nullify( mphs%rhs )
nullify( mphs%sol )
......@@ -105,6 +110,8 @@ Contains
! [1.5] Statistics
!-------------------------------------------------------------------
mphs%version = "" ! To be set later on
! on this process (MPI)
mphs%iinfo = -1
mphs%rinfo = -1
......@@ -134,6 +141,10 @@ Contains
mphs%ikeep = DEFAULT_INT
mphs%rkeep = DEFAULT_REAL
! Set after this fct
! mphs%mem
! mphs%env
!-------------------------------------------------------------------
! [2.2] Description of the Non-overlapping domain Decomposition
!-------------------------------------------------------------------
......@@ -251,6 +262,7 @@ Contains
Call XMPH_dm_nullify(mphs%dls_precond_schur%dm_A,iinfo)
Call XMPH_dm_nullify(mphs%dls_precond_schur%dm_B,iinfo)
Call XMPH_dm_nullify(mphs%dls_precond_schur%dm_X,iinfo)
mphs%dls_precond_schur%dds%choice = DEFAULT_INT
!* sparse preconditioner *!
......@@ -264,6 +276,54 @@ Contains
Nullify(mphs%sls_precond_schur%sm_rhs)
Nullify(mphs%sls_precond_schur%dm_sol)
!** preconditioners for the iterative method **!
!* second preconditioner *!
! Arrays
Nullify(mphs%dls_secondprecond_schur%IPIV)
! Derived Types
!@ Type(XMPH_dense_direct_solver_t) :: dds
Call XMPH_dm_nullify(mphs%dls_secondprecond_schur%dm_A,iinfo)
Call XMPH_dm_nullify(mphs%dls_secondprecond_schur%dm_B,iinfo)
Call XMPH_dm_nullify(mphs%dls_secondprecond_schur%dm_X,iinfo)
!* sparse preconditioner *!
! Scalars
mphs%sls_secondprecond_schur%rhs_is_sparse = MPH_FALSE
! Arrays
Nullify(mphs%sls_secondprecond_schur%sm_A )
Nullify(mphs%sls_secondprecond_schur%sds )
Nullify(mphs%sls_secondprecond_schur%dm_rhs)
Nullify(mphs%sls_secondprecond_schur%sm_rhs)
Nullify(mphs%sls_secondprecond_schur%dm_sol)
Call XMPH_dm_nullify(mphs%cgc_V0, iinfo)
mphs%cgccomm = -1
mphs%cgcCommMaster = -1
mphs%cgcCommGroup = -1
Nullify(mphs%master_recvcounts)
Nullify(mphs%master_displs)
Nullify(mphs%cgcgroup_recvcounts)
Nullify(mphs%cgcgroup_displs)
mphs%iAmMaster = .false.
Nullify(mphs%tolerances)
! BC
mphs%bc_n = -1
mphs%bc_nnz = -1
Nullify(mphs%bc_rows)
Nullify(mphs%bc_cols)
Nullify(mphs%bc_values)
mphs%isolve = 0
!-------------------------------------------------------------------
! [3] Finish
!-------------------------------------------------------------------
......@@ -272,7 +332,6 @@ Contains
info = 0
mphs%iinfo(1) = 0
end subroutine XMPH_maphys_Nullify
! [+] routine : XMPH_maphys_free ---------------------------------------------------
......@@ -429,7 +488,7 @@ Contains
! local schur complements matrices (exact or approximate)
! (schur allocated by sds)
Call XMPH_dm_nullify(mphs%dm_schur,iinfo)
Call XMPH_dm_Free(mphs%dm_schur,iinfo)
Call XMPH_sm_free(mphs%sm_schur,iinfo)
! preconditioners for the iterative method
......@@ -473,17 +532,26 @@ Contains
Deallocate( mphs%dls_precond_schur%ipiv)
! CGC Solver
if(mphs%ikeep(IKEEP_CGC_STRAT) == 0) then
if(mphs%ikeep(IKEEP_CGC_STRAT) == CGC_STRAT_SparseDist) then
Call XMPH_SLS_FREE(mphs%sls_secondprecond_schur,iinfo)
else if(mphs%ikeep(IKEEP_CGC_STRAT) == 1) then
else if(mphs%ikeep(IKEEP_CGC_STRAT) == CGC_STRAT_DenseCentralized) then
Call XMPH_DM_Free(mphs%cgc_V0,iinfo)
else if(mphs%ikeep(IKEEP_CGC_STRAT) == 2 .and. mphs%ikeep(IKEEP_MPIRANK)<mphs%ikeep(IKEEP_CGC_NPROCS)) then
else if(mphs%ikeep(IKEEP_CGC_STRAT) == CGC_STRAT_SparseDist .and. mphs%ikeep(IKEEP_MPIRANK)<mphs%ikeep(IKEEP_CGC_NPROCS)) then
Call XMPH_SLS_FREE(mphs%sls_secondprecond_schur,iinfo)
else if(mphs%ikeep(IKEEP_CGC_STRAT) == 3) then
else if(mphs%ikeep(IKEEP_CGC_STRAT) == CGC_STRAT_SparseReplicatedCentr .or. &
mphs%ikeep(IKEEP_CGC_STRAT) == CGC_STRAT_SparseHierachicalDist) then
Call XMPH_SLS_FREE(mphs%sls_secondprecond_schur,iinfo)
if(associated(mphs%master_recvcounts)) deallocate(mphs%master_recvcounts)
if(associated(mphs%master_displs)) deallocate(mphs%master_displs)
if(associated(mphs%cgcgroup_recvcounts)) deallocate(mphs%cgcgroup_recvcounts)
if(associated(mphs%cgcgroup_displs)) deallocate(mphs%cgcgroup_displs)
end if
! Free communicators
If (mphs%cgccomm /= -1) Call MPI_Group_free(mphs%cgccomm, iinfo)
If (mphs%cgccommMaster /= -1) Call MPI_Group_free(mphs%cgccommMaster, iinfo)
If (mphs%cgccommGroup /= -1) Call MPI_Group_free(mphs%cgccommGroup, iinfo)
End Select
end if
......@@ -592,13 +660,14 @@ Contains
ICNTL(ICNTL_FABULOUS_DR_nVect) = 10
ICNTL(ICNTL_DD) = 1
ICNTL(ICNTL_MUMPS_IncreaseStrat) = 0
ICNTL(ICNTL_CGC_STRAT) = 0
ICNTL(ICNTL_CGC_STRAT) = 2
ICNTL(ICNTL_CGC_NPROCS) = 1
ICNTL(ICNTL_FABULOUS_OrthoType) = 0
ICNTL(ICNTL_CG_StopCritNormA) = 1
ICNTL(ICNTL_CG_StopCritNormA_delay) = 5
ICNTL(ICNTL_MULTISOLVE_PCD_KEEP) = 0
ICNTL(ICNTL_MULTISOLVE_PCD_RECOMP) = 0
ICNTL(ICNTL_MUMPS_ORDERING) = 5
!>>>END OF GENERATED ICNTL VALUES
! Do not remove the above line: default icntl set in enum_maphys.yaml
......
......@@ -324,7 +324,7 @@
XMPH_PART_DistRhs
Use XMPH_part_paddle_mod
Use XMPH_dense_matrix_mod, Only : &
XMPH_dm_mmwritecoo, XMPH_DM_Free, XMPH_DM_Create
XMPH_dm_mmwritecoo, XMPH_DM_Free, XMPH_DM_Create, XMPH_dm_nullify
DBG(Use mph_dbg_mod)
Implicit None
......@@ -361,6 +361,10 @@
! [-] Init
!-------------------------------------------------------------------------
Call XMPH_sm_nullify(gb_A, iinfo)
Call XMPH_sm_nullify(sm_rhs, iinfo)
Call XMPH_dm_nullify(dm_sol, iinfo)
Call XMPH_dm_nullify(dm_rhs, iinfo)
! [--] Scalars
iinfo = MPH_SUCCESS
......
......@@ -164,6 +164,8 @@
Integer :: cgcCommGroup
Integer, pointer :: master_recvcounts(:)
Integer, pointer :: master_displs(:)
Integer, pointer :: cgcgroup_recvcounts(:)
Integer, pointer :: cgcgroup_displs(:)
logical :: iAmMaster
! Multiple tolerances for multi-RHS
......
This diff is collapsed.
......@@ -45,17 +45,17 @@ Module XMPH_sls_mod
!! .
Type XMPH_sls_t
Type(XMPH_sparse_matrix_t) , pointer :: sm_A
Type(XMPH_sparse_matrix_t), pointer :: sm_A
Type(XMPH_sds_t) , pointer :: sds
#ifdef HAVE_LIBSHLIB
Type(XMPH_hds_t) , pointer :: hds
#endif
MPH_BOOL :: rhs_is_sparse
Type(XMPH_dense_matrix_t) , pointer :: dm_rhs
Type(XMPH_sparse_matrix_t) , pointer :: sm_rhs
MPH_BOOL :: rhs_is_sparse
Type(XMPH_dense_matrix_t) , pointer :: dm_rhs
Type(XMPH_sparse_matrix_t), pointer :: sm_rhs