Commit 11d74ed8 authored by MARAIT Gilles's avatar MARAIT Gilles

Merge from develop (to version 0.9.8.1)

parents 6deb32f9 01a97220
......@@ -13,7 +13,7 @@ endif(NOT CMAKE_BUILD_TYPE)
# The current version number
set (MAPHYS_VERSION_MAJOR 0.9)
set (MAPHYS_VERSION_MINOR 8)
set (MAPHYS_VERSION_PATCH 0)
set (MAPHYS_VERSION_PATCH 1)
set( MAPHYS_VERSION "${MAPHYS_VERSION_MAJOR}.${MAPHYS_VERSION_MINOR}.${MAPHYS_VERSION_PATCH}" )
......@@ -101,7 +101,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
# Sparse Direct Solvers options
option(MAPHYS_SDS_PASTIX "Enable PaSTiX as direct Solver" ON)
option(PASTIX_VER_6 "Set to true to use pastix version >= 6" OFF)
option(PASTIX_VER_6 "Set to true to use pastix version >= 6" ON)
option(MAPHYS_SDS_MUMPS "Enable MUMPS as direct Solver" ON)
if (NOT MAPHYS_SDS_PASTIX AND NOT MAPHYS_SDS_MUMPS)
message(FATAL_ERROR "Neither MAPHYS_SDS_PASTIX nor MAPHYS_SDS_MUMPS are "
......@@ -337,6 +337,14 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
endif()
if (SCOTCH_FOUND)
add_definitions(-DHAVE_LIBSCOTCH)
if(SCOTCH_INTSIZE EQUAL 8)
message("Scotch detected using 64 bit integers.")
add_definitions(-DMPH_SCOTCH_INT64)
else()
message("Scotch detected using 32 bit integers.")
endif()
if (SCOTCH_INCLUDE_DIRS)
include_directories( ${SCOTCH_INCLUDE_DIRS} )
endif()
......@@ -353,7 +361,6 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
else()
message(FATAL_ERROR "Scotch is required but was not found. "
"Please provide a Scotch library in your environment "
# " or configure with -DMAPHYS_ORDERING_SCOTCH=OFF "
".Note that you can give the path to your Scotch installation "
"by setting SCOTCH_DIR cmake variable.")
endif()
......
......@@ -67,7 +67,8 @@ various implementations.
| Version | Tarball | Documentation | Refcard | Date |
|-------------------------+---------+---------------------+---------------+----------------|
| *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.8.1 (recommended)* | [[http://morse.gforge.inria.fr/maphys/maphys-0.9.8.1.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]] | July 2019 |
| 0.9.8.0 | [[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 |
......@@ -80,7 +81,6 @@ various implementations.
* Links
- [[http://morse.gforge.inria.fr/misc/maphys_0.9.5_users_guide.pdf][Documentation (0.9.6)]]
- [[http://gforge.inria.fr/scm/?group_id=2485][Old repository]]
- [[http://morse.gforge.inria.fr/spack/spack.html][Install MaPHyS with spack]]
- [[http://morse.gforge.inria.fr/maphys/install-maphys-cluster.html][Install MaPHyS on a cluster]]
......
......@@ -12,7 +12,7 @@
\newcommand{\maphys}{\textsc{MaPHyS}\xspace}
\newcommand{\mpi}{\textsc{MPI}\xspace}
\begin{document}
\section*{\maphys version 0.9.8.0 }
\section*{\maphys version 0.9.8.1 }
\subsection*{ICNTL}
\begin{longtable}[H]{| p{.1\textwidth} | p{.7\textwidth} | p{.1\textwidth} |} \hline
Parameter & Description and values & Default value\\ \hline
......
......@@ -46,7 +46,7 @@ foreach(_file ${MAPHYS_EXAMPLES})
get_filename_component(_name_exe ${_file} NAME_WE)
add_executable(${_name_exe} ${_file})
target_link_libraries(${_name_exe} maphys mph_toolkit packcg packgmres slatec ${MAPHYS_EXTRA_LIBRARIES})
install(TARGETS ${_name_exe} DESTINATION ${CMAKE_INSTALL_PREFIX}/examples)
install(TARGETS ${_name_exe} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maphys/examples)
endforeach()
# install input files for examples
......@@ -76,52 +76,36 @@ if(MAPHYS_ORDERING_PADDLE)
)
endif()
install(FILES ${MAPHYS_EXAMPLES_INPUT_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/examples)
install(FILES ${MAPHYS_EXAMPLES_INPUT_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maphys/examples)
# Add tests to CTest
#TODO: make those test more robust (check the solution)
# Only check if the solver converges at the moment
macro(add_4proc_test test_root_name input_file_real input_file_complex)
set(_prec smph dmph cmph zmph)
foreach(_p ${_prec})
set(_test_name ${_p}_${test_root_name})
if((${_p} STREQUAL "smph") OR (${_p} STREQUAL "dmph"))
add_test(${_test_name} mpirun -np 4 ./${_p}_examplekv ${input_file_real})
else()
add_test(${_test_name} mpirun -np 4 ./${_p}_examplekv ${input_file_complex})
endif()
set_tests_properties(${_test_name} PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(${_test_name} PROPERTIES TIMEOUT 60)
endforeach()
endmacro()
file(COPY ${MAPHYS_EXAMPLES_INPUT_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
if(MAPHYS_SDS_PASTIX)
add_test(smph_examplekv_pastix mpirun -np 4 ./smph_examplekv real_bcsstk17.in)
add_test(dmph_examplekv_pastix mpirun -np 4 ./dmph_examplekv real_bcsstk17.in)
add_test(cmph_examplekv_pastix mpirun -np 4 ./cmph_examplekv complex_young1c.in)
add_test(zmph_examplekv_pastix mpirun -np 4 ./zmph_examplekv complex_young1c.in)
set_tests_properties(smph_examplekv_pastix PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(dmph_examplekv_pastix PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(cmph_examplekv_pastix PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(zmph_examplekv_pastix PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
add_4proc_test( examplekv_pastix real_bcsstk17.in complex_young1c.in )
endif()
if(MAPHYS_SDS_MUMPS)
add_test(smph_examplekv_mumps mpirun -np 4 ./smph_examplekv real_bcsstk17_mumps.in)
add_test(dmph_examplekv_mumps mpirun -np 4 ./dmph_examplekv real_bcsstk17_mumps.in)
add_test(cmph_examplekv_mumps mpirun -np 4 ./cmph_examplekv complex_young1c_mumps.in)
add_test(zmph_examplekv_mumps mpirun -np 4 ./zmph_examplekv complex_young1c_mumps.in)
set_tests_properties(smph_examplekv_mumps PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(dmph_examplekv_mumps PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(cmph_examplekv_mumps PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(zmph_examplekv_mumps PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
add_4proc_test( examplekv_mumps real_bcsstk17_mumps.in complex_young1c_mumps.in )
endif()
if(MAPHYS_ORDERING_PADDLE AND MAPHYS_SDS_PASTIX)
add_test(smph_examplekv_paddle mpirun -np 4 ./smph_examplekv real_bcsstk17_paddle.in)
add_test(dmph_examplekv_paddle mpirun -np 4 ./dmph_examplekv real_bcsstk17_paddle.in)
add_test(cmph_examplekv_paddle mpirun -np 4 ./cmph_examplekv complex_young1c_paddle.in)
add_test(zmph_examplekv_paddle mpirun -np 4 ./zmph_examplekv complex_young1c_paddle.in)
set_tests_properties(smph_examplekv_paddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(dmph_examplekv_paddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(cmph_examplekv_paddle PROPERTIES PASS_REGULAR_EXPRESSION "Convergence achieved")
set_tests_properties(zmph_examplekv_paddle 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")
add_4proc_test( examplekv_paddle real_bcsstk17_paddle.in complex_young1c_paddle.in )
endif()
###
### END CMakeLists.txt
......
......@@ -11,7 +11,7 @@ foreach(_file ${MAPHYS_TESTGENDIST})
get_filename_component(_name_exe ${_file} NAME_WE)
add_executable(${_name_exe} ${_file})
target_link_libraries(${_name_exe} maphys mph_toolkit ${MAPHYS_EXTRA_LIBRARIES})
install(TARGETS ${_name_exe} DESTINATION ${CMAKE_INSTALL_PREFIX}/gendistsys)
install(TARGETS ${_name_exe} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maphys/gendistsys)
endforeach()
# install input files for gendistsys
......@@ -21,4 +21,4 @@ set(MAPHYS_TESTGENDIST_INPUT_FILES
gds.in
)
install(FILES ${MAPHYS_TESTGENDIST_INPUT_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/gendistsys)
install(FILES ${MAPHYS_TESTGENDIST_INPUT_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maphys/gendistsys)
......@@ -2,7 +2,7 @@
#define MPH_DEFS_F_H__
#ifndef MAPHYS_VERSION
#define MAPHYS_VERSION '0.9.8.0'
#define MAPHYS_VERSION '0.9.8.1'
#endif
#define MPH_SUCCESS 0
......
......@@ -240,7 +240,7 @@ install(TARGETS maphys
# Copy the fortran module files
install ( CODE
"EXECUTE_PROCESS (COMMAND \"${CMAKE_COMMAND}\" -E copy_directory \"${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}\" \"${CMAKE_INSTALL_PREFIX}/modules\")"
"EXECUTE_PROCESS (COMMAND \"${CMAKE_COMMAND}\" -E copy_directory \"${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}\" \"${CMAKE_INSTALL_PREFIX}/include\")"
)
###
......
......@@ -128,15 +128,15 @@ Module MPH_domain_mod
End subroutine allocandread
subroutine allocandreadr8(ptr,ptrsize,info)
Real(Kind=8), Pointer :: ptr(:)
MPH_INT :: ptrsize
Integer :: info
!
Allocate(ptr(ptrsize),STAT=info)
CHCKALLOC(info)
Read(runit,*) dummy, ptr(1:ptrsize)
End subroutine allocandreadr8
!subroutine allocandreadr8(ptr,ptrsize,info)
! Real(Kind=8), Pointer :: ptr(:)
! MPH_INT :: ptrsize
! Integer :: info
! !
! Allocate(ptr(ptrsize),STAT=info)
! CHCKALLOC(info)
! Read(runit,*) dummy, ptr(1:ptrsize)
!End subroutine allocandreadr8
End subroutine MPH_domain_read
......
......@@ -5,7 +5,6 @@ module MPH_interface_phidal_mod
Use MPH_Part_type
implicit none
!* Interface of the C function *!
interface !--------------------------------------------------
subroutine PHIDAL_supernodes_C &
......@@ -26,6 +25,12 @@ module MPH_interface_phidal_mod
end subroutine PHIDAL_supernodes_C
end interface !----------------------------------------------
#ifdef MPH_SCOTCH_INT64
Integer, Parameter, private :: SCOTCH_NUMKIND = 8 ! SCOTCH with 32 bits integers
#else
Integer, Parameter, private :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
#endif
! List of routines
public :: find_sons
......@@ -38,7 +43,7 @@ module MPH_interface_phidal_mod
implicit none
integer, pointer, intent(in) :: tab(:)
Integer(kind=SCOTCH_NUMKIND), pointer, intent(in) :: tab(:)
integer, intent(in) :: begin
integer, intent(in) :: end
integer, pointer, intent(inout) :: separtable(:)
......
......@@ -20,9 +20,11 @@ Module MPH_part_scotch_mod
!* Enumerations *!
Integer, Parameter :: MAPHYS_NUMKIND = MPH_INTKIND
! Integer, Parameter :: SCOTCH_NUMKIND = 8 ! SCOTCH with 64 bits integer
Integer, Parameter :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
Integer, Parameter :: SCOTCH_IDXKIND = 8
#ifdef MPH_SCOTCH_INT64
Integer, Parameter, private :: SCOTCH_NUMKIND = 8 ! SCOTCH with 32 bits integers
#else
Integer, Parameter, private :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
#endif
Integer, Parameter :: SCOTCH_SYSKIND = 4
!* structures *!
......@@ -101,18 +103,13 @@ Module MPH_part_scotch_mod
integer , intent(in) :: nbdom
Real(kind=8), intent(in) :: imbalancerate
type(maphys_matrix_graph_t), intent(in) :: graph_global_A
integer, intent(out), pointer :: permtab (:)
integer, intent(out), pointer :: peritab (:)
#ifdef HAVE_LIBSCOTCH
Integer(kind=SCOTCH_NUMKIND), intent(out), pointer :: permtab (:)
Integer(kind=SCOTCH_NUMKIND), intent(out), pointer :: peritab (:)
Integer(kind=SCOTCH_NUMKIND), intent(out), Pointer :: rangtab (:)
Integer(kind=SCOTCH_NUMKIND), intent(out), Pointer :: treetab (:)
Integer(kind=SCOTCH_NUMKIND), intent(out) :: cblknbr
#else
Integer, intent(out), Pointer :: rangtab(:)
Integer, intent(out), Pointer :: treetab(:)
#endif
integer, intent(out) :: info
integer, intent(out) :: info
#ifndef HAVE_LIBSCOTCH
Call MPH_log(MSG_ERROR,"MaPHyS was not compiled with SCOTCH (-DHAVE_LIBSCOTCH)")
......@@ -170,8 +167,6 @@ Module MPH_part_scotch_mod
Integer(kind=SCOTCH_NUMKIND) :: i,j
! types
Type(maphys_scotch_graph_t) :: scotch_graph
Real(kind=8) :: scotch_strat(SCOTCH_STRATDIM)
......@@ -298,8 +293,6 @@ Module MPH_part_scotch_mod
If (iinfo /= 0 ) iinfo = -iinfo
If (iinfo /= 0 ) Goto 9999
#ifdef MAPHYS_DUMP_DEBUG
open(18, file="rangtabscotch.dat")
......@@ -346,7 +339,7 @@ Module MPH_part_scotch_mod
If ( iinfo < 0) msg_class = MSG_ERROR
Select Case(istep)
Case(11); Call MPH_logWithInfo (msg_class,vertnbr+1,Trim(rname)//&
Case(11); Call MPH_logWithInfo (msg_class,Int(vertnbr+1),Trim(rname)//&
"Failed to allocate a few arrays, max size =")
Case(21); Call MPH_logWithInfo (msg_class,iinfo,Trim(rname)//&
"while converting maphys graph into scotch graph")
......@@ -354,11 +347,11 @@ Module MPH_part_scotch_mod
"while initializing scotch strategy")
Case(31); Call MPH_logWithInfo (msg_class,iinfo,Trim(rname)//&
"while calling scotch")
Case(32); Call MPH_logWithInfo (msg_class,cblknbr,Trim(rname)//&
Case(32); Call MPH_logWithInfo (msg_class,Int(cblknbr),Trim(rname)//&
" while asserting cblknbr == 2*nbdom -1, cblknbr =")
Case(41); Call MPH_logWithInfo (msg_class,iinfo,Trim(rname)//&
"while converting scotch partitioning tree into maphys one")
Case(42); Call MPH_logWithInfo (msg_class,vertnbr,Trim(rname)//&
Case(42); Call MPH_logWithInfo (msg_class,Int(vertnbr),Trim(rname)//&
"while allocating permutation vectors, size=")
End Select
......@@ -521,8 +514,8 @@ Module MPH_part_scotch_mod
!-------------------------------------------------------------------------
istep = 30
Call MPH_logWithInfo(MSG_DEBUG,vertnbr,"vertnbr =")
Call MPH_logWithInfo(MSG_DEBUG,edgenbr,"edgenbr =")
Call MPH_logWithInfo(MSG_DEBUG,Int(vertnbr),"vertnbr =")
Call MPH_logWithInfo(MSG_DEBUG,Int(edgenbr),"edgenbr =")
Call SCOTCHfGraphCheck(scotch_graph%data(1), iinfo )
If (iinfo /= 0) iinfo = -iinfo
If (iinfo /= 0) Goto 9999
......@@ -541,7 +534,7 @@ Module MPH_part_scotch_mod
Select Case(istep)
Case(11); Call MPH_logWithInfo (msg_class,&
Max(vertnbr+1,edgenbr),Trim(rname)//&
Int(Max(vertnbr+1,edgenbr)),Trim(rname)//&
"Failed to allocate a few arrays, max size =")
Case(12); Call MPH_logWithInfo (msg_class,iinfo,Trim(rname)//&
"while initializing into scotch graph")
......@@ -727,22 +720,22 @@ Module MPH_part_scotch_mod
! save the father index
If ( treetab(i) == -1 ) azz(sep)%father = 0 ! root
If ( treetab(i) /= -1 ) azz(sep)%father = blk2sepidx( treetab(i) )
If ( treetab(i) /= -1 ) azz(sep)%father = Int(blk2sepidx( treetab(i) ))
! save the sons indexes
azz(sep)%rson = min(blk2sepidx(rblk),blk2sepidx(lblk))
azz(sep)%lson = max(blk2sepidx(rblk),blk2sepidx(lblk))
azz(sep)%rson = Int(min(blk2sepidx(rblk),blk2sepidx(lblk)))
azz(sep)%lson = Int(max(blk2sepidx(rblk),blk2sepidx(lblk)))
! get the range of each domains
azz(sep)%sepst = rangtab(i)
azz(sep)%seped = rangtab(i+1) -1
azz(sep)%sepst = Int(rangtab(i))
azz(sep)%seped = Int(rangtab(i+1) -1)
! fill lgst, lged if the sons of lson are leafs
Call get_sons(lblk, cblknbr, rangtab, treetab, lblk2, rblk2, iinfo )
If (iinfo /= 0 ) iinfo = 0 ! ignore errors
If ((lblk2 == is_LEAF) .and. (rblk2 == is_LEAF)) Then
azz(sep)%lgst = rangtab(lblk)
azz(sep)%lged = rangtab(lblk+1) -1
azz(sep)%lgst = Int(rangtab(lblk))
azz(sep)%lged = Int(rangtab(lblk+1) -1)
Else
azz(sep)%lgst = 0
azz(sep)%lged = 0
......@@ -752,8 +745,8 @@ Module MPH_part_scotch_mod
Call get_sons(rblk, cblknbr, rangtab, treetab, lblk2, rblk2, iinfo )
If (iinfo /= 0 ) iinfo = 0 ! ignore errors
If ((lblk2 == is_LEAF) .and. (rblk2 == is_LEAF)) Then
azz(sep)%rgst = rangtab(rblk)
azz(sep)%rged = rangtab(rblk+1) -1
azz(sep)%rgst = Int(rangtab(rblk))
azz(sep)%rged = Int(rangtab(rblk+1) -1)
Else
azz(sep)%rgst = 0
azz(sep)%rged = 0
......@@ -785,13 +778,13 @@ Module MPH_part_scotch_mod
"while getting the right and left son blocs")
Case(122); Call MPH_logWithInfo (msg_class,iinfo,Trim(rname)//&
"while checking the sons blocs")
Case(123); Call MPH_logWithInfo (msg_class,sep,Trim(rname)//&
Case(123); Call MPH_logWithInfo (msg_class,Int(sep),Trim(rname)//&
"while asserting nbdom-1 == sep, sep= ")
Case(31); Call MPH_logWithInfo (msg_class,iinfo,Trim(rname)//&
"while getting the right and left son blocs")
Case(32); Call MPH_logWithInfo (msg_class,iinfo,Trim(rname)//&
"while checking the sons blocs")
Case(33); Call MPH_logWithInfo (msg_class,sep,Trim(rname)//&
Case(33); Call MPH_logWithInfo (msg_class,Int(sep),Trim(rname)//&
"while asserting nbdom-1 == sep, sep= ")
End Select
......
......@@ -14,6 +14,11 @@ Module MPH_part_type
!* No Implicit typing *!
Implicit None
#ifdef MPH_SCOTCH_INT64
Integer, Parameter, private :: SCOTCH_NUMKIND = 8 ! SCOTCH with 32 bits integers
#else
Integer, Parameter, private :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
#endif
!lty> begin unsure comments
......@@ -51,7 +56,7 @@ Module MPH_part_type
INTEGER, pointer :: domintrfdof (:)
!> permutation done on the global matrix
INTEGER, pointer :: metperm (:)
Integer(kind=SCOTCH_NUMKIND), pointer :: metperm (:)
!* Strategy *!
INTEGER :: rhsway ! selected strategy (1..2) , forced to 2
......@@ -326,9 +331,9 @@ Module MPH_part_type
!----------------------------
!> permutation applied on the matrix
INTEGER, Pointer :: metperm (:)
Integer(kind=SCOTCH_NUMKIND), Pointer :: metperm (:)
!> inverse of the permutation applied on the matrix
INTEGER, Pointer :: metiperm (:)
Integer(kind=SCOTCH_NUMKIND), Pointer :: metiperm (:)
end Type maphys_binary_tree_t
......@@ -402,7 +407,7 @@ Module MPH_part_type
!> Lagrange related
Integer, Pointer :: domLg (:)
!> permutation on rows/columns
Integer, Pointer :: metperm (:)
Integer(kind=SCOTCH_NUMKIND), Pointer :: metperm (:)
End Type maphys_domains_t
......
......@@ -95,7 +95,7 @@ Module MPH_rhs_partition_mod
MPH_ONFAILURE_GOTO9999(info)
Call ReadIptr(this%domintrfdof ,this%nbdom,funit,info) ! line 8
MPH_ONFAILURE_GOTO9999(info)
Call ReadIptr(this%metperm ,this%gballndof,funit,info) ! line 9
Call ReadSCOTCHIptr(this%metperm ,this%gballndof,funit,info) ! line 9
MPH_ONFAILURE_GOTO9999(info)
Call ReadI(this%rhsway,funit,info) ! line 10
Select Case (this%rhsway)
......@@ -162,6 +162,30 @@ Module MPH_rhs_partition_mod
If (info<0) Deallocate(ptr)
End subroutine ReadIptr
subroutine ReadSCOTCHIptr(ptr,ptrsize,funit,info)
Implicit None
#ifdef MPH_SCOTCH_INT64
Integer*8, Pointer, Intent(out) :: ptr(:)
#else
Integer*4, Pointer, Intent(out) :: ptr(:)
#endif
Integer, Intent(in) :: ptrsize
Integer, Intent(in) :: funit
Integer, Intent(out) :: info
Character(len=MAPHYS_STRL) :: dummy
Allocate(ptr(ptrsize),STAT=info)
CHCKALLOC(info)
If (info<0) Return
Read(funit,*,IOSTAT=info) dummy, ptr(1:ptrsize)
CHCKIO(info)
If (info<0) Deallocate(ptr)
End subroutine ReadSCOTCHIptr
!
!-------------------------------------------------------------------------
!
......@@ -202,7 +226,7 @@ Module MPH_rhs_partition_mod
Call WriteIptr(this%domintrfdof ,this%nbdom,funit,info,"domintrfdof")
MPH_ONFAILURE_RETURN(info)
Call WriteIptr(this%metperm ,this%gballndof,funit,info,"metperm")
Call WriteSCOTCHIptr(this%metperm ,this%gballndof,funit,info,"metperm")
MPH_ONFAILURE_RETURN(info)
!**
Call WriteI(this%rhsway,funit,info,"rhsway")
......@@ -254,6 +278,30 @@ Module MPH_rhs_partition_mod
End If
End subroutine WriteIptr
subroutine WriteSCOTCHIptr(ptr,ptrsize,funit,info,desc)
Implicit None
#ifdef MPH_SCOTCH_INT64
Integer*8, Pointer, Intent(in) :: ptr(:)
#else
Integer*4, Pointer, Intent(in) :: ptr(:)
#endif
Integer, Intent(in) :: ptrsize
Integer, Intent(in) :: funit
Integer, Intent(out) :: info
Character(len=*), Intent(in) :: desc
If (size(ptr) >= ptrsize)Then
Write(funit,*,IOSTAT=info) Trim(desc)//":", ptr(1:ptrsize)
CHCKIO(info)
Else
Write(funit,*,IOSTAT=info) Trim(desc)//":"
CHCKIO(info)
info = Max(info, - __LINE__ )
End If
End subroutine WriteSCOTCHIptr
!
!-------------------------------------------------------------------------
!
......
......@@ -31,6 +31,12 @@ Module XMPH_part_builddomains_mod
#endif
Private :: XMPH_Part_compute_domains_nnz
#ifdef MPH_SCOTCH_INT64
Integer, Parameter :: SCOTCH_NUMKIND = 8 ! SCOTCH with 32 bits integers
#else
Integer, Parameter :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
#endif
!* Routines *!
Contains
......@@ -134,7 +140,7 @@ subroutine XMPH_Part_Build_domains &
! Arrays
Integer, Pointer :: domptr (:) ! partitioning tree related, pointer to domains
Integer, Pointer :: metperm (:) ! partitioning tree related, permutation
Integer(kind=SCOTCH_NUMKIND), Pointer :: metperm (:) ! partitioning tree related, permutation
Integer, Pointer :: domLg (:) ! lagrange related
Integer, Pointer :: need_Lg (:) ! lagrange related
......@@ -336,8 +342,8 @@ subroutine XMPH_Part_Split_interface & ! intents
type(maphys_binary_node_t), pointer :: azz (:)
integer :: totinterface ! number of vertexes in the separators - output
integer , pointer :: metperm (:)
integer , pointer :: metiperm (:)
Integer(kind=SCOTCH_NUMKIND), pointer :: metperm (:)
Integer(kind=SCOTCH_NUMKIND), pointer :: metiperm (:)
!---- domains
integer :: nbdom ! number of domains (=nbsep + 1)
......@@ -381,8 +387,8 @@ subroutine XMPH_Part_Split_interface & ! intents
integer :: procid ! selected processus
integer :: sepid ! selected separator
integer :: levelid ! selected level in the binary tree
integer :: vtx ! original vertex index (1..ndof)
integer :: vtxid ! vertex index after maphys permutation (1..ndof)
Integer(kind=SCOTCH_NUMKIND) :: vtx ! original vertex index (1..ndof)
Integer(kind=SCOTCH_NUMKIND) :: vtxid ! vertex index after maphys permutation (1..ndof)
integer :: adjvtx ! azz: number of my adjacent node in the original indices (=> adjncy(:))
integer :: belongto ! selected domain (=> belongingto (:))
......@@ -1666,7 +1672,7 @@ End subroutine XMPH_Part_compute_lagrange
!> Export lagrange data for checking (with matlab for example)
!!
!! @param[in ] ndof Order of the global matrix
!! @param[in ] met_perm Array specifying the permutation on row/columns
!! @param[in ] metperm Array specifying the permutation on row/columns
!! @param[in ] need_Lg Array specifying Lagrange treatment
!! @param[in ] tree Partitioning binary tree
!! @param[out] info Return code
......@@ -1682,7 +1688,7 @@ subroutine XMPH_Part_compute_lagrange_debug(ndof, metperm, need_Lg, tree, info )
!* Arguments *!
integer , intent(in) :: ndof
integer, pointer , intent(in) :: metperm (:)
Integer(kind=SCOTCH_NUMKIND), pointer, intent(in) :: metperm (:)
integer, pointer , intent(in) :: need_Lg (:)
type(maphys_binary_tree_t) , intent(in) :: tree
integer , intent(out) :: info
......@@ -1721,8 +1727,7 @@ subroutine XMPH_Part_compute_lagrange_debug(ndof, metperm, need_Lg, tree, info )
!-----------------------------------------------------------------------------
! [1] Init
!-----------------------------------------------------------------------------
i = metperm(1) ! Remove warning
i = Int(metperm(1)) ! remove warning
nbsep = tree%nbsep
nbdom = tree%nbsep + 1
nproc = nbdom
......
......@@ -6,8 +6,13 @@
!> Module containing the routines to collect the solution.
Module XMPH_PART_CollectSol_mod
Contains
#ifdef MPH_SCOTCH_INT64
Integer, Parameter, private :: SCOTCH_NUMKIND = 8 ! SCOTCH with 32 bits integers
#else
Integer, Parameter, private :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
#endif
Contains
! [+] routine : XMPH_PART_CollectSol -------------------------------------------------
!
......@@ -83,7 +88,7 @@ Contains
MPH_INT , Pointer :: procintrfdisp (:)
! new
MPH_INT , Pointer :: gb_matrix_perm (:)
Integer(kind=SCOTCH_NUMKIND), Pointer :: gb_matrix_perm (:)
MPH_INT , Pointer :: lc_intrf_filter (:)
MPH_INT , Pointer :: intrf2gb_numbering(:)
......
......@@ -21,6 +21,12 @@ Module XMPH_part_distmatrix_mod
Public :: XMPH_PART_DistGlobalMatrix
Public :: XMPH_Part_compute_interface_weight
#ifdef MPH_SCOTCH_INT64
Integer, Parameter, private :: SCOTCH_NUMKIND = 8 ! SCOTCH with 32 bits integers
#else
Integer, Parameter, private :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
#endif
Contains
! [+] routine : XMPH_PART_DistGlobalMatrix ---------------------------------
......@@ -131,7 +137,7 @@ Contains
integer, pointer :: domLg (:)
integer :: totinterface
integer, pointer :: metperm (:)
Integer(kind=SCOTCH_NUMKIND), pointer :: metperm (:)
! sm_local association
integer :: symtype
......
......@@ -13,6 +13,12 @@ Module XMPH_PART_DistRhs_mod
Character(len=MAPHYS_STRL), Private, Parameter :: FLNAME = &
"XMPH_PART_DistRhs_mod.F90"
#ifdef MPH_SCOTCH_INT64
Integer, Parameter, private :: SCOTCH_NUMKIND = 8 ! SCOTCH with 32 bits integers
#else
Integer, Parameter, private :: SCOTCH_NUMKIND = 4 ! SCOTCH with 32 bits integers
#endif
Contains
! [+] routine : XMPH_PART_DistRhs --------------------------------------------
......@@ -85,8 +91,8 @@ Contains
MPH_INT :: myndofintrf
! arrays
MPH_INT , pointer :: mylogicintrf(:)
MPH_INT , pointer :: metperm(:),scatlogicindices(:)
MPH_INT , pointer :: mylogicintrf(:),scatlogicindices(:)
Integer(kind=SCOTCH_NUMKIND) , pointer :: metperm(:)
MPH_INT , pointer :: domintdof(:),domlogicintrfdof(:)
MPH_INT , pointer :: procintdisp(:),procintrfdisp(:)
......
This diff is collapsed.
......@@ -420,10 +420,10 @@ Contains
(sds, rhs, nrhs, ldrhs, info )
Implicit None
Type(XMPH_sds_t), Intent(inout) :: sds
Integer , Intent(in ) :: nrhs,ldrhs
XMPH_FLOAT , target , Intent(inout) :: rhs(ldrhs*nrhs)
Integer , Intent( out) :: info
Type(XMPH_sds_t) , Intent(inout) :: sds
Integer , Intent(in ) :: nrhs,ldrhs
XMPH_FLOAT, target , Intent(inout) :: rhs(ldrhs*nrhs)
Integer , Intent( out) :: info
!- End of header -----------------------------------------------------------
......@@ -431,8 +431,8 @@ Contains
Case( SDS_IsDEACTIVATED ); info = 0
Case (SDS_Ismumps) ; call XMPH_mumps_solve_RHS &
(sds%mumps, rhs, nrhs, ldrhs, info )
Case (SDS_IsPASTIX); call XMPH_pastix_solve_RHS &
(sds%pastix, rhs, nrhs, ldrhs, info )
Case (SDS_IsPASTIX); call XMPH_pastix_solve_RHS(sds%pastix, rhs, &
Int(nrhs, kind=pastix_int_t), Int(ldrhs, kind=pastix_int_t), info )
Case default
info= SDS_IsUnavailable
write(6,*) "Error : in sparse_direct_solver_solve_RHS,", &
......@@ -696,8 +696,9 @@ Contains
Case (SDS_IsPASTIX);
Call XMPH_pastix_set_denseschur &
(sds%pastix, schurlist, nschurlist, &
schur, nschur, ldschur, info)
(sds%pastix, schurlist, Int(nschurlist, kind=pastix_int_t), &
schur, Int(nschur, kind=pastix_int_t), &
Int(ldschur, kind=pastix_int_t), info)