Compare commits

..
55 Commits
Author SHA1 Message Date
Luca Pepè Sciarria 5408e16a4a hot fix: add -ffree-line-length-256 compilation flag for fortran 2025-06-16 16:46:07 +02:00
Luca Pepè Sciarria 372ef708e0 hot fix: now it build cbind with the right source files 2025-06-16 11:41:39 +02:00
Luca Pepè Sciarria f4e1ba97e9 add mpi compilation 2025-06-13 13:15:43 +02:00
Luca Pepè Sciarria e429b04600 work on cpp part of amgprec. Still not working 2025-06-13 13:15:00 +02:00
Luca Pepè Sciarria 6c12de02e8 add cxx mpi version 2025-06-10 09:50:56 +02:00
Luca Pepè Sciarria 0cb2c1c0c6 hot fix 2025-06-10 08:37:17 +02:00
Luca Pepè Sciarria 7c153de54a add cpp file compilation; fix mpi compilation 2025-06-09 17:18:37 +02:00
Luca Pepè Sciarria 00cf38906a Merge branch 'cmake' of github.com:sfilippone/amg4psblas into cmake 2025-06-09 14:11:10 +02:00
Luca Pepè Sciarria 23cf86a797 hot fix: change filename extensions to F90 2025-06-09 14:10:45 +02:00
sfilippone 91bea72cfe Merge branch 'development' into cmake 2025-06-09 10:53:16 +02:00
Luca Pepè Sciarria 9a36a321f2 fix cmake 2025-06-09 10:13:05 +02:00
Luca Pepè Sciarria 60d722ec53 fix cmake 2025-06-09 10:09:28 +02:00
Luca Pepè Sciarria 1b8aa1618e fix cmake 2025-06-09 10:06:50 +02:00
Luca Pepè Sciarria 154e88cd69 hot fix 2025-06-09 09:46:59 +02:00
Luca Pepè Sciarria cf93042e42 now the cmake building works and compiles 2025-06-09 09:42:08 +02:00
Luca Pepè Sciarria ecaea5b794 hot fix: correct name for amg4psblas libraries 2025-06-09 09:39:21 +02:00
Luca Pepè Sciarria 3a42a2597c fix CMake building and compilation 2025-06-06 16:38:50 +02:00
Luca Pepè Sciarria fcf48ee614 hot fix: Config.cmake files now is properly installed 2025-06-06 16:11:59 +02:00
Salvatore Filippone 0ddd35b7b6 Users guide update 2025-06-06 11:12:52 +02:00
Luca Pepè Sciarria 4c19edb2f9 add CMakeLists.txt for samples subprojects 2025-06-06 10:15:55 +02:00
Luca Pepè Sciarria c7c02bf7c0 hot fix, change installation folder name from test to samples 2025-06-06 10:14:38 +02:00
sfilippone 7050095ca5 Users guide updates 2025-06-05 19:02:42 +02:00
Luca Pepè Sciarria b7edff0848 Merge branch 'development' into cmake 2025-06-05 16:31:58 +02:00
Luca Pepè Sciarria 6214a918f1 add installation of test under samples 2025-06-05 16:24:43 +02:00
sfilippone b724a324c9 Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2025-06-05 09:41:07 +02:00
sfilippone 21b85bc533 Update contributor list 2025-06-05 09:39:50 +02:00
sfilippone 3176a53a61 Merge branch 'development' into cmake 2025-06-03 09:33:15 +02:00
sfilippone b246223597 Fixes for IPK8 2025-06-01 20:57:09 +02:00
sfilippone 2f4c9dd579 Improve diagnostic printout in samples 2025-05-26 12:00:49 +02:00
Luca Pepè Sciarria 657986c938 Merge branch 'cmake' of github.com:sfilippone/amg4psblas into cmake 2025-04-17 14:35:48 +02:00
Luca Pepè Sciarria 687e0824e8 change how PSBLAS_INSTALL_DIR is set 2025-04-17 14:35:36 +02:00
Luca Pepè Sciarria 7abeb7d192 hot fix 2025-04-17 13:56:34 +02:00
Luca Pepè Sciarria 196cedfedb correct PSB_IPK/LPK flags, now set only for fortran compiler 2025-04-17 13:51:02 +02:00
Luca Pepè Sciarria 120da08860 remove fortran name mangling 2025-04-17 13:50:13 +02:00
Luca Pepè Sciarria 70b28ddc08 change install directory 2025-04-17 13:49:34 +02:00
sfilippone 22b37fa6d3 Fix REPL with MATCHBOXP 2025-04-16 15:02:52 +02:00
sfilippone 8fdff8e33b Merge branch 'cmake' of github.com:sfilippone/amg4psblas into cmake 2025-04-11 11:36:03 +02:00
Luca Pepè Sciarria 0d07a81aa7 add PSB_IPK and PSB_LPK compilation flags 2025-04-11 11:35:10 +02:00
sfilippone 64d2ead7a0 Merge branch 'cmake' of github.com:sfilippone/amg4psblas into cmake 2025-04-11 09:57:04 +02:00
Luca Pepè Sciarria e762554627 update to reflect the changes in development regarding amg_config.h file 2025-04-11 09:55:13 +02:00
Luca Pepè Sciarria b5e7d6aaaa Merge branch 'development' into cmake 2025-04-11 09:21:51 +02:00
sfilippone 886e03ab65 Merge branch 'development' into cmake 2025-04-10 17:43:45 +02:00
Luca Pepè Sciarria a0fc174c84 add import of psblas installation paths 2025-04-10 14:42:43 +02:00
sfilippone bbf5cc9826 Improve samples output formatting 2025-03-28 15:01:58 +01:00
Salvatore Filippone 8337edb362 Switch off detailed timings 2025-03-27 17:16:22 +01:00
sfilippone a39cd229e0 Improved dependencies in main makefile 2025-03-27 12:40:36 +01:00
sfilippone a983f95fc2 Add error handling after CDALL in samples 2025-03-27 12:40:31 +01:00
Luca Pepè Sciarria 5748358fe9 add make install configuration 2025-03-17 12:23:09 +01:00
Luca Pepè Sciarria 20b3c30e24 add output directory for .a libraries 2025-03-03 15:10:29 +01:00
Luca Pepè Sciarria d61c9fed9f init cmake build system 2025-02-24 16:20:50 +01:00
Luca Pepè Sciarria a8cf53d80e Add cbind build and compilation through cmake 2025-02-24 16:19:26 +01:00
Luca Pepè Sciarria 2efe639a19 add compilation flag for IPK4 LPK8 and build of amgprec library 2025-02-24 14:05:35 +01:00
Luca Pepè Sciarria b426a9ccf7 remove impl/solver/amg_*_invk_solver_set* from compiling 2025-02-24 14:04:54 +01:00
Luca Pepè Sciarria 1feaf40972 remove impl/solver/amg_*_invt_solver_set* from compiling 2025-02-24 13:45:27 +01:00
Luca Pepè Sciarria cc66413be8 remove impl/solver/amg_*_ainv_solver_set* from compiling 2025-02-24 13:41:45 +01:00
109 changed files with 3053 additions and 515 deletions
+542
View File
@@ -0,0 +1,542 @@
cmake_minimum_required(VERSION 3.10)
project(amg4psblas VERSION 1.0 LANGUAGES C CXX Fortran)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
set(PSBLAS_INSTALL_DIR "" CACHE PATH "Path to the PSBLAS installation
directory")
if(PSBLAS_INSTALL_DIR STREQUAL "")
message(FATAL_ERROR "Please specify the path to the PSBLAS installation directory using -DPSBLAS_INSTALL_DIR=<path> or set it in ccmake.")
endif()
# Check for the installation path for psblas
#if(NOT DEFINED PSBLAS_INSTALL_DIR)
# message(FATAL_ERROR "Please specify the path to the psblas installation directory using -DPSBLAS_INSTALL_DIR=<path>")
#endif()
message(STATUS "psblas directory is ${PSBLAS_INSTALL_DIR};;")
message(STATUS "PSBLAS DIRECTORY INC ${INCDIR}; MOD ${MODDIR}; LIB ${LIBDIR};")
#set(CMAKE_CXX_STANDARD 17) # Set cxx standard for the c++ part of the library
# Find the psblas package
find_package(psblas REQUIRED PATHS ${PSBLAS_INSTALL_DIR})
if(NOT psblas_FOUND)
message(FATAL_ERROR "PSBLAS not found!")
else()
message(STATUS "Found PSBLAS: ${psblas_LIBRARIES}")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# Add -g to the Fortran compiler flags.
# We use STRING(APPEND) to ensure we don't overwrite other important flags.
string(APPEND CMAKE_Fortran_FLAGS " -g")
string(APPEND CMAKE_CXX_FLAGS " -g")
message(STATUS "Fortran and CXX debug flags added: -g")
endif()
string(APPEND CMAKE_Fortran_FLAGS " -O2")
string(APPEND CMAKE_CXX_FLAGS " -O2")
message(STATUS "Fortran and CXX optimization flags added: -O2")
# Set the include and library directories based on the provided path
#set(TEST_INSTALLDIR "${PSBLAS_INSTALL_DIR}")
set(INCDIR "${PSBLAS_INSTALL_DIR}/${PSB_CMAKE_INSTALL_INCLUDEDIR}")
set(MODDIR "${PSBLAS_INSTALL_DIR}/${PSB_CMAKE_INSTALL_MODULDIR}")
set(LIBDIR "${PSBLAS_INSTALL_DIR}/${PSB_CMAKE_INSTALL_LIBDIR}")
# Include directories for the project
include_directories(${PSBLAS_INSTALL_DIR} ${MPI_INCLUDE_PATH} )
# Include directories for the Fortran compiler
include_directories(${INCDIR} ${MODDIR} ${LIBDIR})
message(STATUS "Using IPK size: ${PSB_IPK_SIZE}")
message(STATUS "Using LPK size: ${PSB_LPK_SIZE}")
# Add PSB_IPK/LPK flag only for fortran files.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DPSB_IPK${PSB_IPK_SIZE}")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DPSB_LPK${PSB_LPK_SIZE}")
# Specify the installation directory
#set(${CMAKE_INSTALL_LIBDIR} "lib")
#message(STATUS "\t\t install libdir ${CMAKE_INSTALL_LIBDIR};")
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/${${CMAKE_PROJECT_NAME}_dist_string}-tests")
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/${${CMAKE_PROJECT_NAME}_dist_string}-tests")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
#set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
#set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "Include directory")
#set(CMAKE_INSTALL_MODULDIR "modules" CACHE STRING "Module directory")
message(STATUS "Initial CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR}")
set(AMG_CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
if(NOT AMG_CMAKE_INSTALL_LIBDIR)
message(STATUS "CMAKE_INSTALL_LIBDIR is set to default value lib")
#set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory" FORCE)
set(CMAKE_INSTALL_LIBDIR ${PSB_CMAKE_INSTALL_LIBDIR})
set(AMG_CMAKE_INSTALL_LIBDIR ${PSB_CMAKE_INSTALL_LIBDIR})
else()
set(CMAKE_INSTALL_LIBDIR ${AMG_CMAKE_INSTALL_LIBDIR})
message(STATUS "CMAKE_INSTALL_LIBDIR is set to: ${CMAKE_INSTALL_LIBDIR}")
endif()
if(NOT AMG_CMAKE_INSTALL_INCLUDEDIR)
message(STATUS "CMAKE_INSTALL_INCLUDEDIR is set to default value lib")
#set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "Include directory" FORCE)
set(CMAKE_INSTALL_INCLUDEDIR ${PSB_CMAKE_INSTALL_INCLUDEDIR})
set(AMG_CMAKE_INSTALL_INCLUDEDIR ${PSB_CMAKE_INSTALL_INCLUDEDIR})
else()
set(CMAKE_INSTALL_INCLUDEDIR ${AMG_CMAKE_INSTALL_INCLUDEDIR})
message(STATUS "CMAKE_INSTALL_INCLUDEDIR is set to: ${CMAKE_INSTALL_INCLUDEDIR}")
endif()
if(NOT AMG_CMAKE_INSTALL_MODULDIR)
message(STATUS "CMAKE_INSTALL_MODULDIR is set to default value lib")
#set(CMAKE_INSTALL_MODULDIR "modules" CACHE STRING "Modules directory" FORCE)
set(CMAKE_INSTALL_MODULDIR ${PSB_CMAKE_INSTALL_MODULDIR})
set(AMG_CMAKE_INSTALL_LIBDIR ${PSB_CMAKE_INSTALL_MODULDIR})
else()
set(CMAKE_INSTALL_MODULDIR ${AMG_CMAKE_INSTALL_MODULDIR})
message(STATUS "CMAKE_INSTALL_MODULDIR is set to: ${CMAKE_INSTALL_MODULDIR}")
endif()
#-----------------------------------------------------
# Publicize installed location to other CMake projects
#-----------------------------------------------------
#install(EXPORT ${CMAKE_PROJECT_NAME}-targets
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake"
#)
message(STATUS "NAME project ${CMAKE_PROJECT_NAME};")
install(EXPORT ${CMAKE_PROJECT_NAME}-targets
FILE ${CMAKE_PROJECT_NAME}Config.cmake
NAMESPACE ${CMAKE_PROJECT_NAME}::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake"
)
include(CMakePackageConfigHelpers) # standard CMake module
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake"
VERSION "${amg4psblas_VERSION}"
COMPATIBILITY SameMajorVersion
)
configure_file("${CMAKE_SOURCE_DIR}/cmake/${CMAKE_PROJECT_NAME}Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${CMAKE_PROJECT_NAME}Config.cmake" @ONLY)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${CMAKE_PROJECT_NAME}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake"
DESTINATION
"${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}"
)
#------------------------------------------
# Add portable unistall command to makefile
#------------------------------------------
# Adapted from the CMake Wiki FAQ
configure_file ( "${CMAKE_SOURCE_DIR}/cmake/uninstall.cmake.in" "${CMAKE_BINARY_DIR}/uninstall.cmake"
@ONLY)
add_custom_target ( uninstall
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/uninstall.cmake" )
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
# See JSON-Fortran's CMakeLists.txt file to find out how to get the check target to depend
# on the test executables
#----------------------------------
# Determine if we're using Open MPI
#---------------------------------
find_package( MPI REQUIRED Fortran C CXX )
if(MPI_FOUND)
#-----------------------------------------------
# Work around an issue present on fedora systems
#-----------------------------------------------
if( (MPI_CXX_LINK_FLAGS MATCHES "noexecstack") OR (MPI_Fortran_LINK_FLAGS MATCHES "noexecstack") )
message ( WARNING
"The `noexecstack` linker flag was found in the MPI_<lang>_LINK_FLAGS variable. This is
known to cause segmentation faults for some Fortran codes. See, e.g.,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71729 or
https://github.com/sourceryinstitute/OpenCoarrays/issues/317.
`noexecstack` is being replaced with `execstack`"
)
string(REPLACE "noexecstack"
"execstack" MPI_CXX_LINK_FLAGS_FIXED ${MPI_CXX_LINK_FLAGS})
string(REPLACE "noexecstack"
"execstack" MPI_C_LINK_FLAGS_FIXED ${MPI_C_LINK_FLAGS})
string(REPLACE "noexecstack"
"execstack" MPI_Fortran_LINK_FLAGS_FIXED ${MPI_Fortran_LINK_FLAGS})
set(MPI_CXX_LINK_FLAGS "${MPI_CXX_LINK_FLAGS_FIXED}" CACHE STRING
"MPI CXX linking flags" FORCE)
set(MPI_C_LINK_FLAGS "${MPI_C_LINK_FLAGS_FIXED}" CACHE STRING
"MPI C linking flags" FORCE)
set(MPI_Fortran_LINK_FLAGS "${MPI_Fortran_LINK_FLAGS_FIXED}" CACHE STRING
"MPI Fortran linking flags" FORCE)
endif()
message(STATUS "Found MPI: ${MPI_C_LIBRARIES} - ${MPI_CXX_LIBRARIES} - ${MPI_Fortran_LIBRARIES}")
#----------------
# Setup MPI compilers
#----------------
set(CMAKE_C_COMPILER ${MPI_C_COMPILER} CACHE FILEPATH "C compiler" FORCE)
set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER} CACHE FILEPATH "C++ compiler" FORCE)
set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER} CACHE FILEPATH "Fortran compiler" FORCE)
#----------------
# Setup MPI flags
#----------------
list(REMOVE_DUPLICATES MPI_Fortran_INCLUDE_PATH)
set(CMAKE_C_COMPILE_FLAGS ${CMAKE_C_COMPILE_FLAGS} ${MPI_C_COMPILE_FLAGS})
set(CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS} ${MPI_C_LINK_FLAGS})
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_CXX_COMPILE_FLAGS})
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_CXX_LINK_FLAGS})
set(CMAKE_Fortran_COMPILE_FLAGS ${CMAKE_Fortran_COMPILE_FLAGS} ${MPI_Fortran_COMPILE_FLAGS})
set(CMAKE_Fortran_LINK_FLAGS ${CMAKE_Fortran_LINK_FLAGS} ${MPI_Fortran_LINK_FLAGS})
include_directories(BEFORE ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH} ${MPI_Fortran_INCLUDE_PATH})
message(STATUS "${MPI_C_INCLUDE_PATH}; ${MPI_Fortran_INCLUDE_PATH};; ${CMAKE_Fortran_LINK_FLAGS} ;")
if(MPI_Fortran_HAVE_F90_MODULE OR MPI_Fortran_HAVE_F08_MODULE)
add_compile_options(-DPSB_MPI_MOD)
message(STATUS "-DPSB_MPI_MOD")
#add_compile_options(-DSERIAL_MPI) # Is it right??
#message(STATUS "-DSERIAL_MPI")
endif()
set(PSB_SERIAL_MPI OFF)
else()
message(STATUS "MPI not found, serial ahead")
add_compile_options(-DPSB_SERIAL_MPI)
add_compile_options(-DPSB_MPI_MOD)
set(PSB_SERIAL_MPI ON)
set(CSERIALMPI "#define PSB_SERIAL_MPI")
endif()
add_compile_options(-O3)
add_compile_options($<$<COMPILE_LANGUAGE:Fortran>:-frecursive>)
if(MPI_FOUND)
execute_process(COMMAND ${MPIEXEC} --version
OUTPUT_VARIABLE mpi_version_out)
if (mpi_version_out MATCHES "[Oo]pen[ -][Mm][Pp][Ii]")
message( STATUS "OpenMPI detected")
set ( openmpi true )
endif()
set(MPI_H_COPIED FALSE)
set(MPI_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include") # Define the include directory
# Create the include directory if it doesn't exist
file(MAKE_DIRECTORY "${MPI_INCLUDE_DIR}")
foreach(path IN LISTS MPI_INCLUDE_PATH)
# Construct the full path to the mpi.h file
set(mpi_h_path "${path}/mpi.h")
# Check if the mpi.h file exists
if(EXISTS "${mpi_h_path}")
# Copy the mpi.h file to the include directory
file(COPY "${mpi_h_path}" DESTINATION "${MPI_INCLUDE_DIR}")
message(STATUS "Copied mpi.h from ${mpi_h_path} to ${MPI_INCLUDE_DIR}")
set(MPI_H_COPIED TRUE)
break() # Exit the loop once we've copied the file
endif()
endforeach()
if(NOT MPI_H_COPIED)
message(WARNING "mpi.h not found in any of the specified paths: ${MPI_INCLUDE_PATH}")
endif()
# Add the created include directory to the project's include directories
#include_directories("${MPI_INCLUDE_DIR}")
endif()
#------------------------------------------
# Configure the amg_config.h file
#------------------------------------------
message(STATUS "bin dir ${CMAKE_CURRENT_BINARY_DIR}; source dir ${CMAKE_CURRENT_SOURCE_DIR};;")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/amgprec/amg_config.h.in
${CMAKE_CURRENT_BINARY_DIR}/include/amg_config.h
@ONLY # Replace variables only
)
#---------------------------------------
# Add the AMG libraries
#---------------------------------------
# In your CMakeLists.txt
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-256")
message(STATUS "MPI_LIBRARIES: ${MPI_LIBRARIES}")
message(STATUS "MPI_CXX_LIBRARIES: ${MPI_CXX_LIBRARIES}")
include(${CMAKE_CURRENT_LIST_DIR}/amgprec/CMakeLists.txt) # include amgprec_source_files and amgprec_source_C_files source files
include_directories("${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}")
add_library(amgprec_C OBJECT ${amgprec_source_C_files})
add_library(amgprec_CPP OBJECT ${amgprec_source_CPP_files})
target_link_libraries(amgprec_C
#PUBLIC ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES} ${LAPACK95_LIBRARIES}
#PUBLIC ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES} ${BLAS95_LIBRARIES}
psblas::util psblas::linsolve psblas::prec psblas::ext psblas::cbind psblas::base
#${MPI_C_LIBRARIES}
) #TODO check actual libraries needed
target_link_libraries(amgprec_CPP
#PUBLIC ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES} ${LAPACK95_LIBRARIES}
#PUBLIC ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES} ${BLAS95_LIBRARIES}
psblas::util psblas::linsolve psblas::prec psblas::ext psblas::cbind psblas::base
stdc++
${MPI_CXX_LIBRARIES}) #TODO check actual libraries needed
add_library(amgprec ${amgprec_source_files} $<TARGET_OBJECTS:amgprec_CPP> $<TARGET_OBJECTS:amgprec_C> )
set_target_properties(amgprec
PROPERTIES
Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/modules"
POSITION_INDEPENDENT_CODE TRUE
OUTPUT_NAME amg_prec
LINKER_LANGUAGE Fortran
)
target_include_directories(amgprec PUBLIC
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/modules>
$<INSTALL_INTERFACE:modules>)
message(STATUS "include dir := ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}")
#target_include_directories(base PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY})
target_include_directories(amgprec PUBLIC ${INCDIR} ${MODDIR})
target_link_libraries(amgprec
#PUBLIC ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES} ${LAPACK95_LIBRARIES}
#PUBLIC ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES} ${BLAS95_LIBRARIES}
psblas::util psblas::linsolve psblas::prec psblas::ext psblas::cbind psblas::base
#${MPI_Fortran_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MPI_C_LIBRARIES}
) #TODO check actual libraries needed
include(${CMAKE_CURRENT_LIST_DIR}/cbind/CMakeLists.txt) # include amgprec_source_files and amgprec_source_C_files source files
foreach(path IN LISTS amgcbind_header_C_files)
# Copy the header file to the include directory
file(COPY "${path}" DESTINATION "${CMAKE_BINARY_DIR}/include")
endforeach()
add_library(amgcbind_C OBJECT ${amgcbind_source_C_files})
target_link_libraries(amgcbind_C
#PUBLIC ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES} ${LAPACK95_LIBRARIES}
#PUBLIC ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES} ${BLAS95_LIBRARIES}
psblas::util psblas::linsolve psblas::prec psblas::ext psblas::cbind psblas::base) #TODO check actual libraries needed
add_library(amgcbind ${amgcbind_source_files} $<TARGET_OBJECTS:amgcbind_C>)
set_target_properties(amgcbind
PROPERTIES
Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/modules"
POSITION_INDEPENDENT_CODE TRUE
OUTPUT_NAME amg_cbind
LINKER_LANGUAGE Fortran
)
target_include_directories(amgcbind PUBLIC
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/modules>
$<INSTALL_INTERFACE:modules>)
message(STATUS "include dir := ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}")
#target_include_directories(base PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY})
target_include_directories(amgcbind PUBLIC ${INCDIR} ${MODDIR})
target_link_libraries(amgcbind
#PUBLIC ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES} ${LAPACK95_LIBRARIES}
#PUBLIC ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES} ${BLAS95_LIBRARIES}
PUBLIC amgprec psblas::util psblas::linsolve psblas::prec psblas::ext psblas::cbind psblas::base) #TODO check actual libraries needed
install(DIRECTORY ${CMAKE_BINARY_DIR}/include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${CMAKE_BINARY_DIR}/modules/ DESTINATION "${CMAKE_INSTALL_MODULDIR}"
FILES_MATCHING PATTERN "*.mod")
# Install the library
install(TARGETS amgprec amgcbind
EXPORT ${CMAKE_PROJECT_NAME}-targets
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
if(WIN32) #TODO
# install(TARGETS psb_base_C
# EXPORT ${CMAKE_PROJECT_NAME}-targets
# DESTINATION "${CMAKE_INSTALL_LIBDIR}"
# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
# )
# if(METIS_FOUND)
# install(TARGETS psb_util_C
# EXPORT ${CMAKE_PROJECT_NAME}-targets
# DESTINATION "${CMAKE_INSTALL_LIBDIR}"
# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
# )
# endif()
endif()
message(STATUS "install directory is ${CMAKE_INSTALL_LIBDIR};;;")
# Step 2: Create the configuration file from the template
#configure_package_config_file(
# "${CMAKE_CURRENT_SOURCE_DIR}/cmake/amg4psblasConfig.cmake.in"
# "${CMAKE_CURRENT_BINARY_DIR}/amg4psblasConfig.cmake"
# INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/amg4psblas"
#)
# Step 3: Install the generated config files
#install(FILES
# "${CMAKE_CURRENT_BINARY_DIR}/amg4psblasConfig.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/amg4psblasConfigVersion.cmake"
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/amg4psblas"
#)
# Step 4: Export targets so that the build directory can be used directly
#export(
# EXPORT ${CMAKE_PROJECT_NAME}-targets
# FILE "${CMAKE_CURRENT_BINARY_DIR}/amg4psblasTargets.cmake"
# NAMESPACE psblas::
#)
export(
EXPORT ${CMAKE_PROJECT_NAME}-targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake"
NAMESPACE ${CMAKE_PROJECT_NAME}::
)
#export(
# EXPORT ${CMAKE_PROJECT_NAME}-targets
# FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake"
# NAMESPACE ${CMAKE_PROJECT_NAME}::
#)
# Set the installation directory for the test files
set(INSTALL_TEST_DIR "${CMAKE_INSTALL_PREFIX}/samples" CACHE PATH "Installation directory for sample files")
function(install_directory_recursive source_dir install_base_dir) # Function to install a directory and its subdirectories recursively
file(GLOB_RECURSE ALL_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/${source_dir}" "${source_dir}/*")
foreach(FILE_PATH IN LISTS ALL_FILES)
# Construct the full source and destination paths
set(FULL_SOURCE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${source_dir}/${FILE_PATH}")
set(FULL_INSTALL_PATH "${install_base_dir}/${FILE_PATH}")
# Check if it's a directory
if(IS_DIRECTORY "${FULL_SOURCE_PATH}")
# Create the directory in the install destination
file(MAKE_DIRECTORY "${FULL_INSTALL_PATH}")
else()
# Install the file
install(FILES "${FULL_SOURCE_PATH}" DESTINATION "${install_base_dir}" RENAME "${FILE_PATH}")
endif()
endforeach()
endfunction()
# Install test/fileread directory
install_directory_recursive(samples/simple "${INSTALL_TEST_DIR}/simple")
# Install test/pdegen directory
install_directory_recursive(samples/advanced "${INSTALL_TEST_DIR}/advanced")
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} - ${PSB_CMAKE_INSTALL_PREFIX};")
message(STATUS "CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR} - ${PSB_CMAKE_INSTALL_LIBDIR};")
message(STATUS "CMAKE_INSTALL_INCLUDEDIR: ${CMAKE_INSTALL_INCLUDEDIR} - ${PSB_CMAKE_INSTALL_INCLUDEDIR};")
message(STATUS "CMAKE_INSTALL_MODULDIR: ${CMAKE_INSTALL_MODULDIR} - ${PSB_CMAKE_INSTALL_MODULDIR};")
+1 -1
View File
@@ -21,7 +21,7 @@ amgp:
cbnd: amgp
cd cbind && $(MAKE) objs
install: lib
install: all
mkdir -p $(INSTALL_LIBDIR) &&\
$(INSTALL_DATA) lib/*.a $(INSTALL_LIBDIR)
mkdir -p $(INSTALL_INCLUDEDIR) &&\
+6
View File
@@ -74,3 +74,9 @@ In the European project “Energy oriented Center of Excellence: toward exascale
- Fabio Durastante (University of Pisa and IAC-CNR, IT)
- Salvatore Filippone (University of Rome Tor Vergata and IAC-CNR, IT)
**Contributors** (_roughly reverse cronological order_):
- Luca Pepè Sciarria
- Andea Di Iorio
- Ambra Abdullahi Hassan
- Alfredo Buttari
+907
View File
@@ -0,0 +1,907 @@
set(AMG_amgprec_source_files
amg_s_ainv_solver.F90
amg_d_ainv_solver.F90
amg_z_base_solver_mod.f90
amg_z_slu_solver.F90
amg_z_gs_solver.f90
amg_d_ilu_fact_mod.f90
# amg_z_hybrid_aggregator_mod.F90
amg_c_base_smoother_mod.f90
amg_s_matchboxp_mod.F90
amg_c_gs_solver.f90
amg_z_prec_type.f90
amg_s_base_solver_mod.f90
amg_d_slu_solver.F90
amg_z_inner_mod.f90
amg_d_base_aggregator_mod.f90
amg_c_diag_solver.f90
amg_z_krm_solver.f90
impl/amg_zfile_prec_descr.f90
impl/amg_c_hierarchy_rebld.f90
impl/amg_dcprecset.F90
impl/amg_sprecinit.F90
impl/amg_cprecinit.F90
impl/amg_smlprec_aply.f90
impl/level/amg_s_base_onelev_map_rstr.F90
impl/level/amg_c_base_onelev_csetr.f90
impl/level/amg_d_base_onelev_map_rstr.F90
impl/level/amg_z_base_onelev_setsv.F90
impl/level/amg_d_base_onelev_descr.f90
impl/level/amg_d_base_onelev_setag.f90
impl/level/amg_s_base_onelev_dump.f90
impl/level/amg_s_base_onelev_build.f90
impl/level/amg_c_base_onelev_map_rstr.F90
impl/level/amg_z_base_onelev_memory_use.f90
impl/level/amg_s_base_onelev_map_prol.F90
impl/level/amg_d_base_onelev_csetc.F90
impl/level/amg_d_base_onelev_cnv.f90
impl/level/amg_c_base_onelev_setsv.F90
impl/level/amg_c_base_onelev_descr.f90
impl/level/amg_z_base_onelev_setsm.F90
impl/level/amg_d_base_onelev_csetr.f90
impl/level/amg_s_base_onelev_descr.f90
impl/level/amg_c_base_onelev_build.f90
impl/level/amg_c_base_onelev_setag.f90
impl/level/amg_c_base_onelev_free_smoothers.f90
impl/level/amg_c_base_onelev_memory_use.f90
impl/level/amg_s_base_onelev_csetr.f90
impl/level/amg_s_base_onelev_mat_asb.f90
impl/level/amg_c_base_onelev_free.f90
impl/level/amg_d_base_onelev_free_smoothers.f90
impl/level/amg_z_base_onelev_map_prol.F90
impl/level/amg_s_base_onelev_free_smoothers.f90
impl/level/amg_d_base_onelev_map_prol.F90
impl/level/amg_d_base_onelev_free.f90
impl/level/amg_z_base_onelev_cnv.f90
impl/level/amg_s_base_onelev_cseti.F90
impl/level/amg_s_base_onelev_csetc.F90
impl/level/amg_c_base_onelev_map_prol.F90
impl/level/amg_d_base_onelev_check.f90
impl/level/amg_d_base_onelev_setsm.F90
impl/level/amg_s_base_onelev_setsv.F90
impl/level/amg_z_base_onelev_mat_asb.f90
impl/level/amg_c_base_onelev_mat_asb.f90
impl/level/amg_z_base_onelev_cseti.F90
impl/level/amg_z_base_onelev_descr.f90
impl/level/amg_z_base_onelev_map_rstr.F90
impl/level/amg_z_base_onelev_check.f90
impl/level/amg_c_base_onelev_cnv.f90
impl/level/amg_z_base_onelev_build.f90
impl/level/amg_d_base_onelev_build.f90
impl/level/amg_c_base_onelev_cseti.F90
impl/level/amg_c_base_onelev_check.f90
impl/level/amg_s_base_onelev_check.f90
impl/level/amg_s_base_onelev_memory_use.f90
impl/level/amg_s_base_onelev_cnv.f90
impl/level/amg_z_base_onelev_setag.f90
impl/level/amg_s_base_onelev_free.f90
impl/level/amg_z_base_onelev_dump.f90
impl/level/amg_z_base_onelev_csetr.f90
impl/level/amg_z_base_onelev_free_smoothers.f90
impl/level/amg_c_base_onelev_csetc.F90
impl/level/amg_d_base_onelev_dump.f90
impl/level/amg_z_base_onelev_csetc.F90
impl/level/amg_d_base_onelev_setsv.F90
impl/level/amg_s_base_onelev_setsm.F90
impl/level/amg_d_base_onelev_mat_asb.f90
impl/level/amg_s_base_onelev_setag.f90
impl/level/amg_d_base_onelev_cseti.F90
impl/level/amg_d_base_onelev_memory_use.f90
impl/level/amg_c_base_onelev_setsm.F90
impl/level/amg_z_base_onelev_free.f90
impl/level/amg_c_base_onelev_dump.f90
impl/amg_z_hierarchy_bld.F90
impl/amg_zfile_prec_memory_use.f90
impl/amg_c_smoothers_bld.f90
impl/amg_dmlprec_aply.f90
impl/amg_cprecaply.f90
impl/amg_zcprecset.F90
impl/amg_z_smoothers_bld.f90
impl/amg_cprecset.F90
impl/amg_cfile_prec_memory_use.f90
impl/amg_z_extprol_bld.F90
impl/amg_sprecbld.f90
impl/amg_s_hierarchy_rebld.f90
impl/amg_s_smoothers_bld.f90
impl/amg_dprecinit.F90
impl/amg_zmlprec_bld.f90
impl/amg_smlprec_bld.f90
impl/amg_sfile_prec_memory_use.f90
impl/amg_dprecaply.f90
impl/amg_zprecbld.f90
impl/amg_z_hierarchy_rebld.f90
impl/amg_c_extprol_bld.F90
impl/amg_zprecaply.f90
impl/amg_s_extprol_bld.F90
impl/amg_dfile_prec_memory_use.f90
impl/solver/amg_z_invt_solver_clone_settings.f90
impl/solver/amg_c_gs_solver_clear_data.f90
impl/solver/amg_d_base_solver_apply.f90
impl/solver/amg_s_ilu_solver_apply.f90
impl/solver/amg_d_jac_solver_apply.f90
impl/solver/amg_z_base_solver_csetr.f90
impl/solver/amg_z_ilu_solver_dmp.f90
impl/solver/amg_d_diag_solver_dmp.f90
impl/solver/amg_c_invt_solver_check.f90
impl/solver/amg_z_base_solver_descr.f90
impl/solver/amg_d_mumps_solver_apply_vect.F90
impl/solver/amg_d_l1_jac_solver_bld.f90
impl/solver/amg_z_base_solver_cseti.f90
impl/solver/amg_d_ainv_solver_check.f90
impl/solver/amg_s_invt_solver_bld.f90
impl/solver/amg_z_ainv_solver_clone_settings.f90
impl/solver/amg_c_bwgs_solver_bld.f90
impl/solver/amg_z_base_ainv_solver_apply_vect.f90
impl/solver/amg_d_id_solver_apply.f90
impl/solver/amg_s_base_solver_apply_vect.f90
impl/solver/amg_s_base_solver_clone.f90
impl/solver/amg_c_base_ainv_update_a.f90
impl/solver/amg_s_id_solver_clone.f90
impl/solver/amg_s_invk_solver_clone_settings.f90
impl/solver/amg_z_ainv_solver_bld.f90
impl/solver/amg_z_diag_solver_cnv.f90
impl/solver/amg_d_mumps_solver_bld.F90
impl/solver/amg_d_jac_solver_clear_data.f90
impl/solver/amg_c_jac_solver_clone_settings.f90
impl/solver/amg_z_gs_solver_clear_data.f90
impl/solver/amg_c_ainv_solver_cseti.f90
impl/solver/amg_z_base_solver_cnv.f90
impl/solver/amg_s_bwgs_solver_bld.f90
impl/solver/amg_s_id_solver_apply_vect.f90
impl/solver/amg_z_jac_solver_clone.f90
impl/solver/amg_z_ainv_solver_check.f90
impl/solver/amg_d_ilu_solver_clear_data.f90
impl/solver/amg_s_invk_solver_cseti.f90
impl/solver/amg_s_ainv_solver_csetc.f90
impl/solver/amg_z_base_ainv_solver_apply.f90
impl/solver/amg_c_gs_solver_clone.f90
impl/solver/amg_d_base_ainv_solver_apply.f90
# impl/solver/amg_d_ainv_solver_setr.f90
impl/solver/amg_d_invt_solver_clone.f90
impl/solver/amg_d_gs_solver_apply_vect.f90
impl/solver/amg_s_base_solver_dmp.f90
impl/solver/amg_d_ainv_solver_descr.f90
impl/solver/amg_d_jac_solver_clone_settings.f90
impl/solver/amg_z_base_solver_check.f90
impl/solver/amg_z_diag_solver_clone.f90
impl/solver/amg_s_invk_solver_clone.f90
# impl/solver/amg_d_ainv_solver_setc.f90
impl/solver/amg_d_gs_solver_clear_data.f90
impl/solver/amg_c_invt_solver_bld.f90
impl/solver/amg_s_jac_solver_clear_data.f90
impl/solver/amg_d_jac_solver_dmp.f90
impl/solver/amg_c_base_solver_dmp.f90
impl/solver/amg_s_diag_solver_dmp.f90
impl/solver/amg_d_invt_solver_check.f90
impl/solver/amg_c_ilu_solver_clear_data.f90
impl/solver/amg_z_invt_solver_descr.f90
impl/solver/amg_d_diag_solver_clone.f90
impl/solver/amg_s_jac_solver_bld.f90
impl/solver/amg_s_mumps_solver_apply.F90
impl/solver/amg_z_jac_solver_clone_settings.f90
# impl/solver/amg_d_invt_solver_seti.f90
impl/solver/amg_s_base_ainv_solver_apply_vect.f90
impl/solver/amg_z_diag_solver_apply.f90
impl/solver/amg_s_base_solver_free.f90
impl/solver/amg_d_ainv_solver_clone.f90
impl/solver/amg_s_krm_solver_impl.f90
# impl/solver/amg_d_ainv_solver_seti.f90
impl/solver/amg_z_ainv_solver_clone.f90
impl/solver/amg_d_base_ainv_solver_free.f90
# impl/solver/amg_c_invk_solver_seti.f90
impl/solver/amg_s_ilu_solver_dmp.f90
impl/solver/amg_z_base_solver_apply.f90
impl/solver/amg_d_ilu_solver_apply_vect.f90
impl/solver/amg_z_jac_solver_dmp.f90
impl/solver/amg_c_base_ainv_solver_cnv.f90
impl/solver/amg_s_gs_solver_cnv.f90
impl/solver/amg_s_id_solver_apply.f90
impl/solver/amg_d_jac_solver_apply_vect.f90
impl/solver/amg_s_base_solver_bld.f90
impl/solver/amg_z_base_solver_csetc.f90
impl/solver/amg_d_gs_solver_cnv.f90
impl/solver/amg_d_bwgs_solver_apply.f90
impl/solver/amg_c_diag_solver_dmp.f90
impl/solver/amg_d_ilu_solver_dmp.f90
impl/solver/amg_s_base_solver_check.f90
impl/solver/amg_c_invk_solver_clone.f90
impl/solver/amg_d_invk_solver_check.f90
impl/solver/amg_z_ilu_solver_clone.f90
impl/solver/amg_d_base_solver_cseti.f90
impl/solver/amg_c_base_solver_bld.f90
impl/solver/amg_z_jac_solver_apply_vect.f90
impl/solver/amg_z_id_solver_apply.f90
impl/solver/amg_d_base_solver_bld.f90
# impl/solver/amg_s_ainv_solver_seti.f90
impl/solver/amg_z_jac_solver_bld.f90
impl/solver/amg_z_base_solver_apply_vect.f90
impl/solver/amg_d_base_solver_clone.f90
impl/solver/amg_d_ainv_solver_csetr.f90
impl/solver/amg_s_invt_solver_cseti.f90
impl/solver/amg_c_id_solver_apply_vect.f90
impl/solver/amg_s_mumps_solver_apply_vect.F90
impl/solver/amg_z_ilu_solver_apply.f90
impl/solver/amg_c_diag_solver_apply_vect.f90
impl/solver/amg_s_gs_solver_dmp.f90
impl/solver/amg_z_base_ainv_solver_dmp.f90
impl/solver/amg_c_diag_solver_cnv.f90
# impl/solver/amg_z_invt_solver_setr.f90
impl/solver/amg_z_diag_solver_apply_vect.f90
impl/solver/amg_d_ainv_solver_cseti.f90
impl/solver/amg_z_ilu_solver_clear_data.f90
impl/solver/amg_d_base_solver_csetc.f90
impl/solver/amg_c_invk_solver_descr.f90
impl/solver/amg_d_invt_solver_csetr.f90
impl/solver/amg_d_invt_solver_cseti.f90
impl/solver/amg_z_invk_solver_bld.f90
impl/solver/amg_s_jac_solver_clone.f90
impl/solver/amg_d_bwgs_solver_bld.f90
impl/solver/amg_z_diag_solver_bld.f90
impl/solver/amg_s_l1_jac_solver_bld.f90
impl/solver/amg_s_invt_solver_descr.f90
impl/solver/amg_s_ilu_solver_bld.f90
impl/solver/amg_c_gs_solver_clone_settings.f90
impl/solver/amg_c_jac_solver_bld.f90
impl/solver/amg_d_gs_solver_clone_settings.f90
impl/solver/amg_d_base_solver_descr.f90
impl/solver/amg_d_base_solver_dmp.f90
impl/solver/amg_c_ainv_solver_bld.f90
impl/solver/amg_s_invt_solver_check.f90
impl/solver/amg_z_gs_solver_apply_vect.f90
impl/solver/amg_z_ainv_solver_descr.f90
# impl/solver/amg_c_invt_solver_seti.f90
impl/solver/amg_c_base_solver_apply.f90
impl/solver/amg_z_gs_solver_dmp.f90
impl/solver/amg_d_ainv_solver_clone_settings.f90
impl/solver/amg_c_id_solver_apply.f90
impl/solver/amg_z_base_solver_clone.f90
impl/solver/amg_s_invk_solver_check.f90
impl/solver/amg_c_gs_solver_bld.f90
impl/solver/amg_s_ilu_solver_cnv.f90
impl/solver/amg_z_ainv_solver_csetc.f90
impl/solver/amg_s_ainv_solver_clone_settings.f90
impl/solver/amg_c_base_ainv_solver_apply_vect.f90
impl/solver/amg_s_diag_solver_apply.f90
impl/solver/amg_s_base_ainv_update_a.f90
impl/solver/amg_c_base_solver_csetc.f90
impl/solver/amg_c_jac_solver_clone.f90
impl/solver/amg_c_base_solver_descr.f90
impl/solver/amg_c_invt_solver_clone.f90
impl/solver/amg_c_ilu_solver_bld.f90
impl/solver/amg_d_base_ainv_solver_apply_vect.f90
impl/solver/amg_d_base_solver_apply_vect.f90
impl/solver/amg_z_invt_solver_check.f90
impl/solver/amg_c_base_solver_cseti.f90
impl/solver/amg_s_jac_solver_dmp.f90
# impl/solver/amg_s_invk_solver_seti.f90
impl/solver/amg_s_ainv_solver_check.f90
impl/solver/amg_d_base_solver_clear_data.f90
impl/solver/amg_z_gs_solver_clone_settings.f90
impl/solver/amg_c_invk_solver_check.f90
impl/solver/amg_s_base_solver_cseti.f90
impl/solver/amg_z_base_ainv_solver_free.f90
impl/solver/amg_z_invk_solver_clone_settings.f90
impl/solver/amg_c_base_ainv_solver_dmp.f90
impl/solver/amg_s_gs_solver_clear_data.f90
impl/solver/amg_s_base_ainv_solver_apply.f90
impl/solver/amg_c_base_solver_apply_vect.f90
impl/solver/amg_d_diag_solver_cnv.f90
impl/solver/amg_d_id_solver_apply_vect.f90
impl/solver/amg_z_base_solver_bld.f90
impl/solver/amg_z_base_solver_dmp.f90
impl/solver/amg_d_invt_solver_clone_settings.f90
impl/solver/amg_c_diag_solver_clone.f90
impl/solver/amg_z_gs_solver_apply.f90
impl/solver/amg_c_invt_solver_clone_settings.f90
impl/solver/amg_z_base_solver_free.f90
impl/solver/amg_d_diag_solver_clear_data.f90
impl/solver/amg_d_ilu_solver_clone_settings.f90
# impl/solver/amg_z_invt_solver_seti.f90
# impl/solver/amg_z_ainv_solver_seti.f90
impl/solver/amg_c_diag_solver_apply.f90
impl/solver/amg_d_base_ainv_solver_dmp.f90
impl/solver/amg_c_invt_solver_csetr.f90
# impl/solver/amg_c_invt_solver_setr.f90
impl/solver/amg_c_jac_solver_clear_data.f90
impl/solver/amg_c_invk_solver_bld.f90
impl/solver/amg_c_ainv_solver_csetc.f90
impl/solver/amg_s_ainv_solver_cseti.f90
impl/solver/amg_z_base_solver_clear_data.f90
impl/solver/amg_z_invk_solver_check.f90
impl/solver/amg_c_diag_solver_bld.f90
impl/solver/amg_d_invk_solver_clone_settings.f90
impl/solver/amg_s_ainv_solver_clone.f90
impl/solver/amg_s_diag_solver_clear_data.f90
impl/solver/amg_d_gs_solver_clone.f90
impl/solver/amg_s_base_solver_csetr.f90
impl/solver/amg_c_ilu_solver_dmp.f90
impl/solver/amg_c_base_solver_cnv.f90
# impl/solver/amg_z_ainv_solver_setc.f90
impl/solver/amg_z_jac_solver_apply.f90
impl/solver/amg_s_ainv_solver_descr.f90
impl/solver/amg_z_base_ainv_solver_cnv.f90
impl/solver/amg_c_ilu_solver_apply.f90
impl/solver/amg_c_ilu_solver_cnv.f90
impl/solver/amg_z_bwgs_solver_bld.f90
impl/solver/amg_c_base_ainv_solver_free.f90
impl/solver/amg_s_base_solver_clone_settings.f90
impl/solver/amg_z_invt_solver_bld.f90
impl/solver/amg_s_base_ainv_solver_free.f90
impl/solver/amg_s_base_solver_clear_data.f90
impl/solver/amg_s_invt_solver_csetr.f90
impl/solver/amg_d_diag_solver_apply_vect.f90
impl/solver/amg_s_diag_solver_bld.f90
impl/solver/amg_s_diag_solver_cnv.f90
impl/solver/amg_d_diag_solver_apply.f90
impl/solver/amg_d_invk_solver_descr.f90
impl/solver/amg_z_mumps_solver_apply.F90
impl/solver/amg_s_base_solver_descr.f90
impl/solver/amg_c_jac_solver_apply_vect.f90
impl/solver/amg_s_base_ainv_solver_dmp.f90
impl/solver/amg_z_krm_solver_impl.f90
impl/solver/amg_z_invt_solver_csetr.f90
impl/solver/amg_c_ainv_solver_check.f90
# impl/solver/amg_s_invt_solver_seti.f90
impl/solver/amg_z_ainv_solver_cseti.f90
impl/solver/amg_z_invk_solver_clone.f90
impl/solver/amg_s_base_solver_csetc.f90
impl/solver/amg_z_bwgs_solver_apply_vect.f90
impl/solver/amg_c_bwgs_solver_apply.f90
impl/solver/amg_c_base_solver_csetr.f90
impl/solver/amg_c_invk_solver_cseti.f90
impl/solver/amg_d_krm_solver_impl.f90
impl/solver/amg_s_invk_solver_bld.f90
impl/solver/amg_c_mumps_solver_apply.F90
impl/solver/amg_z_jac_solver_cnv.f90
# impl/solver/amg_s_ainv_solver_setr.f90
impl/solver/amg_d_gs_solver_bld.f90
impl/solver/amg_c_ilu_solver_clone_settings.f90
impl/solver/amg_z_base_solver_clone_settings.f90
impl/solver/amg_d_ilu_solver_clone.f90
impl/solver/amg_c_ilu_solver_clone.f90
impl/solver/amg_d_ainv_solver_bld.f90
impl/solver/amg_c_gs_solver_apply.f90
impl/solver/amg_z_mumps_solver_apply_vect.F90
impl/solver/amg_c_ainv_solver_clone.f90
impl/solver/amg_c_base_solver_clear_data.f90
impl/solver/amg_z_diag_solver_dmp.f90
impl/solver/amg_z_id_solver_apply_vect.f90
impl/solver/amg_d_ilu_solver_bld.f90
impl/solver/amg_s_base_solver_apply.f90
impl/solver/amg_s_ainv_solver_csetr.f90
impl/solver/amg_z_ilu_solver_cnv.f90
impl/solver/amg_s_invk_solver_descr.f90
impl/solver/amg_d_jac_solver_bld.f90
impl/solver/amg_z_invk_solver_cseti.f90
impl/solver/amg_z_id_solver_clone.f90
impl/solver/amg_d_id_solver_clone.f90
impl/solver/amg_z_diag_solver_clear_data.f90
impl/solver/amg_s_gs_solver_bld.f90
impl/solver/amg_s_bwgs_solver_apply.f90
impl/solver/amg_s_gs_solver_clone.f90
impl/solver/amg_s_jac_solver_apply.f90
impl/solver/amg_z_ilu_solver_clone_settings.f90
impl/solver/amg_c_mumps_solver_bld.F90
impl/solver/amg_d_mumps_solver_apply.F90
# impl/solver/amg_s_ainv_solver_setc.f90
impl/solver/amg_d_base_solver_cnv.f90
impl/solver/amg_s_ilu_solver_clear_data.f90
impl/solver/amg_d_bwgs_solver_apply_vect.f90
impl/solver/amg_s_jac_solver_apply_vect.f90
impl/solver/amg_c_invk_solver_clone_settings.f90
impl/solver/amg_c_base_solver_clone_settings.f90
impl/solver/amg_z_gs_solver_cnv.f90
impl/solver/amg_s_invt_solver_clone.f90
# impl/solver/amg_z_invk_solver_seti.f90
impl/solver/amg_c_ainv_solver_csetr.f90
impl/solver/amg_c_jac_solver_apply.f90
impl/solver/amg_c_gs_solver_dmp.f90
impl/solver/amg_z_ilu_solver_bld.f90
impl/solver/amg_c_invt_solver_descr.f90
impl/solver/amg_z_invt_solver_clone.f90
impl/solver/amg_d_base_ainv_update_a.f90
impl/solver/amg_c_base_solver_clone.f90
impl/solver/amg_s_diag_solver_clone.f90
impl/solver/amg_d_invt_solver_bld.f90
# impl/solver/amg_c_ainv_solver_setc.f90
impl/solver/amg_d_gs_solver_dmp.f90
impl/solver/amg_s_gs_solver_apply.f90
impl/solver/amg_d_jac_solver_clone.f90
impl/solver/amg_z_jac_solver_clear_data.f90
impl/solver/amg_c_invt_solver_cseti.f90
impl/solver/amg_d_ilu_solver_apply.f90
# impl/solver/amg_c_ainv_solver_setr.f90
impl/solver/amg_c_gs_solver_cnv.f90
impl/solver/amg_c_diag_solver_clear_data.f90
impl/solver/amg_c_base_solver_check.f90
impl/solver/amg_c_base_solver_free.f90
impl/solver/amg_z_invt_solver_cseti.f90
impl/solver/amg_d_base_solver_check.f90
impl/solver/amg_d_invk_solver_clone.f90
impl/solver/amg_c_krm_solver_impl.f90
impl/solver/amg_d_base_ainv_solver_cnv.f90
impl/solver/amg_d_invk_solver_cseti.f90
impl/solver/amg_z_mumps_solver_bld.F90
impl/solver/amg_z_gs_solver_bld.f90
# impl/solver/amg_z_ainv_solver_setr.f90
impl/solver/amg_s_gs_solver_apply_vect.f90
impl/solver/amg_s_jac_solver_clone_settings.f90
impl/solver/amg_z_gs_solver_clone.f90
impl/solver/amg_c_gs_solver_apply_vect.f90
impl/solver/amg_d_base_solver_csetr.f90
impl/solver/amg_s_ainv_solver_bld.f90
impl/solver/amg_z_l1_jac_solver_bld.f90
impl/solver/amg_z_base_ainv_update_a.f90
impl/solver/amg_z_ainv_solver_csetr.f90
impl/solver/amg_s_ilu_solver_apply_vect.f90
# impl/solver/amg_s_invt_solver_setr.f90
# impl/solver/amg_d_invt_solver_setr.f90
impl/solver/amg_d_invk_solver_bld.f90
impl/solver/amg_s_jac_solver_cnv.f90
impl/solver/amg_z_bwgs_solver_apply.f90
impl/solver/amg_s_bwgs_solver_apply_vect.f90
# impl/solver/amg_d_invk_solver_seti.f90
impl/solver/amg_d_ilu_solver_cnv.f90
impl/solver/amg_s_mumps_solver_bld.F90
impl/solver/amg_s_gs_solver_clone_settings.f90
impl/solver/amg_c_jac_solver_dmp.f90
impl/solver/amg_d_jac_solver_cnv.f90
impl/solver/amg_c_ilu_solver_apply_vect.f90
impl/solver/amg_c_mumps_solver_apply_vect.F90
impl/solver/amg_z_ilu_solver_apply_vect.f90
impl/solver/amg_s_ilu_solver_clone_settings.f90
impl/solver/amg_c_ainv_solver_clone_settings.f90
# impl/solver/amg_c_ainv_solver_seti.f90
impl/solver/amg_s_ilu_solver_clone.f90
impl/solver/amg_d_diag_solver_bld.f90
impl/solver/amg_c_l1_jac_solver_bld.f90
impl/solver/amg_c_bwgs_solver_apply_vect.f90
impl/solver/amg_c_jac_solver_cnv.f90
impl/solver/amg_c_id_solver_clone.f90
impl/solver/amg_d_gs_solver_apply.f90
impl/solver/amg_z_invk_solver_descr.f90
impl/solver/amg_s_diag_solver_apply_vect.f90
impl/solver/amg_s_base_solver_cnv.f90
impl/solver/amg_d_base_solver_clone_settings.f90
impl/solver/amg_s_invt_solver_clone_settings.f90
impl/solver/amg_d_ainv_solver_csetc.f90
impl/solver/amg_d_invt_solver_descr.f90
impl/solver/amg_d_base_solver_free.f90
impl/solver/amg_c_base_ainv_solver_apply.f90
impl/solver/amg_s_base_ainv_solver_cnv.f90
impl/solver/amg_c_ainv_solver_descr.f90
impl/amg_sfile_prec_descr.f90
impl/amg_zprecinit.F90
impl/amg_dprecbld.f90
impl/amg_sprecaply.f90
impl/amg_cprecbld.f90
impl/amg_cfile_prec_descr.f90
impl/amg_s_hierarchy_bld.F90
impl/amg_dfile_prec_descr.f90
impl/amg_ccprecset.F90
impl/amg_d_hierarchy_bld.F90
impl/amg_c_hierarchy_bld.F90
impl/smoother/amg_d_base_smoother_clone_settings.f90
impl/smoother/amg_d_as_smoother_check.f90
impl/smoother/amg_c_l1_jac_smoother_clone.f90
impl/smoother/amg_z_l1_jac_smoother_bld.f90
impl/smoother/amg_s_poly_smoother_clear_data.f90
impl/smoother/amg_s_poly_smoother_apply_vect.f90
impl/smoother/amg_z_jac_smoother_clone_settings.f90
impl/smoother/amg_s_poly_smoother_csetc.f90
impl/smoother/amg_s_as_smoother_prol_a.f90
impl/smoother/amg_s_base_smoother_csetc.f90
impl/smoother/amg_s_as_smoother_apply.f90
impl/smoother/amg_z_base_smoother_csetr.f90
impl/smoother/amg_c_jac_smoother_apply.f90
impl/smoother/amg_s_base_smoother_clone.f90
impl/smoother/amg_d_jac_smoother_dmp.f90
impl/smoother/amg_z_base_smoother_cnv.f90
impl/smoother/amg_s_jac_smoother_apply.f90
impl/smoother/amg_z_jac_smoother_bld.f90
impl/smoother/amg_c_as_smoother_clone.f90
impl/smoother/amg_d_as_smoother_apply_vect.f90
impl/smoother/amg_d_poly_smoother_descr.f90
impl/smoother/amg_s_as_smoother_csetc.f90
impl/smoother/amg_z_base_smoother_cseti.f90
impl/smoother/amg_s_base_smoother_cseti.f90
impl/smoother/amg_s_base_smoother_free.f90
impl/smoother/amg_d_jac_smoother_clone.f90
impl/smoother/amg_d_jac_smoother_apply_vect.f90
impl/smoother/amg_c_as_smoother_clear_data.f90
impl/smoother/amg_s_poly_smoother_descr.f90
impl/smoother/amg_z_as_smoother_cseti.f90
impl/smoother/amg_s_as_smoother_apply_vect.f90
impl/smoother/amg_c_jac_smoother_csetr.f90
impl/smoother/amg_d_base_smoother_free.f90
impl/smoother/amg_z_as_smoother_bld.f90
impl/smoother/amg_s_base_smoother_clear_data.f90
impl/smoother/amg_c_jac_smoother_bld.f90
impl/smoother/amg_d_as_smoother_restr_v.f90
impl/smoother/amg_c_as_smoother_check.f90
impl/smoother/amg_d_poly_smoother_cseti.f90
impl/smoother/amg_d_as_smoother_clone.f90
impl/smoother/amg_z_as_smoother_clear_data.f90
impl/smoother/amg_d_as_smoother_free.f90
impl/smoother/amg_s_as_smoother_cnv.f90
impl/smoother/amg_s_base_smoother_dmp.f90
impl/smoother/amg_d_l1_jac_smoother_descr.f90
impl/smoother/amg_s_poly_smoother_cnv.f90
impl/smoother/amg_d_jac_smoother_csetr.f90
impl/smoother/amg_d_base_smoother_apply.f90
impl/smoother/amg_s_as_smoother_cseti.f90
impl/smoother/amg_s_base_smoother_apply_vect.f90
impl/smoother/amg_c_base_smoother_cseti.f90
impl/smoother/amg_c_as_smoother_cnv.f90
impl/smoother/amg_z_jac_smoother_cnv.f90
impl/smoother/amg_s_poly_smoother_bld.f90
impl/smoother/amg_d_jac_smoother_cseti.f90
impl/smoother/amg_s_as_smoother_prol_v.f90
impl/smoother/amg_c_as_smoother_restr_a.f90
impl/smoother/amg_d_base_smoother_bld.f90
impl/smoother/amg_c_jac_smoother_clone.f90
impl/smoother/amg_d_jac_smoother_bld.f90
impl/smoother/amg_z_jac_smoother_apply_vect.f90
impl/smoother/amg_c_as_smoother_prol_v.f90
impl/smoother/amg_z_jac_smoother_csetc.f90
impl/smoother/amg_z_as_smoother_prol_v.f90
impl/smoother/amg_d_base_smoother_cnv.f90
impl/smoother/amg_c_l1_jac_smoother_bld.f90
impl/smoother/amg_z_as_smoother_apply_vect.f90
impl/smoother/amg_s_as_smoother_restr_v.f90
impl/smoother/amg_d_l1_jac_smoother_bld.f90
impl/smoother/amg_s_jac_smoother_bld.f90
impl/smoother/amg_s_poly_smoother_clone_settings.f90
impl/smoother/amg_d_base_smoother_check.f90
impl/smoother/amg_z_base_smoother_bld.f90
impl/smoother/amg_s_l1_jac_smoother_clone.f90
impl/smoother/amg_c_jac_smoother_clone_settings.f90
impl/smoother/amg_s_poly_smoother_dmp.f90
impl/smoother/amg_c_base_smoother_csetr.f90
impl/smoother/amg_d_poly_smoother_clone_settings.f90
impl/smoother/amg_z_as_smoother_clone_settings.f90
impl/smoother/amg_z_jac_smoother_csetr.f90
impl/smoother/amg_d_jac_smoother_csetc.f90
impl/smoother/amg_z_base_smoother_dmp.f90
impl/smoother/amg_s_jac_smoother_csetr.f90
impl/smoother/amg_s_base_smoother_bld.f90
impl/smoother/amg_z_jac_smoother_descr.f90
impl/smoother/amg_z_jac_smoother_cseti.f90
impl/smoother/amg_d_as_smoother_dmp.f90
impl/smoother/amg_d_jac_smoother_apply.f90
impl/smoother/amg_c_jac_smoother_dmp.f90
impl/smoother/amg_z_as_smoother_apply.f90
impl/smoother/amg_z_as_smoother_check.f90
impl/smoother/amg_z_jac_smoother_clear_data.f90
impl/smoother/amg_s_base_smoother_descr.f90
impl/smoother/amg_s_jac_smoother_clone.f90
impl/smoother/amg_z_jac_smoother_clone.f90
impl/smoother/amg_c_as_smoother_clone_settings.f90
impl/smoother/amg_c_base_smoother_check.f90
impl/smoother/amg_d_poly_smoother_apply_vect.f90
impl/smoother/amg_s_l1_jac_smoother_bld.f90
impl/smoother/amg_c_as_smoother_apply_vect.f90
impl/smoother/amg_z_as_smoother_cnv.f90
impl/smoother/amg_z_as_smoother_csetc.f90
impl/smoother/amg_d_as_smoother_csetc.f90
impl/smoother/amg_d_jac_smoother_cnv.f90
impl/smoother/amg_c_as_smoother_csetc.f90
impl/smoother/amg_z_base_smoother_clone_settings.f90
impl/smoother/amg_s_as_smoother_free.f90
impl/smoother/amg_z_base_smoother_free.f90
impl/smoother/amg_c_base_smoother_apply.f90
impl/smoother/amg_z_l1_jac_smoother_descr.f90
impl/smoother/amg_s_as_smoother_clone_settings.f90
impl/smoother/amg_d_base_smoother_csetr.f90
impl/smoother/amg_c_jac_smoother_clear_data.f90
impl/smoother/amg_d_poly_smoother_bld.f90
impl/smoother/amg_z_base_smoother_csetc.f90
impl/smoother/amg_z_base_smoother_clone.f90
impl/smoother/amg_s_jac_smoother_apply_vect.f90
impl/smoother/amg_z_base_smoother_clear_data.f90
impl/smoother/amg_c_base_smoother_clone_settings.f90
impl/smoother/amg_d_base_smoother_clone.f90
impl/smoother/amg_d_base_smoother_cseti.f90
impl/smoother/amg_z_l1_jac_smoother_clone.f90
impl/smoother/amg_s_l1_jac_smoother_descr.f90
impl/smoother/amg_c_jac_smoother_descr.f90
impl/smoother/amg_z_base_smoother_check.f90
impl/smoother/amg_d_jac_smoother_clear_data.f90
impl/smoother/amg_d_as_smoother_prol_a.f90
impl/smoother/amg_c_as_smoother_apply.f90
impl/smoother/amg_c_base_smoother_cnv.f90
impl/smoother/amg_c_jac_smoother_cnv.f90
impl/smoother/amg_c_base_smoother_csetc.f90
impl/smoother/amg_d_base_smoother_csetc.f90
impl/smoother/amg_d_poly_smoother_csetr.f90
impl/smoother/amg_c_jac_smoother_cseti.f90
impl/smoother/amg_s_base_smoother_cnv.f90
impl/smoother/amg_s_poly_smoother_csetr.f90
impl/smoother/amg_s_base_smoother_clone_settings.f90
impl/smoother/amg_s_as_smoother_restr_a.f90
impl/smoother/amg_d_base_smoother_dmp.f90
impl/smoother/amg_d_jac_smoother_descr.f90
impl/smoother/amg_c_base_smoother_free.f90
impl/smoother/amg_c_as_smoother_free.f90
impl/smoother/amg_s_jac_smoother_clear_data.f90
impl/smoother/amg_s_jac_smoother_cseti.f90
impl/smoother/amg_d_poly_smoother_clone.f90
impl/smoother/amg_s_jac_smoother_csetc.f90
impl/smoother/amg_s_as_smoother_dmp.f90
impl/smoother/amg_s_base_smoother_apply.f90
impl/smoother/amg_s_as_smoother_clone.f90
impl/smoother/amg_c_l1_jac_smoother_descr.f90
impl/smoother/amg_s_jac_smoother_cnv.f90
impl/smoother/amg_z_as_smoother_free.f90
impl/smoother/amg_s_poly_smoother_clone.f90
impl/smoother/amg_s_as_smoother_clear_data.f90
impl/smoother/amg_s_jac_smoother_dmp.f90
impl/smoother/amg_c_base_smoother_clone.f90
impl/smoother/amg_d_poly_smoother_csetc.f90
impl/smoother/amg_d_as_smoother_cseti.f90
impl/smoother/amg_z_base_smoother_descr.f90
impl/smoother/amg_d_as_smoother_restr_a.f90
impl/smoother/amg_s_base_smoother_check.f90
impl/smoother/amg_c_as_smoother_restr_v.f90
impl/smoother/amg_d_poly_smoother_cnv.f90
impl/smoother/amg_c_jac_smoother_csetc.f90
impl/smoother/amg_z_jac_smoother_dmp.f90
impl/smoother/amg_z_base_smoother_apply.f90
impl/smoother/amg_s_base_smoother_csetr.f90
impl/smoother/amg_d_as_smoother_apply.f90
impl/smoother/amg_c_as_smoother_prol_a.f90
impl/smoother/amg_d_poly_smoother_clear_data.f90
impl/smoother/amg_c_base_smoother_descr.f90
impl/smoother/amg_d_as_smoother_bld.f90
impl/smoother/amg_c_as_smoother_bld.f90
impl/smoother/amg_c_as_smoother_cseti.f90
impl/smoother/amg_s_as_smoother_bld.f90
impl/smoother/amg_z_as_smoother_restr_a.f90
impl/smoother/amg_d_as_smoother_clear_data.f90
impl/smoother/amg_d_l1_jac_smoother_clone.f90
impl/smoother/amg_c_base_smoother_dmp.f90
impl/smoother/amg_d_base_smoother_descr.f90
impl/smoother/amg_c_base_smoother_apply_vect.f90
impl/smoother/amg_d_base_smoother_apply_vect.f90
impl/smoother/amg_c_base_smoother_clear_data.f90
impl/smoother/amg_d_poly_smoother_dmp.f90
impl/smoother/amg_s_poly_smoother_cseti.f90
impl/smoother/amg_s_as_smoother_check.f90
impl/smoother/amg_s_jac_smoother_descr.f90
impl/smoother/amg_d_jac_smoother_clone_settings.f90
impl/smoother/amg_d_as_smoother_prol_v.f90
impl/smoother/amg_z_jac_smoother_apply.f90
impl/smoother/amg_d_as_smoother_cnv.f90
impl/smoother/amg_c_jac_smoother_apply_vect.f90
impl/smoother/amg_c_as_smoother_dmp.f90
impl/smoother/amg_c_base_smoother_bld.f90
impl/smoother/amg_d_as_smoother_clone_settings.f90
impl/smoother/amg_d_base_smoother_clear_data.f90
impl/smoother/amg_s_jac_smoother_clone_settings.f90
impl/smoother/amg_z_as_smoother_dmp.f90
impl/smoother/amg_z_as_smoother_clone.f90
impl/smoother/amg_z_as_smoother_restr_v.f90
impl/smoother/amg_z_as_smoother_prol_a.f90
impl/smoother/amg_z_base_smoother_apply_vect.f90
impl/amg_d_smoothers_bld.f90
impl/amg_zprecset.F90
impl/amg_d_hierarchy_rebld.f90
impl/amg_d_extprol_bld.F90
impl/amg_dprecset.F90
impl/amg_scprecset.F90
impl/amg_sprecset.F90
impl/amg_dmlprec_bld.f90
impl/amg_zmlprec_aply.f90
impl/aggregator/amg_d_dec_aggregator_tprol.f90
impl/aggregator/amg_s_parmatch_aggregator_mat_asb.F90
impl/aggregator/amg_s_parmatch_aggregator_tprol.F90
impl/aggregator/amg_z_dec_aggregator_tprol.f90
impl/aggregator/amg_saggrmat_smth_bld.f90
impl/aggregator/amg_s_soc2_map_bld.F90
impl/aggregator/amg_s_parmatch_spmm_bld_inner.F90
impl/aggregator/amg_caggrmat_minnrg_bld.f90
impl/aggregator/amg_d_soc2_map_bld.F90
impl/aggregator/amg_s_dec_aggregator_tprol.f90
impl/aggregator/amg_s_parmatch_aggregator_inner_mat_asb.F90
impl/aggregator/amg_s_dec_aggregator_mat_bld.f90
impl/aggregator/amg_c_dec_aggregator_mat_asb.f90
impl/aggregator/amg_s_rap.f90
impl/aggregator/amg_s_map_to_tprol.f90
impl/aggregator/amg_d_parmatch_aggregator_tprol.F90
impl/aggregator/amg_saggrmat_nosmth_bld.f90
impl/aggregator/amg_c_soc1_map_bld.F90
impl/aggregator/amg_d_parmatch_aggregator_mat_asb.F90
impl/aggregator/amg_zaggrmat_smth_bld.f90
impl/aggregator/amg_d_parmatch_smth_bld.F90
impl/aggregator/amg_caggrmat_nosmth_bld.f90
impl/aggregator/amg_c_map_to_tprol.f90
impl/aggregator/amg_d_rap.f90
impl/aggregator/amg_d_map_to_tprol.f90
impl/aggregator/amg_daggrmat_minnrg_bld.f90
impl/aggregator/amg_d_dec_aggregator_mat_asb.f90
impl/aggregator/amg_z_dec_aggregator_mat_bld.f90
impl/aggregator/amg_d_parmatch_spmm_bld.F90
impl/aggregator/amg_d_parmatch_aggregator_mat_bld.F90
impl/aggregator/amg_d_ptap_bld.f90
impl/aggregator/amg_z_symdec_aggregator_tprol.f90
impl/aggregator/amg_s_symdec_aggregator_tprol.f90
impl/aggregator/amg_z_soc1_map_bld.F90
impl/aggregator/amg_d_parmatch_unsmth_bld.F90
impl/aggregator/amg_z_map_to_tprol.f90
impl/aggregator/amg_d_soc1_map_bld.F90
impl/aggregator/amg_d_parmatch_spmm_bld_ov.F90
impl/aggregator/amg_s_parmatch_aggregator_mat_bld.F90
impl/aggregator/amg_s_parmatch_unsmth_bld.F90
impl/aggregator/amg_d_parmatch_aggregator_inner_mat_asb.F90
impl/aggregator/amg_s_parmatch_spmm_bld.F90
impl/aggregator/amg_c_symdec_aggregator_tprol.f90
impl/aggregator/amg_zaggrmat_minnrg_bld.f90
impl/aggregator/amg_c_dec_aggregator_tprol.f90
impl/aggregator/amg_z_dec_aggregator_mat_asb.f90
impl/aggregator/amg_c_rap.f90
impl/aggregator/amg_s_parmatch_spmm_bld_ov.F90
impl/aggregator/amg_s_ptap_bld.f90
impl/aggregator/amg_s_soc1_map_bld.F90
impl/aggregator/amg_d_dec_aggregator_mat_bld.f90
impl/aggregator/amg_z_ptap_bld.f90
impl/aggregator/amg_daggrmat_smth_bld.f90
impl/aggregator/amg_z_soc2_map_bld.F90
impl/aggregator/amg_caggrmat_smth_bld.f90
impl/aggregator/amg_saggrmat_minnrg_bld.f90
impl/aggregator/amg_c_soc2_map_bld.F90
impl/aggregator/amg_s_dec_aggregator_mat_asb.f90
impl/aggregator/amg_z_rap.f90
impl/aggregator/amg_s_parmatch_smth_bld.F90
impl/aggregator/amg_c_dec_aggregator_mat_bld.f90
impl/aggregator/amg_daggrmat_nosmth_bld.f90
impl/aggregator/amg_d_symdec_aggregator_tprol.f90
impl/aggregator/amg_d_parmatch_spmm_bld_inner.F90
impl/aggregator/amg_c_ptap_bld.f90
impl/aggregator/amg_zaggrmat_nosmth_bld.f90
impl/amg_cmlprec_aply.f90
impl/amg_cmlprec_bld.f90
amg_d_invt_solver.f90
amg_c_id_solver.f90
amg_base_ainv_mod.F90
amg_d_matchboxp_mod.F90
amg_z_base_smoother_mod.f90
amg_s_invk_solver.f90
amg_c_base_solver_mod.f90
amg_s_ilu_solver.f90
amg_z_ilu_fact_mod.f90
amg_prec_mod.f90
amg_d_gs_solver.f90
amg_d_jac_smoother.f90
amg_z_symdec_aggregator_mod.f90
amg_s_gs_solver.f90
amg_ainv_mod.f90
amg_d_parmatch_aggregator_mod.F90
amg_z_as_smoother.f90
amg_c_inner_mod.f90
amg_d_poly_smoother.f90
amg_z_onelev_mod.f90
amg_z_diag_solver.f90
amg_c_symdec_aggregator_mod.f90
amg_c_prec_mod.f90
amg_d_sludist_solver.F90
amg_d_base_solver_mod.f90
amg_c_dec_aggregator_mod.f90
amg_c_ilu_fact_mod.f90
amg_s_onelev_mod.f90
amg_d_base_ainv_mod.f90
amg_d_invk_solver.f90
amg_z_invt_solver.f90
amg_z_prec_mod.f90
amg_s_prec_mod.f90
amg_d_mumps_solver.F90
amg_d_umf_solver.F90
# amg_d_hybrid_aggregator_mod.F90
amg_d_id_solver.f90
# amg_c_hybrid_aggregator_mod.F90
amg_z_base_ainv_mod.f90
amg_z_sludist_solver.F90
amg_d_ilu_solver.f90
amg_s_base_ainv_mod.f90
amg_c_invt_solver.f90
# amg_s_hybrid_aggregator_mod.F90
amg_d_prec_type.f90
amg_d_base_smoother_mod.f90
amg_c_base_ainv_mod.f90
amg_s_prec_type.f90
amg_s_diag_solver.f90
amg_z_base_aggregator_mod.f90
amg_z_dec_aggregator_mod.f90
amg_prec_type.f90
amg_s_invt_solver.f90
amg_s_base_smoother_mod.f90
amg_c_ainv_solver.F90
amg_d_dec_aggregator_mod.f90
amg_s_slu_solver.F90
amg_d_diag_solver.f90
amg_z_id_solver.f90
amg_c_slu_solver.F90
amg_s_jac_smoother.f90
amg_s_dec_aggregator_mod.f90
amg_d_inner_mod.f90
amg_s_mumps_solver.F90
amg_d_jac_solver.f90
amg_s_krm_solver.f90
amg_s_as_smoother.f90
amg_d_onelev_mod.f90
amg_z_jac_solver.f90
amg_d_symdec_aggregator_mod.f90
amg_c_onelev_mod.f90
amg_s_parmatch_aggregator_mod.F90
amg_c_ilu_solver.f90
amg_d_poly_coeff_mod.f90
amg_s_jac_solver.f90
amg_base_prec_type.F90
amg_s_base_aggregator_mod.f90
amg_z_ainv_solver.F90
amg_d_prec_mod.f90
amg_c_prec_type.f90
amg_d_as_smoother.f90
amg_z_ilu_solver.f90
amg_c_base_aggregator_mod.f90
amg_s_id_solver.f90
amg_c_krm_solver.f90
amg_z_jac_smoother.f90
amg_c_as_smoother.f90
amg_z_invk_solver.f90
amg_d_krm_solver.f90
amg_c_invk_solver.f90
amg_c_mumps_solver.F90
amg_c_jac_solver.f90
amg_z_umf_solver.F90
amg_s_symdec_aggregator_mod.f90
amg_s_poly_smoother.f90
amg_s_inner_mod.f90
amg_s_ilu_fact_mod.f90
amg_z_mumps_solver.F90
amg_c_jac_smoother.f90
)
foreach(file IN LISTS AMG_amgprec_source_files)
list(APPEND amgprec_source_files ${CMAKE_CURRENT_LIST_DIR}/${file})
endforeach()
list(APPEND AMG_amgprec_source_C_files impl/amg_dslu_interface.c)
list(APPEND AMG_amgprec_source_C_files impl/amg_zslu_interface.c)
list(APPEND AMG_amgprec_source_C_files impl/amg_sslu_interface.c)
list(APPEND AMG_amgprec_source_C_files impl/amg_dumf_interface.c)
list(APPEND AMG_amgprec_source_C_files impl/amg_cslu_interface.c)
list(APPEND AMG_amgprec_source_C_files impl/amg_dslud_interface.c)
list(APPEND AMG_amgprec_source_C_files impl/amg_zumf_interface.c)
list(APPEND AMG_amgprec_source_C_files impl/amg_zslud_interface.c)
set(AMG_amgprec_source_CPP_files
impl/aggregator/computeCandidateMate.cpp
impl/aggregator/processExposedVertex.cpp
impl/aggregator/processMatchedVertices.cpp
impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp
impl/aggregator/processCrossEdge.cpp
impl/aggregator/findOwnerOfGhost.cpp
impl/aggregator/MatchBoxPC.cpp
impl/aggregator/queueTransfer.cpp
impl/aggregator/clean.cpp
impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC.cpp
impl/aggregator/extractUChunk.cpp
impl/aggregator/processMatchedVerticesAndSendMessages.cpp
impl/aggregator/sendBundledMessages.cpp
impl/aggregator/initialize.cpp
impl/aggregator/isAlreadyMatched.cpp
impl/aggregator/processMessages.cpp
impl/aggregator/parallelComputeCandidateMateB.cpp
)
foreach(file IN LISTS AMG_amgprec_source_C_files)
list(APPEND amgprec_source_C_files ${CMAKE_CURRENT_LIST_DIR}/${file})
endforeach()
foreach(file IN LISTS AMG_amgprec_source_CPP_files)
list(APPEND amgprec_source_CPP_files ${CMAKE_CURRENT_LIST_DIR}/${file})
endforeach()
+8 -4
View File
@@ -621,9 +621,13 @@ contains
subroutine amg_warn_coarse_mat(val,expected)
integer(psb_ipk_) :: val, expected
integer(psb_mpk_) :: mval, mexp
if (val /= expected) then
mval = val
mexp = expected
write(0,*) 'Warning: resetting COARSE_MAT on an existing hierarchy from ',&
& amg_get_coarse_mat_name(val), ' to ',amg_get_coarse_mat_name(expected)
& amg_get_coarse_mat_name(mval), &
& ' to ',amg_get_coarse_mat_name(mexp)
end if
end subroutine amg_warn_coarse_mat
@@ -1207,7 +1211,7 @@ contains
implicit none
type(psb_ctxt_type), intent(in) :: ctxt
type(amg_ml_parms), intent(inout) :: dat
integer(psb_ipk_), intent(in), optional :: root
integer(psb_mpk_), intent(in), optional :: root
call psb_bcast(ctxt,dat%sweeps_pre,root)
call psb_bcast(ctxt,dat%sweeps_post,root)
@@ -1229,7 +1233,7 @@ contains
implicit none
type(psb_ctxt_type), intent(in) :: ctxt
type(amg_sml_parms), intent(inout) :: dat
integer(psb_ipk_), intent(in), optional :: root
integer(psb_mpk_), intent(in), optional :: root
call psb_bcast(ctxt,dat%amg_ml_parms,root)
call psb_bcast(ctxt,dat%aggr_omega_val,root)
@@ -1240,7 +1244,7 @@ contains
implicit none
type(psb_ctxt_type), intent(in) :: ctxt
type(amg_dml_parms), intent(inout) :: dat
integer(psb_ipk_), intent(in), optional :: root
integer(psb_mpk_), intent(in), optional :: root
call psb_bcast(ctxt,dat%amg_ml_parms,root)
call psb_bcast(ctxt,dat%aggr_omega_val,root)
+6 -5
View File
@@ -161,7 +161,7 @@ contains
logical, parameter :: dump=.false., debug=.false., dump_mate=.false., &
& debug_ilaggr=.false., debug_sync=.false., debug_mate=.false.
integer(psb_ipk_), save :: idx_bldmtc=-1, idx_phase1=-1, idx_phase2=-1, idx_phase3=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
integer, parameter :: ilaggr_neginit=-1, ilaggr_nonlocal=-2
ictxt = desc_a%get_ctxt()
@@ -624,7 +624,7 @@ contains
logical, parameter :: old_style=.false., sort_minp=.true.
character(len=40) :: name='build_matching', fname
integer(psb_ipk_), save :: idx_cmboxp=-1, idx_bldahat=-1, idx_phase2=-1, idx_phase3=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
ictxt = desc_a%get_ctxt()
call psb_info(ictxt,iam,np)
@@ -826,7 +826,7 @@ contains
character(len=80) :: aname
real(psb_dpk_), parameter :: eps=epsilon(1.d0)
integer(psb_ipk_), save :: idx_glbt=-1, idx_phase1=-1, idx_phase2=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
logical, parameter :: debug_symmetry = .false., check_size=.false.
logical, parameter :: unroll_logtrans=.false.
@@ -879,7 +879,7 @@ contains
nr = tcoo1%get_nrows()
nc = tcoo1%get_ncols()
nz = tcoo1%get_nzeros()
call tcoo2%allocate(nr,nc,int(1.25*nz))
call tcoo2%allocate(nr,nc,int(1.25*nz,psb_ipk_))
k2 = 0
!
! Build the entries of \^A for matching
@@ -1056,7 +1056,8 @@ contains
integer(psb_c_lpk_) :: ph1_card(*),ph2_card(*)
real(c_double) :: edgelocweight(:)
real(c_double) :: msgpercent(*)
integer(psb_ipk_) :: info, me, np
integer(psb_ipk_) :: info
integer(psb_mpk_) :: me, np
integer(psb_c_mpk_) :: icomm, mrank, mnp
logical, optional :: display_inp
!
+6 -5
View File
@@ -161,7 +161,7 @@ contains
logical, parameter :: dump=.false., debug=.false., dump_mate=.false., &
& debug_ilaggr=.false., debug_sync=.false., debug_mate=.false.
integer(psb_ipk_), save :: idx_bldmtc=-1, idx_phase1=-1, idx_phase2=-1, idx_phase3=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
integer, parameter :: ilaggr_neginit=-1, ilaggr_nonlocal=-2
ictxt = desc_a%get_ctxt()
@@ -624,7 +624,7 @@ contains
logical, parameter :: old_style=.false., sort_minp=.true.
character(len=40) :: name='build_matching', fname
integer(psb_ipk_), save :: idx_cmboxp=-1, idx_bldahat=-1, idx_phase2=-1, idx_phase3=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
ictxt = desc_a%get_ctxt()
call psb_info(ictxt,iam,np)
@@ -826,7 +826,7 @@ contains
character(len=80) :: aname
real(psb_spk_), parameter :: eps=epsilon(1.d0)
integer(psb_ipk_), save :: idx_glbt=-1, idx_phase1=-1, idx_phase2=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
logical, parameter :: debug_symmetry = .false., check_size=.false.
logical, parameter :: unroll_logtrans=.false.
@@ -879,7 +879,7 @@ contains
nr = tcoo1%get_nrows()
nc = tcoo1%get_ncols()
nz = tcoo1%get_nzeros()
call tcoo2%allocate(nr,nc,int(1.25*nz))
call tcoo2%allocate(nr,nc,int(1.25*nz,psb_ipk_))
k2 = 0
!
! Build the entries of \^A for matching
@@ -1056,7 +1056,8 @@ contains
integer(psb_c_lpk_) :: ph1_card(*),ph2_card(*)
real(c_float) :: edgelocweight(:)
real(c_double) :: msgpercent(*)
integer(psb_ipk_) :: info, me, np
integer(psb_ipk_) :: info
integer(psb_mpk_) :: me, np
integer(psb_c_mpk_) :: icomm, mrank, mnp
logical, optional :: display_inp
!
+1 -1
View File
@@ -488,7 +488,7 @@ subroutine amg_lc_ptap_bld(a_csr,desc_a,nlaggr,parms,ac,&
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nrl, nzl, ip, &
& nzt, naggrm1, naggrp1, i, k
integer(psb_lpk_) :: nrsave, ncsave, nzsave, nza
logical, parameter :: do_timings=.true., oldstyle=.false., debug=.false.
logical, parameter :: do_timings=.false., oldstyle=.false., debug=.false.
integer(psb_ipk_), save :: idx_spspmm=-1
name='amg_ptap_bld'
@@ -103,7 +103,7 @@ subroutine amg_c_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc1_p1=-1, idx_soc1_p2=-1, idx_soc1_p3=-1
integer(psb_ipk_), save :: idx_soc1_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc1_map_bld'
@@ -104,7 +104,7 @@ subroutine amg_c_soc2_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc2_p1=-1, idx_soc2_p2=-1, idx_soc2_p3=-1
integer(psb_ipk_), save :: idx_soc2_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc2_map_bld'
@@ -108,7 +108,7 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
type(psb_desc_type), intent(inout) :: desc_ac
integer(psb_ipk_), intent(out) :: info
!
type(psb_ctxt_type) :: ictxt
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
type(psb_ld_coo_sparse_mat) :: tmpcoo
type(psb_ldspmat_type) :: tmp_ac
@@ -124,8 +124,8 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
info = psb_success_
ictxt = desc_a%get_context()
call psb_info(ictxt,me,np)
ctxt = desc_a%get_context()
call psb_info(ctxt,me,np)
if (psb_get_errstatus().ne.0) then
write(0,*) me,' From:',trim(name),':',psb_get_errstatus()
return
@@ -163,22 +163,21 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
call op_prol%mv_to(tmpcoo)
nzl = tmpcoo%get_nzeros()
call psb_loc_to_glob(tmpcoo%ja(1:nzl),desc_ac,info,'I')
call tmpcoo%set_ncols(i_nr)
call op_prol%mv_from(tmpcoo)
call op_restr%mv_to(tmpcoo)
nzl = tmpcoo%get_nzeros()
call psb_loc_to_glob(tmpcoo%ia(1:nzl),desc_ac,info,'I')
call tmpcoo%set_nrows(i_nr)
call op_restr%mv_from(tmpcoo)
call op_prol%set_ncols(i_nr)
call op_restr%set_nrows(i_nr)
call psb_gather(tmp_ac,ac,desc_ac,info,root=-ione,&
& dupl=psb_dupl_add_,keeploc=.false.)
call tmp_ac%mv_to(tmpcoo)
call ac%mv_from(tmpcoo)
call psb_cdall(ictxt,desc_ac,info,mg=ntaggr,repl=.true.)
call psb_cdall(ctxt,desc_ac,info,mg=ntaggr,repl=.true.)
if (info == psb_success_) call psb_cdasb(desc_ac,info)
!
! Now that we have the descriptors and the restrictor, we should
@@ -84,7 +84,7 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
type(psb_ldspmat_type) :: tmp_prol, tmp_pg, tmp_restr
type(psb_desc_type) :: tmp_desc_ac, tmp_desc_ax, tmp_desc_p
integer(psb_ipk_), save :: idx_mboxp=-1, idx_spmmbld=-1, idx_sweeps_mult=-1
logical, parameter :: dump=.false., do_timings=.true., debug=.false., &
logical, parameter :: dump=.false., do_timings=.false., debug=.false., &
& dump_prol_restr=.false.
name='d_parmatch_tprol'
@@ -127,7 +127,7 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
& nzt, naggrm1, naggrp1, i, k
integer(psb_lpk_), allocatable :: ia(:),ja(:)
!integer(psb_lpk_) :: nrsave, ncsave, nzsave, nza, nrpsave, ncpsave, nzpsave
logical, parameter :: do_timings=.true., oldstyle=.false., debug=.false.
logical, parameter :: do_timings=.false., oldstyle=.false., debug=.false.
integer(psb_ipk_), save :: idx_spspmm=-1, idx_prolcnv=-1, idx_proltrans=-1, idx_asb=-1
name='amg_parmatch_spmm_bld_inner'
+1 -1
View File
@@ -488,7 +488,7 @@ subroutine amg_ld_ptap_bld(a_csr,desc_a,nlaggr,parms,ac,&
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nrl, nzl, ip, &
& nzt, naggrm1, naggrp1, i, k
integer(psb_lpk_) :: nrsave, ncsave, nzsave, nza
logical, parameter :: do_timings=.true., oldstyle=.false., debug=.false.
logical, parameter :: do_timings=.false., oldstyle=.false., debug=.false.
integer(psb_ipk_), save :: idx_spspmm=-1
name='amg_ptap_bld'
@@ -103,7 +103,7 @@ subroutine amg_d_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc1_p1=-1, idx_soc1_p2=-1, idx_soc1_p3=-1
integer(psb_ipk_), save :: idx_soc1_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc1_map_bld'
@@ -104,7 +104,7 @@ subroutine amg_d_soc2_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc2_p1=-1, idx_soc2_p2=-1, idx_soc2_p3=-1
integer(psb_ipk_), save :: idx_soc2_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc2_map_bld'
@@ -108,7 +108,7 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
type(psb_desc_type), intent(inout) :: desc_ac
integer(psb_ipk_), intent(out) :: info
!
type(psb_ctxt_type) :: ictxt
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
type(psb_ls_coo_sparse_mat) :: tmpcoo
type(psb_lsspmat_type) :: tmp_ac
@@ -124,8 +124,8 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
info = psb_success_
ictxt = desc_a%get_context()
call psb_info(ictxt,me,np)
ctxt = desc_a%get_context()
call psb_info(ctxt,me,np)
if (psb_get_errstatus().ne.0) then
write(0,*) me,' From:',trim(name),':',psb_get_errstatus()
return
@@ -163,22 +163,21 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
call op_prol%mv_to(tmpcoo)
nzl = tmpcoo%get_nzeros()
call psb_loc_to_glob(tmpcoo%ja(1:nzl),desc_ac,info,'I')
call tmpcoo%set_ncols(i_nr)
call op_prol%mv_from(tmpcoo)
call op_restr%mv_to(tmpcoo)
nzl = tmpcoo%get_nzeros()
call psb_loc_to_glob(tmpcoo%ia(1:nzl),desc_ac,info,'I')
call tmpcoo%set_nrows(i_nr)
call op_restr%mv_from(tmpcoo)
call op_prol%set_ncols(i_nr)
call op_restr%set_nrows(i_nr)
call psb_gather(tmp_ac,ac,desc_ac,info,root=-ione,&
& dupl=psb_dupl_add_,keeploc=.false.)
call tmp_ac%mv_to(tmpcoo)
call ac%mv_from(tmpcoo)
call psb_cdall(ictxt,desc_ac,info,mg=ntaggr,repl=.true.)
call psb_cdall(ctxt,desc_ac,info,mg=ntaggr,repl=.true.)
if (info == psb_success_) call psb_cdasb(desc_ac,info)
!
! Now that we have the descriptors and the restrictor, we should
@@ -84,7 +84,7 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
type(psb_lsspmat_type) :: tmp_prol, tmp_pg, tmp_restr
type(psb_desc_type) :: tmp_desc_ac, tmp_desc_ax, tmp_desc_p
integer(psb_ipk_), save :: idx_mboxp=-1, idx_spmmbld=-1, idx_sweeps_mult=-1
logical, parameter :: dump=.false., do_timings=.true., debug=.false., &
logical, parameter :: dump=.false., do_timings=.false., debug=.false., &
& dump_prol_restr=.false.
name='s_parmatch_tprol'
@@ -127,7 +127,7 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
& nzt, naggrm1, naggrp1, i, k
integer(psb_lpk_), allocatable :: ia(:),ja(:)
!integer(psb_lpk_) :: nrsave, ncsave, nzsave, nza, nrpsave, ncpsave, nzpsave
logical, parameter :: do_timings=.true., oldstyle=.false., debug=.false.
logical, parameter :: do_timings=.false., oldstyle=.false., debug=.false.
integer(psb_ipk_), save :: idx_spspmm=-1, idx_prolcnv=-1, idx_proltrans=-1, idx_asb=-1
name='amg_parmatch_spmm_bld_inner'
+1 -1
View File
@@ -488,7 +488,7 @@ subroutine amg_ls_ptap_bld(a_csr,desc_a,nlaggr,parms,ac,&
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nrl, nzl, ip, &
& nzt, naggrm1, naggrp1, i, k
integer(psb_lpk_) :: nrsave, ncsave, nzsave, nza
logical, parameter :: do_timings=.true., oldstyle=.false., debug=.false.
logical, parameter :: do_timings=.false., oldstyle=.false., debug=.false.
integer(psb_ipk_), save :: idx_spspmm=-1
name='amg_ptap_bld'
@@ -103,7 +103,7 @@ subroutine amg_s_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc1_p1=-1, idx_soc1_p2=-1, idx_soc1_p3=-1
integer(psb_ipk_), save :: idx_soc1_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc1_map_bld'
@@ -104,7 +104,7 @@ subroutine amg_s_soc2_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc2_p1=-1, idx_soc2_p2=-1, idx_soc2_p3=-1
integer(psb_ipk_), save :: idx_soc2_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc2_map_bld'
+1 -1
View File
@@ -488,7 +488,7 @@ subroutine amg_lz_ptap_bld(a_csr,desc_a,nlaggr,parms,ac,&
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nrl, nzl, ip, &
& nzt, naggrm1, naggrp1, i, k
integer(psb_lpk_) :: nrsave, ncsave, nzsave, nza
logical, parameter :: do_timings=.true., oldstyle=.false., debug=.false.
logical, parameter :: do_timings=.false., oldstyle=.false., debug=.false.
integer(psb_ipk_), save :: idx_spspmm=-1
name='amg_ptap_bld'
@@ -103,7 +103,7 @@ subroutine amg_z_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc1_p1=-1, idx_soc1_p2=-1, idx_soc1_p3=-1
integer(psb_ipk_), save :: idx_soc1_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc1_map_bld'
@@ -104,7 +104,7 @@ subroutine amg_z_soc2_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in
character(len=20) :: name, ch_err
integer(psb_ipk_), save :: idx_soc2_p1=-1, idx_soc2_p2=-1, idx_soc2_p3=-1
integer(psb_ipk_), save :: idx_soc2_p0=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
name = 'amg_soc2_map_bld'
@@ -55,8 +55,8 @@ subroutine amg_c_base_onelev_map_prol_v(lv,alpha,vect_v,beta,vect_u,info,work,vt
!!$ write(0,*) 'Remap handling '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_mpk_) :: me, np, rme, rnp
complex(psb_spk_), allocatable :: rsnd(:), rrcv(:)
type(psb_c_vect_type) :: tv
@@ -56,8 +56,8 @@ subroutine amg_c_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,&
!!$ write(0,*) 'Remap handling not implemented yet '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_mpk_) :: me, np, rme, rnp
complex(psb_spk_), allocatable :: rsnd(:), rrcv(:)
type(psb_c_vect_type) :: tv
@@ -55,8 +55,8 @@ subroutine amg_d_base_onelev_map_prol_v(lv,alpha,vect_v,beta,vect_u,info,work,vt
!!$ write(0,*) 'Remap handling '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_mpk_) :: me, np, rme, rnp
real(psb_dpk_), allocatable :: rsnd(:), rrcv(:)
type(psb_d_vect_type) :: tv
@@ -56,8 +56,8 @@ subroutine amg_d_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,&
!!$ write(0,*) 'Remap handling not implemented yet '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_mpk_) :: me, np, rme, rnp
real(psb_dpk_), allocatable :: rsnd(:), rrcv(:)
type(psb_d_vect_type) :: tv
@@ -55,8 +55,8 @@ subroutine amg_s_base_onelev_map_prol_v(lv,alpha,vect_v,beta,vect_u,info,work,vt
!!$ write(0,*) 'Remap handling '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_mpk_) :: me, np, rme, rnp
real(psb_spk_), allocatable :: rsnd(:), rrcv(:)
type(psb_s_vect_type) :: tv
@@ -56,8 +56,8 @@ subroutine amg_s_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,&
!!$ write(0,*) 'Remap handling not implemented yet '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_mpk_) :: me, np, rme, rnp
real(psb_spk_), allocatable :: rsnd(:), rrcv(:)
type(psb_s_vect_type) :: tv
@@ -55,8 +55,8 @@ subroutine amg_z_base_onelev_map_prol_v(lv,alpha,vect_v,beta,vect_u,info,work,vt
!!$ write(0,*) 'Remap handling '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip,idest, nsrc, nrl, nrc, kp
integer(psb_mpk_) :: me, np, rme, rnp
complex(psb_dpk_), allocatable :: rsnd(:), rrcv(:)
type(psb_z_vect_type) :: tv
@@ -56,8 +56,8 @@ subroutine amg_z_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,&
!!$ write(0,*) 'Remap handling not implemented yet '
block
type(psb_ctxt_type) :: ctxt, nctxt
integer(psb_ipk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_ipk_) :: me, np, rme, rnp
integer(psb_mpk_) :: i,j,ip, idest, nsrc, nrl, kp
integer(psb_mpk_) :: me, np, rme, rnp
complex(psb_dpk_), allocatable :: rsnd(:), rrcv(:)
type(psb_z_vect_type) :: tv
@@ -183,7 +183,7 @@ subroutine amg_c_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if ( res < sm%tol*resdenum ) then
if( (sm%printres).and.(mod(sm%printiter,sm%checkiter)/=0) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -275,7 +275,7 @@ subroutine amg_c_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if (res < sm%tol*resdenum ) then
if( (sm%printres).and.( mod(sm%printiter,sm%checkiter) /=0 ) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -183,7 +183,7 @@ subroutine amg_d_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if ( res < sm%tol*resdenum ) then
if( (sm%printres).and.(mod(sm%printiter,sm%checkiter)/=0) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -275,7 +275,7 @@ subroutine amg_d_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if (res < sm%tol*resdenum ) then
if( (sm%printres).and.( mod(sm%printiter,sm%checkiter) /=0 ) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -56,7 +56,7 @@ subroutine amg_d_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
character, intent(in), optional :: init
type(psb_d_vect_type),intent(inout), optional :: initu
! Timers
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
integer(psb_ipk_), save :: poly_1=-1, poly_2=-1, poly_3=-1
integer(psb_ipk_), save :: poly_mv=-1, poly_sv=-1, poly_vect=-1
!
@@ -183,7 +183,7 @@ subroutine amg_s_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if ( res < sm%tol*resdenum ) then
if( (sm%printres).and.(mod(sm%printiter,sm%checkiter)/=0) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -275,7 +275,7 @@ subroutine amg_s_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if (res < sm%tol*resdenum ) then
if( (sm%printres).and.( mod(sm%printiter,sm%checkiter) /=0 ) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -56,7 +56,7 @@ subroutine amg_s_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
character, intent(in), optional :: init
type(psb_s_vect_type),intent(inout), optional :: initu
! Timers
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
integer(psb_ipk_), save :: poly_1=-1, poly_2=-1, poly_3=-1
integer(psb_ipk_), save :: poly_mv=-1, poly_sv=-1, poly_vect=-1
!
@@ -183,7 +183,7 @@ subroutine amg_z_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if ( res < sm%tol*resdenum ) then
if( (sm%printres).and.(mod(sm%printiter,sm%checkiter)/=0) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -275,7 +275,7 @@ subroutine amg_z_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
if (res < sm%tol*resdenum ) then
if( (sm%printres).and.( mod(sm%printiter,sm%checkiter) /=0 ) ) &
& call log_conv("BJAC",me,i,1,res,resdenum,sm%tol)
& call log_conv("BJAC",me,i,ione,res,resdenum,sm%tol)
exit
end if
end if
@@ -57,7 +57,7 @@ subroutine amg_c_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='d_bwgs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
+1 -1
View File
@@ -57,7 +57,7 @@ subroutine amg_c_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='c_gs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
@@ -96,7 +96,8 @@ subroutine amg_c_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
! Local variables
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota
integer(psb_lpk_) :: lnr
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt, l_ctxt
character(len=20) :: name='@Z@_krm_solver_bld', ch_err
@@ -123,7 +124,7 @@ subroutine amg_c_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
call sv%prec%smoothers_build(a,desc_a,info,amold=amold,vmold=vmold)
sv%a => a
else
call psb_init(l_ctxt,np=1_psb_ipk_,basectxt=ctxt,ids=(/me/))
call psb_init(l_ctxt,np=1_psb_mpk_,basectxt=ctxt,ids=(/me/))
n_row = desc_a%get_local_rows()
lnr = n_row
call psb_cdall(l_ctxt,sv%desc_local,info,mg=lnr,repl=.true.)
@@ -186,7 +187,8 @@ subroutine amg_c_krm_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
type(psb_c_vect_type),intent(inout), optional :: initu
type(psb_c_vect_type) :: z
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply_v', ch_err
@@ -247,7 +249,8 @@ subroutine amg_c_krm_solver_apply(alpha,sv,x,beta,y,desc_data,&
character, intent(in), optional :: init
complex(psb_spk_),intent(inout), optional :: initu(:)
complex(psb_spk_), allocatable :: z(:)
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply', ch_err
@@ -57,7 +57,7 @@ subroutine amg_d_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='d_bwgs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
+1 -1
View File
@@ -57,7 +57,7 @@ subroutine amg_d_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='d_gs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
@@ -96,7 +96,8 @@ subroutine amg_d_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
! Local variables
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota
integer(psb_lpk_) :: lnr
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt, l_ctxt
character(len=20) :: name='@Z@_krm_solver_bld', ch_err
@@ -123,7 +124,7 @@ subroutine amg_d_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
call sv%prec%smoothers_build(a,desc_a,info,amold=amold,vmold=vmold)
sv%a => a
else
call psb_init(l_ctxt,np=1_psb_ipk_,basectxt=ctxt,ids=(/me/))
call psb_init(l_ctxt,np=1_psb_mpk_,basectxt=ctxt,ids=(/me/))
n_row = desc_a%get_local_rows()
lnr = n_row
call psb_cdall(l_ctxt,sv%desc_local,info,mg=lnr,repl=.true.)
@@ -186,7 +187,8 @@ subroutine amg_d_krm_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
type(psb_d_vect_type),intent(inout), optional :: initu
type(psb_d_vect_type) :: z
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply_v', ch_err
@@ -247,7 +249,8 @@ subroutine amg_d_krm_solver_apply(alpha,sv,x,beta,y,desc_data,&
character, intent(in), optional :: init
real(psb_dpk_),intent(inout), optional :: initu(:)
real(psb_dpk_), allocatable :: z(:)
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply', ch_err
@@ -57,7 +57,7 @@ subroutine amg_s_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='d_bwgs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
+1 -1
View File
@@ -57,7 +57,7 @@ subroutine amg_s_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='s_gs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
@@ -96,7 +96,8 @@ subroutine amg_s_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
! Local variables
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota
integer(psb_lpk_) :: lnr
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt, l_ctxt
character(len=20) :: name='@Z@_krm_solver_bld', ch_err
@@ -123,7 +124,7 @@ subroutine amg_s_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
call sv%prec%smoothers_build(a,desc_a,info,amold=amold,vmold=vmold)
sv%a => a
else
call psb_init(l_ctxt,np=1_psb_ipk_,basectxt=ctxt,ids=(/me/))
call psb_init(l_ctxt,np=1_psb_mpk_,basectxt=ctxt,ids=(/me/))
n_row = desc_a%get_local_rows()
lnr = n_row
call psb_cdall(l_ctxt,sv%desc_local,info,mg=lnr,repl=.true.)
@@ -186,7 +187,8 @@ subroutine amg_s_krm_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
type(psb_s_vect_type),intent(inout), optional :: initu
type(psb_s_vect_type) :: z
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply_v', ch_err
@@ -247,7 +249,8 @@ subroutine amg_s_krm_solver_apply(alpha,sv,x,beta,y,desc_data,&
character, intent(in), optional :: init
real(psb_spk_),intent(inout), optional :: initu(:)
real(psb_spk_), allocatable :: z(:)
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply', ch_err
@@ -57,7 +57,7 @@ subroutine amg_z_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='d_bwgs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
+1 -1
View File
@@ -57,7 +57,7 @@ subroutine amg_z_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
integer(psb_ipk_) :: np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='z_gs_solver_bld', ch_err
integer(psb_ipk_), save :: idx_tril=-1
logical, parameter :: do_timings=.true.
logical, parameter :: do_timings=.false.
info=psb_success_
call psb_erractionsave(err_act)
@@ -96,7 +96,8 @@ subroutine amg_z_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
! Local variables
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota
integer(psb_lpk_) :: lnr
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt, l_ctxt
character(len=20) :: name='@Z@_krm_solver_bld', ch_err
@@ -123,7 +124,7 @@ subroutine amg_z_krm_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
call sv%prec%smoothers_build(a,desc_a,info,amold=amold,vmold=vmold)
sv%a => a
else
call psb_init(l_ctxt,np=1_psb_ipk_,basectxt=ctxt,ids=(/me/))
call psb_init(l_ctxt,np=1_psb_mpk_,basectxt=ctxt,ids=(/me/))
n_row = desc_a%get_local_rows()
lnr = n_row
call psb_cdall(l_ctxt,sv%desc_local,info,mg=lnr,repl=.true.)
@@ -186,7 +187,8 @@ subroutine amg_z_krm_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
type(psb_z_vect_type),intent(inout), optional :: initu
type(psb_z_vect_type) :: z
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply_v', ch_err
@@ -247,7 +249,8 @@ subroutine amg_z_krm_solver_apply(alpha,sv,x,beta,y,desc_data,&
character, intent(in), optional :: init
complex(psb_dpk_),intent(inout), optional :: initu(:)
complex(psb_dpk_), allocatable :: z(:)
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
integer(psb_mpk_) :: np,me
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='@Z@_krm_solver_apply', ch_err
+30
View File
@@ -0,0 +1,30 @@
set(AMG_amgcbind_source_files
amgprec/amg_zprec_cbind_mod.F90
amgprec/amg_prec_cbind_mod.F90
amgprec/amg_dprec_cbind_mod.F90
)
foreach(file IN LISTS AMG_amgcbind_source_files)
list(APPEND amgcbind_source_files ${CMAKE_CURRENT_LIST_DIR}/${file})
endforeach()
set(AMG_amgcbind_source_C_files
amgprec/amg_c_zprec.c
amgprec/amg_c_dprec.c
)
foreach(file IN LISTS AMG_amgcbind_source_C_files)
list(APPEND amgcbind_source_C_files ${CMAKE_CURRENT_LIST_DIR}/${file})
endforeach()
set(AMG_amgcbind_header_C_files
amgprec/amg_const.h
amgprec/amg_c_dprec.h
amgprec/amg_cbind.h
amgprec/amg_c_zprec.h
)
foreach(file IN LISTS AMG_amgcbind_header_C_files)
list(APPEND amgcbind_header_C_files ${CMAKE_CURRENT_LIST_DIR}/${file})
endforeach()
+1 -1
View File
@@ -11,7 +11,7 @@ amg_c_dprec* amg_c_dprec_new()
}
int amg_c_dprec_delete(amg_c_dprec* p)
psb_i_t amg_c_dprec_delete(amg_c_dprec* p)
{
int iret;
iret=amg_c_dprecfree(p);
+1 -1
View File
@@ -11,7 +11,7 @@ amg_c_dprec* amg_c_new_dprec()
}
int amg_c_delete_dprec(amg_c_dprec* p)
psb_i_t amg_c_delete_dprec(amg_c_dprec* p)
{
int iret;
iret=amg_c_dprecfree(p);
+9 -9
View File
@@ -31,7 +31,7 @@ contains
type(amg_c_dprec) :: ph
type(psb_c_object_type), value :: cctxt
character(c_char) :: ptype(*)
integer :: info
integer(psb_ipk_) :: info
type(amg_dprec_type), pointer :: precp
character(len=80) :: fptype
@@ -64,7 +64,7 @@ contains
type(psb_c_object_type) :: ph
character(c_char) :: what(*)
integer(psb_c_ipk_), value :: val
integer :: info
integer(psb_ipk_) :: info
character(len=80) :: fwhat
type(amg_dprec_type), pointer :: precp
@@ -94,7 +94,7 @@ contains
type(psb_c_object_type) :: ph
character(c_char) :: what(*)
real(c_double), value :: val
integer :: info
integer(psb_ipk_) :: info
character(len=80) :: fwhat
type(amg_dprec_type), pointer :: precp
@@ -122,7 +122,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph
character(c_char) :: what(*), val(*)
integer :: info
integer(psb_ipk_) :: info
character(len=80) :: fwhat,fval
type(amg_dprec_type), pointer :: precp
@@ -150,7 +150,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph,ah,cdh
integer :: info
integer(psb_ipk_) :: info
type(amg_dprec_type), pointer :: precp
type(psb_dspmat_type), pointer :: ap
type(psb_desc_type), pointer :: descp
@@ -189,7 +189,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph,ah,cdh
integer :: info
integer(psb_ipk_) :: info
type(amg_dprec_type), pointer :: precp
type(psb_dspmat_type), pointer :: ap
type(psb_desc_type), pointer :: descp
@@ -228,7 +228,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph,ah,cdh
integer :: info
integer(psb_ipk_) :: info
type(amg_dprec_type), pointer :: precp
type(psb_dspmat_type), pointer :: ap
type(psb_desc_type), pointer :: descp
@@ -302,7 +302,7 @@ contains
type(amg_dprec_type), pointer :: precp
type(psb_d_vect_type), pointer :: xp, bp
integer :: info,fitmax,fitrace,first,fistop,fiter
integer(psb_ipk_) :: info,fitmax,fitrace,first,fistop,fiter
character(len=20) :: fmethd
real(kind(1.d0)) :: feps,ferr
@@ -358,7 +358,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph
integer :: info
integer(psb_ipk_) :: info
type(amg_dprec_type), pointer :: precp
character(len=80) :: fptype
+9 -9
View File
@@ -31,7 +31,7 @@ contains
type(amg_c_zprec) :: ph
type(psb_c_object_type), value :: cctxt
character(c_char) :: ptype(*)
integer :: info
integer(psb_ipk_) :: info
type(amg_zprec_type), pointer :: precp
character(len=80) :: fptype
@@ -64,7 +64,7 @@ contains
type(psb_c_object_type) :: ph
character(c_char) :: what(*)
integer(psb_c_ipk_), value :: val
integer :: info
integer(psb_ipk_) :: info
character(len=80) :: fwhat
type(amg_zprec_type), pointer :: precp
@@ -94,7 +94,7 @@ contains
type(psb_c_object_type) :: ph
character(c_char) :: what(*)
real(c_double), value :: val
integer :: info
integer(psb_ipk_) :: info
character(len=80) :: fwhat
type(amg_zprec_type), pointer :: precp
@@ -122,7 +122,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph
character(c_char) :: what(*), val(*)
integer :: info
integer(psb_ipk_) :: info
character(len=80) :: fwhat,fval
type(amg_zprec_type), pointer :: precp
@@ -150,7 +150,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph,ah,cdh
integer :: info
integer(psb_ipk_) :: info
type(amg_zprec_type), pointer :: precp
type(psb_zspmat_type), pointer :: ap
type(psb_desc_type), pointer :: descp
@@ -189,7 +189,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph,ah,cdh
integer :: info
integer(psb_ipk_) :: info
type(amg_zprec_type), pointer :: precp
type(psb_zspmat_type), pointer :: ap
type(psb_desc_type), pointer :: descp
@@ -228,7 +228,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph,ah,cdh
integer :: info
integer(psb_ipk_) :: info
type(amg_zprec_type), pointer :: precp
type(psb_zspmat_type), pointer :: ap
type(psb_desc_type), pointer :: descp
@@ -302,7 +302,7 @@ contains
type(amg_zprec_type), pointer :: precp
type(psb_z_vect_type), pointer :: xp, bp
integer :: info,fitmax,fitrace,first,fistop,fiter
integer(psb_ipk_) :: info,fitmax,fitrace,first,fistop,fiter
character(len=20) :: fmethd
real(kind(1.d0)) :: feps,ferr
@@ -358,7 +358,7 @@ contains
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: ph
integer :: info
integer(psb_ipk_) :: info
type(amg_zprec_type), pointer :: precp
character(len=80) :: fptype
+7
View File
@@ -0,0 +1,7 @@
function(CapitalizeString string output_variable)
string(TOUPPER "${string}" _upper_string)
string(TOLOWER "${string}" _lower_string)
string(SUBSTRING "${_upper_string}" 0 1 _start)
string(SUBSTRING "${_lower_string}" 1 -1 _end)
set(${output_variable} "${_start}${_end}" PARENT_SCOPE)
endfunction()
+21
View File
@@ -0,0 +1,21 @@
#--------------------------
# Prohibit in-source builds
#--------------------------
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(FATAL_ERROR "ERROR! "
"CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
" == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}"
"\nThis archive does not support in-source builds:\n"
"You must now delete the CMakeCache.txt file and the CMakeFiles/ directory under "
"the 'src' source directory or you will not be able to configure correctly!"
"\nYou must now run something like:\n"
" $ rm -r CMakeCache.txt CMakeFiles/"
"\n"
"Please create a directory outside the ${CMAKE_PROJECT_NAME} source tree and build under that outside directory "
"in a manner such as\n"
" $ mkdir build\n"
" $ cd build\n"
" $ CC=gcc FC=gfortran cmake -DBUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/dir /path/to/psblas3/src/dir \n"
"\nsubstituting the appropriate syntax for your shell (the above line assumes the bash shell)."
)
endif()
+95
View File
@@ -0,0 +1,95 @@
if (METIS_INCLUDES AND METIS_LIBRARIES)
set(METIS_FIND_QUIETLY TRUE)
endif (METIS_INCLUDES AND METIS_LIBRARIES)
if( DEFINED ENV{METISDIR} )
if( NOT DEFINED METIS_ROOT )
set(METIS_ROOT "$ENV{METISDIR}")
endif()
endif()
if( (DEFINED ENV{METIS_ROOT}) OR (DEFINED METIS_ROOT) )
if( NOT DEFINED METIS_ROOT)
set(METIS_ROOT "$ENV{METIS_ROOT}")
endif()
set(METIS_HINTS "${METIS_ROOT}")
endif()
find_path(METIS_INCLUDES
NAMES
metis.h
HINTS
${METIS_HINTS}
PATHS
"${INCLUDE_INSTALL_DIR}"
/usr/local/opt
/usr/local
PATH_SUFFIXES
include
)
if(METIS_INCLUDES)
foreach(include IN_LISTS METIS_INCLUDES)
get_filename_component(mts_include_dir "${include}" DIRECTORY)
get_filename_component(mts_abs_include_dir "${mts_include_dir}" ABSOLUTE)
get_filename_component(new_mts_hint "${include_dir}/.." ABSOLUTE )
list(APPEND METIS_HINTS "${new_mts_hint}")
break()
endforeach()
endif()
if(METIS_HINTS)
list(REMOVE_DUPLICATES METIS_HINTS)
endif()
macro(_metis_check_version)
file(READ "${METIS_INCLUDES}/metis.h" _metis_version_header)
string(REGEX MATCH "define[ \t]+METIS_VER_MAJOR[ \t]+([0-9]+)" _metis_major_version_match "${_metis_version_header}")
set(METIS_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+METIS_VER_MINOR[ \t]+([0-9]+)" _metis_minor_version_match "${_metis_version_header}")
set(METIS_MINOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+METIS_VER_SUBMINOR[ \t]+([0-9]+)" _metis_subminor_version_match "${_metis_version_header}")
set(METIS_SUBMINOR_VERSION "${CMAKE_MATCH_1}")
if(NOT METIS_MAJOR_VERSION)
message(STATUS "Could not determine Metis version. Assuming version 4.0.0")
set(METIS_VERSION 4.0.0)
else()
set(METIS_VERSION ${METIS_MAJOR_VERSION}.${METIS_MINOR_VERSION}.${METIS_SUBMINOR_VERSION})
endif()
if(${METIS_VERSION} VERSION_LESS ${Metis_FIND_VERSION})
set(METIS_VERSION_OK FALSE)
else()
set(METIS_VERSION_OK TRUE)
endif()
if(NOT METIS_VERSION_OK)
message(STATUS "Metis version ${METIS_VERSION} found in ${METIS_INCLUDES}, "
"but at least version ${Metis_FIND_VERSION} is required")
endif(NOT METIS_VERSION_OK)
endmacro(_metis_check_version)
if(METIS_INCLUDES AND Metis_FIND_VERSION)
_metis_check_version()
else()
set(METIS_VERSION_OK TRUE)
endif()
find_library(METIS_LIBRARIES metis
HINTS
${METIS_HINTS}
PATHS
"${LIB_INSTALL_DIR}"
/usr/local/
/usr/local/opt
PATH_SUFFIXES
lib
lib64
metis/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(METIS DEFAULT_MSG
METIS_INCLUDES METIS_LIBRARIES METIS_VERSION_OK)
mark_as_advanced(METIS_INCLUDES METIS_LIBRARIES)
+12
View File
@@ -0,0 +1,12 @@
Mac users can use GPGTools - https://gpgtools.org
Comment: Download Izaak Beekman's GPG public key from your
Comment: trusted key server or from
Comment: https://izaakbeekman.com/izaak.pubkey.txt
Comment: Next add it to your GPG keyring, e.g.,
Comment: `curl https://izaakbeekman.com/izaak.pubkey.txt | gpg --import`
Comment: Make sure you have verified that the release archive's
Comment: SHA256 checksum matches the provided
Comment: psblas-@git_version@-SHA256.txt and ensure that this file
Comment: and it's signature are in the same directory. Then
Comment: verify with:
Comment: `gpg --verify psblas-@git_version@-SHA256.txt.asc`
+3
View File
@@ -0,0 +1,3 @@
# To verify cryptographic checksums `shasum -c psblas-@git_version@-SHA256.txt` on Mac OS X, or
# `sha256sum -c psblas-@git_version@-SHA256.txt` on Linux.
@sha256_checksum@
+11
View File
@@ -0,0 +1,11 @@
# Config file for the installed package
set(amg4psblas_VERSION "@amg4psblas_VERSION@")
# Include directories
set(amg4psblas_INCLUDE_DIRS "@CMAKE_INSTALL_INCLUDEDIR@")
include(CMakeFindDependencyMacro)
# Provide the targets
include("${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@Targets.cmake")
+79
View File
@@ -0,0 +1,79 @@
# CMake file to be called in script mode (${CMAKE_COMMAND} -P <file>) to
# Generate a source archive release asset from add_custom_command
#
# See SourceDistTarget.cmake
if(NOT CMAKE_ARGV3)
message(FATAL_ERROR "Must pass the top level src dir to ${CMAKE_ARGV2} as the first argument")
endif()
if(NOT CMAKE_ARGV4)
message(FATAL_ERROR "Must pass the top level src dir to ${CMAKE_ARGV2} as the second argument")
endif()
find_package(Git)
if(NOT GIT_FOUND)
message( FATAL_ERROR "You can't create a source archive release asset without git!")
endif()
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --always
RESULT_VARIABLE git_status
OUTPUT_VARIABLE git_version
WORKING_DIRECTORY "${CMAKE_ARGV3}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT (git_status STREQUAL "0"))
message( FATAL_ERROR "git describe --always failed with exit status: ${git_status} and message:
${git_version}")
endif()
set(archive "AMG4PSBLAS-${git_version}")
set(l_archive "AMG4PSBLAS-${git_version}")
set(release_asset "${CMAKE_ARGV4}/${archive}.tar.gz")
execute_process(
COMMAND "${GIT_EXECUTABLE}" archive "--prefix=${archive}/" -o "${release_asset}" "${git_version}"
RESULT_VARIABLE git_status
OUTPUT_VARIABLE git_output
WORKING_DIRECTORY "${CMAKE_ARGV3}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT (git_status STREQUAL "0"))
message( FATAL_ERROR "git archive ... failed with exit status: ${git_status} and message:
${git_output}")
else()
message( STATUS "Source code release asset created from `git archive`: ${release_asset}")
endif()
file(SHA256 "${release_asset}" tarball_sha256)
set(sha256_checksum "${tarball_sha256} ${archive}.tar.gz")
configure_file("${CMAKE_ARGV3}/cmake/AMG4PSBLAS-VER-SHA256.txt.in"
"${CMAKE_ARGV4}/${l_archive}-SHA256.txt"
@ONLY)
message( STATUS
"SHA 256 checksum of release tarball written out as: ${CMAKE_ARGV4}/${l_archive}-SHA256.txt" )
find_program(GPG_EXECUTABLE
gpg
DOC "Location of GnuPG (gpg) executable")
if(GPG_EXECUTABLE)
execute_process(
COMMAND "${GPG_EXECUTABLE}" --armor --detach-sign --comment "@gpg_comment@" "${CMAKE_ARGV4}/${l_archive}-SHA256.txt"
RESULT_VARIABLE gpg_status
OUTPUT_VARIABLE gpg_output
WORKING_DIRECTORY "${CMAKE_ARGV4}")
if(NOT (gpg_status STREQUAL "0"))
message( WARNING "GPG signing of ${CMAKE_ARGV4}/${l_archive}-SHA256.txt appears to have failed
with status: ${gpg_status} and output: ${gpg_output}")
else()
configure_file("${CMAKE_ARGV3}/cmake/AMG4PSBLAS-VER-SHA256.txt.asc.in"
"${CMAKE_ARGV4}/${l_archive}-GPG.comment"
@ONLY)
file(READ "${CMAKE_ARGV4}/${l_archive}-GPG.comment" gpg_comment)
configure_file("${CMAKE_ARGV4}/${l_archive}-SHA256.txt.asc"
"${CMAKE_ARGV4}/${l_archive}-SHA256.txt.asc.out"
@ONLY)
file(RENAME "${CMAKE_ARGV4}/${l_archive}-SHA256.txt.asc.out"
"${CMAKE_ARGV4}/${l_archive}-SHA256.txt.asc")
message(STATUS "GPG signed SHA256 checksum created: ${CMAKE_ARGV4}/${l_archive}-SHA256.txt.asc")
endif()
endif()
+16
View File
@@ -0,0 +1,16 @@
# Config file for the INSTALLED package
# Allow other CMake projects to find this package if it is installed
# Requires the use of the standard CMake module CMakePackageConfigHelpers
set ( @CMAKE_PROJECT_NAME@_VERSION @VERSION@ )
###@COMPILER_CONSISTENCY_CHECK@
@PACKAGE_INIT@
# Provide the targets
set_and_check ( @PACKAGE_NAME@_CONFIG_INSTALL_DIR "@PACKAGE_EXPORT_INSTALL_DIR@" )
include ( "${@PACKAGE_NAME@_CONFIG_INSTALL_DIR}/@PACKAGE_NAME@-targets.cmake" )
# Make the module files available via include
set_and_check ( @CMAKE_PROJECT_NAME@_INCLUDE_DIRS "@PACKAGE_INSTALL_MOD_DIR@" )
+90
View File
@@ -0,0 +1,90 @@
include(CMakeParseArguments)
# Function to parse version info from git and/or .VERSION file
function(set_version)
set(options "")
set(oneValueArgs VERSION_VARIABLE GIT_DESCRIBE_VAR CUSTOM_VERSION_FILE CUSTOM_VERSION_REGEX )
set(multiValueArgs "")
cmake_parse_arguments(set_version "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# Algorithm:
# 1. Get first line of .VERSION file, which will be set via `git archive` so long as
#
# 2. If not a packaged release check if this is an active git repo
# 3. Get version info from `git describe`
# 4. First the most recent tag is fetched if available
# 5. Then the full `git describe` output is fetched
if(NOT set_version_CUSTOM_VERSION_REGEX)
set(_VERSION_REGEX "[vV]*[0-9]+\\.[0-9]+\\.[0-9]+")
else()
set(_VERSION_REGEX ${set_version_CUSTOM_VERSION_REGEX})
endif()
if(NOT set_version_CUSTOM_VERSION_FILE)
set(_VERSION_FILE "${CMAKE_SOURCE_DIR}/.VERSION")
else()
set(_VERSION_FILE "${set_version_CUSTOM_VERSION_FILE}")
endif()
file(STRINGS "${_VERSION_FILE}" first_line
LIMIT_COUNT 1
)
string(REGEX MATCH ${_VERSION_REGEX}
_package_version "${first_line}")
if((NOT (_package_version MATCHES ${_VERSION_REGEX})) AND (EXISTS "${CMAKE_SOURCE_DIR}/.git"))
message( STATUS "Build from git repository detected")
find_package(Git)
if(GIT_FOUND)
set(GIT_FOUND "${GIT_FOUND}" PARENT_SCOPE)
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --abbrev=0
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE _git_status
OUTPUT_VARIABLE _git_output
OUTPUT_STRIP_TRAILING_WHITESPACE)
if((_git_status STREQUAL "0") AND (_git_output MATCHES ${_VERSION_REGEX}))
set(_package_version "${_git_output}")
endif()
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --always
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE _git_status
OUTPUT_VARIABLE _full_git_describe
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT (_git_status STREQUAL "0"))
set(_full_git_describe NOTFOUND)
endif()
else()
message( WARNING "Could not find git executable!")
endif()
endif()
if(NOT (_package_version MATCHES ${_VERSION_REGEX}))
message( WARNING "Could not extract version from git, falling back on ${_VERSION_FILE}.")
file(STRINGS ".VERSION" _package_version
REGEX ${_VERSION_REGEX}
)
endif()
if(NOT _full_git_describe)
set(_full_git_describe ${_package_version})
endif()
# Strip leading "v" character from package version tags so that
# the version string can be passed to the CMake `project` command
string(REPLACE "v" "" _package_version "${_package_version}")
string(REPLACE "V" "" _package_version "${_package_version}")
if(set_version_VERSION_VARIABLE)
set(${set_version_VERSION_VARIABLE} ${_package_version} PARENT_SCOPE)
else()
set(PROJECT_VERSION ${_package_version} PARENT_SCOPE)
endif()
if(set_version_GIT_DESCRIBE_VAR)
set(${set_version_GIT_DESCRIBE_VAR} ${_full_git_describe} PARENT_SCOPE)
else()
set(FULL_GIT_DESCRIBE ${_full_git_describe} PARENT_SCOPE)
endif()
endfunction()
+23
View File
@@ -0,0 +1,23 @@
# Adapted from http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F May 1, 2014
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif(NOT "${rm_retval}" STREQUAL 0)
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)
Binary file not shown.
+1 -1
View File
@@ -31,7 +31,7 @@ class="cmr-12">University of Rome Tor-Vergata and IAC-CNR</span><br
class="newline" /> <span
class="cmr-12">Software version: 1.2</span><br
class="newline" /><span
class="cmr-12">December 31st, 2024</span>
class="cmr-12">June 9th, 2025</span>
+1 -1
View File
@@ -31,7 +31,7 @@ class="cmr-12">University of Rome Tor-Vergata and IAC-CNR</span><br
class="newline" /> <span
class="cmr-12">Software version: 1.2</span><br
class="newline" /><span
class="cmr-12">December 31st, 2024</span>
class="cmr-12">June 9th, 2025</span>
+54 -23
View File
@@ -38,33 +38,35 @@ class="cmr-12">AMG4PSBLAS is available from the web site</span>
href="https://psctoolkit.github.io/products/amg4psblas/" ><span
class="cmr-12">https://psctoolkit.github.io/products/amg4psblas/</span></a></blockquote>
<!--l. 10--><p class="noindent" ><span
class="cmr-12">where contact points for further information can be also found.</span>
<!--l. 12--><p class="indent" > <span
class="cmr-12">The software is available under a modified BSD license, as specified in Appendix</span><span
class="cmr-12">where contact points for further information can be also found. The software is available</span>
<span
class="cmr-12">under a modified BSD license, as specified in Appendix</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse8.html#x11-33000A"><span
class="cmr-12">A</span><!--tex4ht:ref: sec:license --></a><span
class="cmr-12">;</span>
class="cmr-12">; please note that some of the</span>
<span
class="cmr-12">please note that some of the optional third party libraries may be licensed under a</span>
class="cmr-12">optional third party libraries may be licensed under a different and more stringent</span>
<span
class="cmr-12">different and more stringent license, most notably the GPL, and this should be taken</span>
class="cmr-12">license, most notably the GPL, and this should be taken into account when treating</span>
<span
class="cmr-12">into account when treating derived works.</span>
<!--l. 18--><p class="indent" > <span
class="cmr-12">derived works.</span>
<!--l. 17--><p class="indent" > <span
class="cmr-12">The library defines a version string with the constant</span>
<div class="math-display" >
<img
src="userhtml1x.png" alt="amg_version_string_
" class="math-display" ></div>
<!--l. 20--><p class="nopar" > <span
<!--l. 19--><p class="nopar" > <span
class="cmr-12">whose current value is </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">1.0</span></span></span><span
class="cmtt-12">1.2</span></span></span><span
class="cmr-12">.</span>
<!--l. 23--><p class="noindent" >
<!--l. 22--><p class="noindent" >
<h4 class="likesubsectionHead"><a
id="x5-5000"></a><span
class="cmr-12">Contributors</span></h4>
class="cmr-12">Development team</span></h4>
<!--l. 23--><p class="noindent" ><span
class="cmr-12">The main development team for AMG4PSBLAS is:</span>
<ul class="itemize1">
<li class="itemize">
<!--l. 25--><p class="noindent" ><span
@@ -77,27 +79,56 @@ class="cmr-12">Fabio Durastante, University of Pisa and IAC-CNR, IT;</span>
<li class="itemize">
<!--l. 27--><p class="noindent" ><span
class="cmr-12">Salvatore Filippone, University of Rome Tor-Vergata and IAC-CNR, IT;</span></li></ul>
<!--l. 29--><p class="noindent" ><span
class="cmr-12">Other contributors:</span>
<div class="center"
>
<!--l. 30--><p class="noindent" >
<div class="minipage"> <ul class="itemize1">
<li class="itemize">
<!--l. 33--><p class="noindent" ><span
class="cmr-12">Luca Pep</span><span
class="cmr-12">è Sciarria;</span>
</li>
<li class="itemize">
<!--l. 34--><p class="noindent" ><span
class="cmr-12">Andea Di Iorio;</span></li></ul> </div> <div class="minipage"> <ul class="itemize1">
<li class="itemize">
<!--l. 40--><p class="noindent" ><span
class="cmr-12">Zaak Beekman;</span>
</li>
<li class="itemize">
<!--l. 41--><p class="noindent" ><span
class="cmr-12">Ambra Abdullahi Hassan.</span></li></ul> </div></div>
<!--l. 45--><p class="noindent" >
<h4 class="likesubsectionHead"><a
id="x5-6000"></a><span
class="cmr-12">Citing AMG4PSBLAS</span></h4>
<!--l. 31--><p class="noindent" ><span
class="cmr-12">When use the library, please cite the following:</span>
<!--l. 46--><p class="noindent" ><span
class="cmr-12">When using the library, please cite the following:</span>
<pre class="verbatim" id="verbatim-1">
@article{DDF2021,
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;author&#x00A0;=&#x00A0;{D&#8217;Ambra,&#x00A0;Pasqua&#x00A0;and&#x00A0;Durastante,&#x00A0;Fabio&#x00A0;and&#x00A0;Filippone,&#x00A0;Salvatore},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;title&#x00A0;=&#x00A0;{{{AMG&#x00A0;Preconditioners&#x00A0;for&#x00A0;Linear&#x00A0;Solvers&#x00A0;towards&#x00A0;Extreme&#x00A0;Scale}},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;journal&#x00A0;=&#x00A0;{arXiv&#x00A0;e-preprints},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;eprint&#x00A0;=&#x00A0;{2006.16147v3},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;archivePrefix&#x00A0;=&#x00A0;{arXiv},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;year={2021}
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;}
@article&#x00A0;{MR4331965,
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;AUTHOR&#x00A0;=&#x00A0;{D&#8217;Ambra,&#x00A0;Pasqua&#x00A0;and&#x00A0;Durastante,&#x00A0;Fabio&#x00A0;and&#x00A0;Filippone,&#x00A0;Salvatore},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;TITLE&#x00A0;=&#x00A0;{A{MG}&#x00A0;preconditioners&#x00A0;for&#x00A0;linear&#x00A0;solvers&#x00A0;towards&#x00A0;extreme
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;scale},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;JOURNAL&#x00A0;=&#x00A0;{SIAM&#x00A0;J.&#x00A0;Sci.&#x00A0;Comput.},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;FJOURNAL&#x00A0;=&#x00A0;{SIAM&#x00A0;Journal&#x00A0;on&#x00A0;Scientific&#x00A0;Computing},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;VOLUME&#x00A0;=&#x00A0;{43},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;YEAR&#x00A0;=&#x00A0;{2021},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;NUMBER&#x00A0;=&#x00A0;{5},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;PAGES&#x00A0;=&#x00A0;{S679--S703},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;ISSN&#x00A0;=&#x00A0;{1064-8275,1095-7197},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;MRCLASS&#x00A0;=&#x00A0;{65F50&#x00A0;(65F08&#x00A0;65F10&#x00A0;65N55&#x00A0;65Y05)},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;MRNUMBER&#x00A0;=&#x00A0;{4331965},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;MRREVIEWER&#x00A0;=&#x00A0;{Yongzhong\&#x00A0;Song},
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;DOI&#x00A0;=&#x00A0;{10.1137/20M134914X},
}
@Misc{psctoolkit-web-page,
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;author&#x00A0;=&#x00A0;{D&#8217;Ambra,&#x00A0;Pasqua&#x00A0;and&#x00A0;Durastante,&#x00A0;Fabio&#x00A0;and&#x00A0;Filippone,&#x00A0;Salvatore},
@@ -107,7 +138,7 @@ class="cmr-12">When use the library, please cite the following:</span>
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;year&#x00A0;=&#x00A0;{2021}
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;}
</pre>
<!--l. 70--><p class="nopar" >
<!--l. 92--><p class="nopar" >
+7 -6
View File
@@ -790,15 +790,13 @@ class="cmr-12">In this particular example we are choosing to employ a </span><sp
class="cmtt-12">HLG</span></span></span> <span
class="cmr-12">data structure for</span>
<span
class="cmr-12">sparse matrices on GPUs; for more information please refer to the PSBLAS-EXT users&#8217;</span>
class="cmr-12">sparse matrices on GPUs; for more information please refer to the PSBLAS users&#8217;</span>
<span
class="cmr-12">guide.</span>
<!--l. 482--><p class="indent" > <span
class="cmr-12">We then have to initialize the GPU environment, and pass the appropriate MOLD</span>
<span
class="cmr-12">variables to the build methods (see also the PSBLAS and PSBLAS-EXT users&#8217;</span>
<span
class="cmr-12">guides).</span>
class="cmr-12">variables to the build methods (see also the PSBLAS users&#8217; guide).</span>
@@ -914,8 +912,11 @@ class="cmtt-12">INVT</span></span></span>
<li class="itemize">
<!--l. 601--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">AINV</span></span></span></li></ul>
</li></ul>
<!--l. 604--><p class="noindent" ><span
</li>
<li class="itemize">
<!--l. 603--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">POLY</span></span></span></li></ul>
<!--l. 605--><p class="noindent" ><span
class="cmr-12">and their </span><span
class="cmmi-12">&#x2113;</span><sub><span
class="cmr-8">1</span></sub> <span
+2 -2
View File
@@ -1871,9 +1871,9 @@ class="cmr-10">Degree of the polynomial accelerator, is</span>
<span
class="cmr-10">equal to the number of matrix-vector</span>
<span
class="cmr-10">products performed by the smoother. Is</span>
class="cmr-10">products performed by the smoother.</span>
<span
class="cmr-10">ignored if the smoother is not </span><code class="lstinline"><span style="color:#000000">&#8217;</span><span style="color:#000000">POLY</span><span style="color:#000000">&#8217;</span></code> </td>
class="cmr-10">Ignored if the smoother is not </span><code class="lstinline"><span style="color:#000000">&#8217;</span><span style="color:#000000">POLY</span><span style="color:#000000">&#8217;</span></code> </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-9-6-"><td style="white-space:normal; text-align:left;" id="TBL-9-6-1"
+67 -35
View File
@@ -8,7 +8,6 @@ AMG4PSBLAS is available from the web site
\href{https://psctoolkit.github.io/products/amg4psblas/}{https://psctoolkit.github.io/products/amg4psblas/}
\end{quotation}
where contact points for further information can be also found.
The software is available under a modified BSD license, as specified
in Appendix~\ref{sec:license}; please note that some of the optional
third party libraries may be licensed under a different and more
@@ -18,47 +17,70 @@ account when treating derived works.
The library defines a version string with the
constant
\[ \verb|amg_version_string_|\]
whose current value is \verb|1.0|.
whose current value is \verb|1.2|.
\subsection*{Contributors}
\subsection*{Development team}
The main development team for AMG4PSBLAS is:
\begin{itemize}
\item Pasqua D'Ambra, IAC-CNR, IT;
\item Fabio Durastante, University of Pisa and IAC-CNR, IT;
\item Salvatore Filippone, University of Rome Tor-Vergata and IAC-CNR, IT;
\item Salvatore Filippone, University of Rome Tor-Vergata and IAC-CNR, IT;
\end{itemize}
Other contributors:
\begin{center}
\begin{minipage}{.48\textwidth}
\begin{itemize}
\item Luca Pepè Sciarria;
\item Andea Di Iorio;
\end{itemize}
\end{minipage}
\hfill
\begin{minipage}{.48\textwidth}
\begin{itemize}
\item Zaak Beekman;
\item Ambra Abdullahi Hassan.
\end{itemize}
\end{minipage}
\end{center}
\subsection*{Citing AMG4PSBLAS}
When use the library, please cite the following:
When using the library, please cite the following:
% \ifpdf
% \begin{minted}[breakanywhere,fontsize=\small]{bibtex}
% @article{DDF2021,
% author = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
% title = {{{AMG Preconditioners for Linear Solvers towards Extreme Scale}},
% journal = {arXiv e-preprints},
% eprint = {2006.16147v3},
% archivePrefix = {arXiv},
% year={2021}
% }
\ifpdf
\begin{minted}[breakanywhere,fontsize=\small]{bibtex}
@article{DDF2021,
author = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
title = {{{AMG Preconditioners for Linear Solvers towards Extreme Scale}},
journal = {arXiv e-preprints},
eprint = {2006.16147v3},
archivePrefix = {arXiv},
year={2021}
}
@Misc{psctoolkit-web-page,
author = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
title = {{PSCToolkit} {W}eb page},
url = {https://psctoolkit.github.io/},
howpublished = {\url{https://psctoolkit.github.io/}},
year = {2021}
}
\end{minted}
\else
% @Misc{psctoolkit-web-page,
% author = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
% title = {{PSCToolkit} {W}eb page},
% url = {https://psctoolkit.github.io/},
% howpublished = {\url{https://psctoolkit.github.io/}},
% year = {2021}
% }
% \end{minted}
% \else
\begin{verbatim}
@article{DDF2021,
author = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
title = {{{AMG Preconditioners for Linear Solvers towards Extreme Scale}},
journal = {arXiv e-preprints},
eprint = {2006.16147v3},
archivePrefix = {arXiv},
year={2021}
}
@article {MR4331965,
AUTHOR = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
TITLE = {A{MG} preconditioners for linear solvers towards extreme
scale},
JOURNAL = {SIAM J. Sci. Comput.},
FJOURNAL = {SIAM Journal on Scientific Computing},
VOLUME = {43},
YEAR = {2021},
NUMBER = {5},
PAGES = {S679--S703},
ISSN = {1064-8275,1095-7197},
MRCLASS = {65F50 (65F08 65F10 65N55 65Y05)},
MRNUMBER = {4331965},
MRREVIEWER = {Yongzhong\ Song},
DOI = {10.1137/20M134914X},
}
@Misc{psctoolkit-web-page,
author = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
@@ -68,4 +90,14 @@ When use the library, please cite the following:
year = {2021}
}
\end{verbatim}
\fi
%\fi
% @article{DDF2021,
% author = {D'Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
% title = {{{AMG Preconditioners for Linear Solvers towards Extreme Scale}},
% journal = {arXiv e-preprints},
% eprint = {2006.16147v3},
% archivePrefix = {arXiv},
% year={2021}
% }
+3 -2
View File
@@ -477,11 +477,11 @@ program amg_dexample_gpu
\end{listing}
In this particular example we are choosing to employ a \verb|HLG| data
structure for sparse matrices on GPUs; for more information please
refer to the PSBLAS-EXT users' guide.
refer to the PSBLAS users' guide.
We then have to initialize the GPU environment, and pass the
appropriate MOLD variables to the build methods (see also the PSBLAS
and PSBLAS-EXT users' guides).
users' guide).
\begin{listing}[h!]
\ifpdf
\begin{minted}[breaklines=true,bgcolor=bg,fontsize=\small]{fortran}
@@ -600,6 +600,7 @@ system solve kernels. Methods that satisfy this constraint include:
\item \verb|INVT|
\item \verb|AINV|
\end{itemize}
\item \verb|POLY|
\end{itemize}
and their $\ell_1$ variants.
+1 -1
View File
@@ -154,7 +154,7 @@ Preconditioners Package based on PSBLAS}
\flushright
\large Software version: 1.2\\
%\todaym
\large Deceber 31st, 2024
\large June 9th, 2025
\end{minipage}}
%\addtolength{\textwidth}{\centeroffset}
\vspace{\stretch{2}}
+1 -1
View File
@@ -114,7 +114,7 @@
%\today
Software version: 1.2\\
%\today
December 31st, 2024
June 9th, 2025
\clearpage
\ \\
\thispagestyle{empty}
+1 -1
View File
@@ -625,7 +625,7 @@ level (continued).\label{tab:p_coarse_1}}
\fortinline|'POLY_DEGREE'| & \fortinline|integer|
& Any integer \par number~$\ge 1$ and~$\le 30$
& 1
& Degree of the polynomial accelerator, is equal to the number of matrix-vector products performed by the smoother. Is ignored if the smoother is not \fortinline|'POLY'|\\ \hline
& Degree of the polynomial accelerator, is equal to the number of matrix-vector products performed by the smoother. Ignored if the smoother is not \fortinline|'POLY'|\\ \hline
\end{tabular}
\end{center}
\caption{Parameters defining the smoother or the details of the one-level preconditioner.
+117
View File
@@ -0,0 +1,117 @@
cmake_minimum_required(VERSION 3.15)
project(AMGExamples Fortran)
# Installation directories (passed as CMake variables)
set(AMG4PSBLAS_INSTALL_DIR "" CACHE PATH "Path to AMG installation")
set(PSBLAS_INSTALL_DIR "" CACHE PATH "Path to PSBLAS installation")
# Check if installation directories are set
if(NOT AMG4PSBLAS_INSTALL_DIR)
message(FATAL_ERROR "AMG_INSTALL_DIR must be set. Use -DAMG_INSTALL_DIR=/path/to/amg when running CMake.")
endif()
if(NOT PSBLAS_INSTALL_DIR)
message(FATAL_ERROR "PSBLAS_INSTALL_DIR must be set. Use -DPSBLAS_INSTALL_DIR=/path/to/psblas when running CMake.")
endif()
find_package(psblas REQUIRED PATHS ${PSBLAS_INSTALL_DIR})
find_package(amg4psblas REQUIRED PATHS ${AMG4PSBLAS_INSTALL_DIR})
# Include directories
include_directories(
"."
"${AMG4PSBLAS_INSTALL_DIR}/include"
"${AMG4PSBLAS_INSTALL_DIR}/modules"
"${PSBLAS_INSTALL_DIR}/include"
)
# Fortran module directory
set(CMAKE_Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/modules")
set(FMFLAG "-I")
# Library directories
link_directories(
"${AMG4PSBLAS_INSTALL_DIR}/lib"
"${PSBLAS_INSTALL_DIR}/lib"
)
# Libraries
set(AMG_LIBS amg4psblas::amgprec)
set(PSBLAS_LIBS psblas::util psblas::linsolve psblas::prec psblas::base)
# Executable directory
set(EXEDIR "${CMAKE_CURRENT_BINARY_DIR}/runs")
file(MAKE_DIRECTORY "${EXEDIR}")
set(COMMON_SOURCE data_input.f90)
# Source files
set(DFSOBJS ${COMMON_SOURCE} amg_df_sample.f90)
set(SFSOBJS ${COMMON_SOURCE} amg_sf_sample.f90)
set(CFSOBJS ${COMMON_SOURCE} amg_cf_sample.f90)
set(ZFSOBJS ${COMMON_SOURCE} amg_zf_sample.f90)
# Function to create executable
macro(create_amg_executable target sources)
add_executable(${target} ${sources})
target_link_libraries(${target} PUBLIC
${AMG_LIBS}
${PSBLAS_LIBS}
)
# Move executable to EXEDIR (post-build)
#add_custom_command(TARGET ${target} POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E move $<TARGET_FILE:${target}> ${EXEDIR}
#)
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${EXEDIR}
)
endmacro()
# Create executables
create_amg_executable(amg_df_sample "${DFSOBJS}")
create_amg_executable(amg_sf_sample "${SFSOBJS}")
create_amg_executable(amg_cf_sample "${CFSOBJS}")
create_amg_executable(amg_zf_sample "${ZFSOBJS}")
# Create "runs" directory (if it doesn't exist)
add_custom_target(create_runs_dir
COMMAND ${CMAKE_COMMAND} -E make_directory "${EXEDIR}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Creating runs directory"
)
add_dependencies(amg_df_sample create_runs_dir)
add_dependencies(amg_sf_sample create_runs_dir)
add_dependencies(amg_cf_sample create_runs_dir)
add_dependencies(amg_zf_sample create_runs_dir)
# lib target
add_custom_target(lib
COMMAND ${CMAKE_COMMAND} -E chdir "../../" ${CMAKE_COMMAND} --build . --target library
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Building library"
)
# verycleanlib target
add_custom_target(verycleanlib
COMMAND ${CMAKE_COMMAND} -E chdir "../../" ${CMAKE_COMMAND} --build . --target veryclean
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Cleaning library"
)
# Install target (optional)
install(TARGETS
amg_sf_sample
amg_df_sample
amg_cf_sample
amg_zf_sample
DESTINATION bin
)
+3 -3
View File
@@ -342,7 +342,7 @@ program amg_cf_sample
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call distr_mtpart(ione*psb_root_,ctxt)
call getv_mtpart(ivg)
call psb_matdist(aux_a, a, ctxt,desc_a,info,fmt=afmt,vg=ivg)
case default
@@ -589,9 +589,9 @@ program amg_cf_sample
end if
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(x_col_glob,x_col,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
& call psb_gather(r_col_glob,r_col,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(psb_err_unit,'(" ")')
+3 -3
View File
@@ -342,7 +342,7 @@ program amg_df_sample
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call distr_mtpart(ione*psb_root_,ctxt)
call getv_mtpart(ivg)
call psb_matdist(aux_a, a, ctxt,desc_a,info,fmt=afmt,vg=ivg)
case default
@@ -589,9 +589,9 @@ program amg_df_sample
end if
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(x_col_glob,x_col,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
& call psb_gather(r_col_glob,r_col,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(psb_err_unit,'(" ")')
+3 -3
View File
@@ -342,7 +342,7 @@ program amg_sf_sample
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call distr_mtpart(ione*psb_root_,ctxt)
call getv_mtpart(ivg)
call psb_matdist(aux_a, a, ctxt,desc_a,info,fmt=afmt,vg=ivg)
case default
@@ -589,9 +589,9 @@ program amg_sf_sample
end if
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(x_col_glob,x_col,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
& call psb_gather(r_col_glob,r_col,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(psb_err_unit,'(" ")')
+3 -3
View File
@@ -342,7 +342,7 @@ program amg_zf_sample
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call distr_mtpart(ione*psb_root_,ctxt)
call getv_mtpart(ivg)
call psb_matdist(aux_a, a, ctxt,desc_a,info,fmt=afmt,vg=ivg)
case default
@@ -589,9 +589,9 @@ program amg_zf_sample
end if
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(x_col_glob,x_col,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
& call psb_gather(r_col_glob,r_col,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(psb_err_unit,'(" ")')
+229
View File
@@ -0,0 +1,229 @@
cmake_minimum_required(VERSION 3.15)
project(AMGExamples Fortran CXX)
# Installation directories (passed as CMake variables)
set(AMG4PSBLAS_INSTALL_DIR "" CACHE PATH "Path to AMG installation")
set(PSBLAS_INSTALL_DIR "" CACHE PATH "Path to PSBLAS installation")
# Check if installation directories are set
if(NOT AMG4PSBLAS_INSTALL_DIR)
message(FATAL_ERROR "AMG_INSTALL_DIR must be set. Use -DAMG_INSTALL_DIR=/path/to/amg when running CMake.")
endif()
if(NOT PSBLAS_INSTALL_DIR)
message(FATAL_ERROR "PSBLAS_INSTALL_DIR must be set. Use -DPSBLAS_INSTALL_DIR=/path/to/psblas when running CMake.")
endif()
find_package(psblas REQUIRED PATHS ${PSBLAS_INSTALL_DIR})
find_package(amg4psblas REQUIRED PATHS ${AMG4PSBLAS_INSTALL_DIR})
find_package(MPI REQUIRED Fortran CXX )
if(MPI_FOUND)
if( (MPI_CXX_LINK_FLAGS MATCHES "noexecstack") OR (MPI_Fortran_LINK_FLAGS MATCHES "noexecstack") )
message ( WARNING
"The `noexecstack` linker flag was found in the MPI_<lang>_LINK_FLAGS variable. This is
known to cause segmentation faults for some Fortran codes. See, e.g.,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71729 or
https://github.com/sourceryinstitute/OpenCoarrays/issues/317.
`noexecstack` is being replaced with `execstack`"
)
string(REPLACE "noexecstack"
"execstack" MPI_CXX_LINK_FLAGS_FIXED ${MPI_CXX_LINK_FLAGS})
string(REPLACE "noexecstack"
"execstack" MPI_C_LINK_FLAGS_FIXED ${MPI_C_LINK_FLAGS})
string(REPLACE "noexecstack"
"execstack" MPI_Fortran_LINK_FLAGS_FIXED ${MPI_Fortran_LINK_FLAGS})
set(MPI_CXX_LINK_FLAGS "${MPI_CXX_LINK_FLAGS_FIXED}" CACHE STRING
"MPI CXX linking flags" FORCE)
set(MPI_C_LINK_FLAGS "${MPI_C_LINK_FLAGS_FIXED}" CACHE STRING
"MPI C linking flags" FORCE)
set(MPI_Fortran_LINK_FLAGS "${MPI_Fortran_LINK_FLAGS_FIXED}" CACHE STRING
"MPI Fortran linking flags" FORCE)
endif()
message(STATUS "Found MPI: ${MPI_C_LIBRARIES} - ${MPI_CXX_LIBRARIES} - ${MPI_Fortran_LIBRARIES}")
#----------------
# Setup MPI compiler
#----------------
set(CMAKE_C_COMPILER ${MPI_C_COMPILER} CACHE FILEPATH "C compiler" FORCE)
set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER} CACHE FILEPATH "C++ compiler" FORCE)
set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER} CACHE FILEPATH "Fortran compiler" FORCE)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# Add -g to the Fortran compiler flags.
# We use STRING(APPEND) to ensure we don't overwrite other important flags.
string(APPEND CMAKE_Fortran_FLAGS " -g")
message(STATUS "Fortran debug flags added: -g")
endif()
# Include directories
include_directories(
"."
"${AMG4PSBLAS_INSTALL_DIR}/include"
"${AMG4PSBLAS_INSTALL_DIR}/modules"
"${PSBLAS_INSTALL_DIR}/include"
"${PSBLAS_INSTALL_DIR}/modules"
)
# Fortran module directory
set(CMAKE_Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/modules")
set(FMFLAG "-I")
# Library directories
link_directories(
"${AMG4PSBLAS_INSTALL_DIR}/lib"
"${PSBLAS_INSTALL_DIR}/lib"
)
# Libraries
set(AMG_LIBS amg4psblas::amgprec)
set(PSBLAS_LIBS psblas::util psblas::linsolve psblas::prec psblas::base)
# Executable directory
set(EXEDIR "${CMAKE_CURRENT_BINARY_DIR}/runs")
file(MAKE_DIRECTORY "${EXEDIR}")
set(COMMON_SOURCE data_input.f90)
# Source files
set(DFSOBJS ${COMMON_SOURCE} amg_df_sample.f90)
set(SFSOBJS ${COMMON_SOURCE} amg_sf_sample.f90)
set(CFSOBJS ${COMMON_SOURCE} amg_cf_sample.f90)
set(ZFSOBJS ${COMMON_SOURCE} amg_zf_sample.f90)
# Source files
set(DGEN2D
amg_d_pde2d_poisson_mod.f90
amg_d_pde2d_exp_mod.f90
amg_d_pde2d_gauss_mod.f90
amg_d_pde2d_box_mod.f90
)
set(DGEN3D
amg_d_pde3d_poisson_mod.f90
amg_d_pde3d_exp_mod.f90
amg_d_pde3d_gauss_mod.f90
amg_d_pde3d_box_mod.f90
)
set(SGEN2D
amg_s_pde2d_poisson_mod.f90
amg_s_pde2d_exp_mod.f90
amg_s_pde2d_gauss_mod.f90
amg_s_pde2d_box_mod.f90
)
set(SGEN3D
amg_s_pde3d_poisson_mod.f90
amg_s_pde3d_exp_mod.f90
amg_s_pde3d_gauss_mod.f90
amg_s_pde3d_box_mod.f90
)
# Define executables and their sources
set(amg_d_pde3d_SOURCES
${COMMON_SOURCE}
amg_d_pde3d.F90
amg_d_genpde_mod.F90
${DGEN3D}
)
set(amg_s_pde3d_SOURCES
${COMMON_SOURCE}
amg_s_pde3d.F90
amg_s_genpde_mod.F90
${SGEN3D}
)
set(amg_d_pde2d_SOURCES
${COMMON_SOURCE}
amg_d_pde2d.F90
amg_d_genpde_mod.F90
${DGEN2D}
)
set(amg_s_pde2d_SOURCES
${COMMON_SOURCE}
amg_s_pde2d.F90
amg_s_genpde_mod.F90
${SGEN2D}
)
# Function to create executable
function(create_amg_executable target sources)
add_executable(${target} ${sources})
target_link_libraries(${target} PUBLIC
${AMG_LIBS}
${PSBLAS_LIBS}
${MPI_LIBRARIES}
)
# Move executable to EXEDIR (post-build)
#add_custom_command(TARGET ${target} POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E move $<TARGET_FILE:${target}> ${EXEDIR}
#)
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${EXEDIR}
LINKER_LANGUAGE Fortran
)
endfunction()
# Create executables
create_amg_executable(amg_d_pde3d "${amg_d_pde3d_SOURCES}")
create_amg_executable(amg_s_pde3d "${amg_s_pde3d_SOURCES}")
create_amg_executable(amg_d_pde2d "${amg_d_pde2d_SOURCES}")
create_amg_executable(amg_s_pde2d "${amg_s_pde2d_SOURCES}")
# Create "runs" directory (if it doesn't exist)
add_custom_target(create_runs_dir
COMMAND ${CMAKE_COMMAND} -E make_directory "${EXEDIR}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Creating runs directory"
)
add_dependencies(amg_d_pde3d create_runs_dir)
add_dependencies(amg_s_pde3d create_runs_dir)
add_dependencies(amg_d_pde2d create_runs_dir)
add_dependencies(amg_s_pde2d create_runs_dir)
# lib target
add_custom_target(lib
COMMAND ${CMAKE_COMMAND} -E chdir "../../" ${CMAKE_COMMAND} --build . --target library
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Building library"
)
# verycleanlib target
add_custom_target(verycleanlib
COMMAND ${CMAKE_COMMAND} -E chdir "../../" ${CMAKE_COMMAND} --build . --target veryclean
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Cleaning library"
)
# Check target (simulated)
add_custom_target(check
COMMAND ${CMAKE_COMMAND} -E chdir "${EXEDIR}" "${EXEDIR}/amg_d_pde2d" < "amg_pde2d.inp"
COMMAND ${CMAKE_COMMAND} -E chdir "${EXEDIR}" "${EXEDIR}/amg_s_pde2d" < "amg_pde2d.inp"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS amg_d_pde2d amg_s_pde2d
COMMENT "Running check"
)
# Install target (optional)
install(TARGETS
amg_d_pde3d
amg_s_pde3d
amg_d_pde2d
amg_s_pde2d
DESTINATION bin
)
+20 -14
View File
@@ -227,6 +227,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -254,6 +255,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -273,7 +275,7 @@ contains
allocate(bndx(0:npx),bndy(0:npy),bndz(0:npz))
! We can reuse idx2ijk for process indices as well.
call idx2ijk(iamx,iamy,iamz,iam,npx,npy,npz,base=0)
call idx2ijk(iamx,iamy,iamz,iam,npx,npy,npz,base=mzero)
! Now let's split the 3D cube in hexahedra
call dist1Didx(bndx,idim,npx)
mynx = bndx(iamx+1)-bndx(iamx)
@@ -308,6 +310,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -316,7 +319,7 @@ contains
!
! Use adjcncy methods
!
integer(psb_mpk_), allocatable :: neighbours(:)
integer(psb_ipk_), allocatable :: neighbours(:)
integer(psb_mpk_) :: cnt
logical, parameter :: debug_adj=.true.
if (debug_adj.and.(np > 1)) then
@@ -324,27 +327,27 @@ contains
allocate(neighbours(np))
if (iamx < npx-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx+1,iamy,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx+1,iamy,iamz,npx,npy,npz,base=mzero)
end if
if (iamy < npy-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy+1,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy+1,iamz,npx,npy,npz,base=mzero)
end if
if (iamz < npz-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy,iamz+1,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy,iamz+1,npx,npy,npz,base=mzero)
end if
if (iamx >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx-1,iamy,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx-1,iamy,iamz,npx,npy,npz,base=mzero)
end if
if (iamy >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy-1,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy-1,iamz,npx,npy,npz,base=mzero)
end if
if (iamz >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy,iamz-1,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy,iamz-1,npx,npy,npz,base=mzero)
end if
call psb_realloc(cnt, neighbours,info)
call desc_a%set_p_adjcncy(neighbours)
@@ -691,6 +694,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -718,6 +722,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -736,7 +741,7 @@ contains
allocate(bndx(0:npx),bndy(0:npy))
! We can reuse idx2ijk for process indices as well.
call idx2ijk(iamx,iamy,iam,npx,npy,base=0)
call idx2ijk(iamx,iamy,iam,npx,npy,base=mzero)
! Now let's split the 2D square in rectangles
call dist1Didx(bndx,idim,npx)
mynx = bndx(iamx+1)-bndx(iamx)
@@ -767,6 +772,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -775,7 +781,7 @@ contains
!
! Use adjcncy methods
!
integer(psb_mpk_), allocatable :: neighbours(:)
integer(psb_ipk_), allocatable :: neighbours(:)
integer(psb_mpk_) :: cnt
logical, parameter :: debug_adj=.true.
if (debug_adj.and.(np > 1)) then
@@ -783,19 +789,19 @@ contains
allocate(neighbours(np))
if (iamx < npx-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx+1,iamy,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx+1,iamy,npx,npy,base=mzero)
end if
if (iamy < npy-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy+1,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy+1,npx,npy,base=mzero)
end if
if (iamx >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx-1,iamy,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx-1,iamy,npx,npy,base=mzero)
end if
if (iamy >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy-1,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy-1,npx,npy,base=mzero)
end if
call psb_realloc(cnt, neighbours,info)
call desc_a%set_p_adjcncy(neighbours)
+12 -11
View File
@@ -87,7 +87,7 @@ program amg_d_pde2d
integer(psb_epk_) :: system_size
! miscellaneous
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: t1, t2, tprec, thier, tslv, tsmth, tpgen
! sparse matrix and preconditioner
type(psb_dspmat_type) :: a
@@ -283,7 +283,7 @@ program amg_d_pde2d
goto 9999
end select
call psb_barrier(ctxt)
t2 = psb_wtime() - t1
tpgen = psb_wtime() - t1
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='amg_gen_pde2d'
@@ -294,7 +294,7 @@ program amg_d_pde2d
if (iam == psb_root_) &
& write(psb_out_unit,'("PDE Coefficients : ",a)')pdecoeff
if (iam == psb_root_) &
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')t2
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')tpgen
if (iam == psb_root_) &
& write(psb_out_unit,'(" ")')
!
@@ -469,7 +469,7 @@ program amg_d_pde2d
call psb_barrier(ctxt)
t1 = psb_wtime()
call prec%smoothers_build(a,desc_a,info)
tprec = psb_wtime()-t1
tsmth = psb_wtime()-t1
if (info /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_smoothers_bld')
goto 9999
@@ -554,24 +554,25 @@ program amg_d_pde2d
write(psb_out_unit,'("Discretization domain size : ",i12)') idim
write(psb_out_unit,'("Linear system size : ",i12)') system_size
write(psb_out_unit,'("PDE Coefficients : ",a)') trim(pdecoeff)
write(psb_out_unit,'("Problem setup time : ",es12.5)') tpgen
write(psb_out_unit,'("Krylov method : ",a)') trim(s_choice%kmethd)
write(psb_out_unit,'("Preconditioner : ",a)') trim(p_choice%descr)
write(psb_out_unit,'("Iterations to convergence : ",i12)') iter
write(psb_out_unit,'("Relative error estimate on exit : ",es12.5)') err
write(psb_out_unit,'("Number of levels in hierarchy : ",i12)') prec%get_nlevs()
write(psb_out_unit,'("Time to build hierarchy : ",es12.5)') thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tprec
write(psb_out_unit,'("Total time for preconditioner : ",es12.5)') tprec+thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tsmth
write(psb_out_unit,'("Total preconditioner setup time : ",es12.5)') tsmth+thier
write(psb_out_unit,'("Time to solve system : ",es12.5)') tslv
write(psb_out_unit,'("Time per iteration : ",es12.5)') tslv/iter
write(psb_out_unit,'("Total time : ",es12.5)') tslv+tprec+thier
write(psb_out_unit,'("Residual 2-norm : ",es12.5)') resmx
write(psb_out_unit,'("Residual inf-norm : ",es12.5)') resmxp
write(psb_out_unit,'("Total memory occupation for X : ",i12)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i12)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i12)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)') precsize
write(psb_out_unit,'("Total memory occupation : ",i12)') &
write(psb_out_unit,'("Total memory occupation for X : ",i16)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i16)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i16)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i16)') precsize
write(psb_out_unit,'("Total memory occupation : ",i16)') &
& amatsize + descsize+precsize+2*vecsize
write(psb_out_unit,'("Storage format for A : ",a )') a%get_fmt()
write(psb_out_unit,'("Storage format for DESC_A : ",a )') desc_a%get_fmt()
+13 -12
View File
@@ -88,7 +88,7 @@ program amg_d_pde3d
integer(psb_epk_) :: system_size
! miscellaneous
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: t1, t2, tprec, thier, tslv, tsmth, tpgen
! sparse matrix and preconditioner
type(psb_dspmat_type) :: a
@@ -287,7 +287,7 @@ program amg_d_pde3d
call psb_barrier(ctxt)
t2 = psb_wtime() - t1
tpgen = psb_wtime() - t1
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='amg_gen_pde3d'
@@ -298,7 +298,7 @@ program amg_d_pde3d
if (iam == psb_root_) &
& write(psb_out_unit,'("PDE Coefficients : ",a)')pdecoeff
if (iam == psb_root_) &
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')t2
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')tpgen
if (iam == psb_root_) &
& write(psb_out_unit,'(" ")')
!
@@ -473,7 +473,7 @@ program amg_d_pde3d
call psb_barrier(ctxt)
t1 = psb_wtime()
call prec%smoothers_build(a,desc_a,info)
tprec = psb_wtime()-t1
tsmth = psb_wtime()-t1
if (info /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_smoothers_bld')
goto 9999
@@ -558,30 +558,31 @@ program amg_d_pde3d
write(psb_out_unit,'("Discretization domain size : ",i12)') idim
write(psb_out_unit,'("Linear system size : ",i12)') system_size
write(psb_out_unit,'("PDE Coefficients : ",a)') trim(pdecoeff)
write(psb_out_unit,'("Problem setup time : ",es12.5)') tpgen
write(psb_out_unit,'("Krylov method : ",a)') trim(s_choice%kmethd)
write(psb_out_unit,'("Preconditioner : ",a)') trim(p_choice%descr)
write(psb_out_unit,'("Iterations to convergence : ",i12)') iter
write(psb_out_unit,'("Relative error estimate on exit : ",es12.5)') err
write(psb_out_unit,'("Number of levels in hierarchy : ",i12)') prec%get_nlevs()
write(psb_out_unit,'("Time to build hierarchy : ",es12.5)') thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tprec
write(psb_out_unit,'("Total time for preconditioner : ",es12.5)') tprec+thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tsmth
write(psb_out_unit,'("Total preconditioner setup time : ",es12.5)') tsmth+thier
write(psb_out_unit,'("Time to solve system : ",es12.5)') tslv
write(psb_out_unit,'("Time per iteration : ",es12.5)') tslv/iter
write(psb_out_unit,'("Total time : ",es12.5)') tslv+tprec+thier
write(psb_out_unit,'("Residual 2-norm : ",es12.5)') resmx
write(psb_out_unit,'("Residual inf-norm : ",es12.5)') resmxp
write(psb_out_unit,'("Total memory occupation for X : ",i12)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i12)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i12)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)') precsize
write(psb_out_unit,'("Total memory occupation : ",i12)') &
write(psb_out_unit,'("Total memory occupation for X : ",i16)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i16)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i16)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i16)') precsize
write(psb_out_unit,'("Total memory occupation : ",i16)') &
& amatsize + descsize+precsize+2*vecsize
write(psb_out_unit,'("Storage format for A : ",a )') a%get_fmt()
write(psb_out_unit,'("Storage format for DESC_A : ",a )') desc_a%get_fmt()
end if
call psb_print_timers(ctxt)
! call psb_print_timers(ctxt)
!
! cleanup storage and exit
!
+20 -14
View File
@@ -227,6 +227,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -254,6 +255,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -273,7 +275,7 @@ contains
allocate(bndx(0:npx),bndy(0:npy),bndz(0:npz))
! We can reuse idx2ijk for process indices as well.
call idx2ijk(iamx,iamy,iamz,iam,npx,npy,npz,base=0)
call idx2ijk(iamx,iamy,iamz,iam,npx,npy,npz,base=mzero)
! Now let's split the 3D cube in hexahedra
call dist1Didx(bndx,idim,npx)
mynx = bndx(iamx+1)-bndx(iamx)
@@ -308,6 +310,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -316,7 +319,7 @@ contains
!
! Use adjcncy methods
!
integer(psb_mpk_), allocatable :: neighbours(:)
integer(psb_ipk_), allocatable :: neighbours(:)
integer(psb_mpk_) :: cnt
logical, parameter :: debug_adj=.true.
if (debug_adj.and.(np > 1)) then
@@ -324,27 +327,27 @@ contains
allocate(neighbours(np))
if (iamx < npx-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx+1,iamy,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx+1,iamy,iamz,npx,npy,npz,base=mzero)
end if
if (iamy < npy-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy+1,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy+1,iamz,npx,npy,npz,base=mzero)
end if
if (iamz < npz-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy,iamz+1,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy,iamz+1,npx,npy,npz,base=mzero)
end if
if (iamx >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx-1,iamy,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx-1,iamy,iamz,npx,npy,npz,base=mzero)
end if
if (iamy >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy-1,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy-1,iamz,npx,npy,npz,base=mzero)
end if
if (iamz >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy,iamz-1,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy,iamz-1,npx,npy,npz,base=mzero)
end if
call psb_realloc(cnt, neighbours,info)
call desc_a%set_p_adjcncy(neighbours)
@@ -691,6 +694,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -718,6 +722,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -736,7 +741,7 @@ contains
allocate(bndx(0:npx),bndy(0:npy))
! We can reuse idx2ijk for process indices as well.
call idx2ijk(iamx,iamy,iam,npx,npy,base=0)
call idx2ijk(iamx,iamy,iam,npx,npy,base=mzero)
! Now let's split the 2D square in rectangles
call dist1Didx(bndx,idim,npx)
mynx = bndx(iamx+1)-bndx(iamx)
@@ -767,6 +772,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -775,7 +781,7 @@ contains
!
! Use adjcncy methods
!
integer(psb_mpk_), allocatable :: neighbours(:)
integer(psb_ipk_), allocatable :: neighbours(:)
integer(psb_mpk_) :: cnt
logical, parameter :: debug_adj=.true.
if (debug_adj.and.(np > 1)) then
@@ -783,19 +789,19 @@ contains
allocate(neighbours(np))
if (iamx < npx-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx+1,iamy,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx+1,iamy,npx,npy,base=mzero)
end if
if (iamy < npy-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy+1,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy+1,npx,npy,base=mzero)
end if
if (iamx >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx-1,iamy,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx-1,iamy,npx,npy,base=mzero)
end if
if (iamy >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy-1,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy-1,npx,npy,base=mzero)
end if
call psb_realloc(cnt, neighbours,info)
call desc_a%set_p_adjcncy(neighbours)
+12 -11
View File
@@ -87,7 +87,7 @@ program amg_s_pde2d
integer(psb_epk_) :: system_size
! miscellaneous
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: t1, t2, tprec, thier, tslv, tsmth, tpgen
! sparse matrix and preconditioner
type(psb_sspmat_type) :: a
@@ -283,7 +283,7 @@ program amg_s_pde2d
goto 9999
end select
call psb_barrier(ctxt)
t2 = psb_wtime() - t1
tpgen = psb_wtime() - t1
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='amg_gen_pde2d'
@@ -294,7 +294,7 @@ program amg_s_pde2d
if (iam == psb_root_) &
& write(psb_out_unit,'("PDE Coefficients : ",a)')pdecoeff
if (iam == psb_root_) &
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')t2
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')tpgen
if (iam == psb_root_) &
& write(psb_out_unit,'(" ")')
!
@@ -469,7 +469,7 @@ program amg_s_pde2d
call psb_barrier(ctxt)
t1 = psb_wtime()
call prec%smoothers_build(a,desc_a,info)
tprec = psb_wtime()-t1
tsmth = psb_wtime()-t1
if (info /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_smoothers_bld')
goto 9999
@@ -554,24 +554,25 @@ program amg_s_pde2d
write(psb_out_unit,'("Discretization domain size : ",i12)') idim
write(psb_out_unit,'("Linear system size : ",i12)') system_size
write(psb_out_unit,'("PDE Coefficients : ",a)') trim(pdecoeff)
write(psb_out_unit,'("Problem setup time : ",es12.5)') tpgen
write(psb_out_unit,'("Krylov method : ",a)') trim(s_choice%kmethd)
write(psb_out_unit,'("Preconditioner : ",a)') trim(p_choice%descr)
write(psb_out_unit,'("Iterations to convergence : ",i12)') iter
write(psb_out_unit,'("Relative error estimate on exit : ",es12.5)') err
write(psb_out_unit,'("Number of levels in hierarchy : ",i12)') prec%get_nlevs()
write(psb_out_unit,'("Time to build hierarchy : ",es12.5)') thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tprec
write(psb_out_unit,'("Total time for preconditioner : ",es12.5)') tprec+thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tsmth
write(psb_out_unit,'("Total preconditioner setup time : ",es12.5)') tsmth+thier
write(psb_out_unit,'("Time to solve system : ",es12.5)') tslv
write(psb_out_unit,'("Time per iteration : ",es12.5)') tslv/iter
write(psb_out_unit,'("Total time : ",es12.5)') tslv+tprec+thier
write(psb_out_unit,'("Residual 2-norm : ",es12.5)') resmx
write(psb_out_unit,'("Residual inf-norm : ",es12.5)') resmxp
write(psb_out_unit,'("Total memory occupation for X : ",i12)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i12)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i12)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)') precsize
write(psb_out_unit,'("Total memory occupation : ",i12)') &
write(psb_out_unit,'("Total memory occupation for X : ",i16)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i16)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i16)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i16)') precsize
write(psb_out_unit,'("Total memory occupation : ",i16)') &
& amatsize + descsize+precsize+2*vecsize
write(psb_out_unit,'("Storage format for A : ",a )') a%get_fmt()
write(psb_out_unit,'("Storage format for DESC_A : ",a )') desc_a%get_fmt()
+13 -12
View File
@@ -88,7 +88,7 @@ program amg_s_pde3d
integer(psb_epk_) :: system_size
! miscellaneous
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: t1, t2, tprec, thier, tslv, tsmth, tpgen
! sparse matrix and preconditioner
type(psb_sspmat_type) :: a
@@ -287,7 +287,7 @@ program amg_s_pde3d
call psb_barrier(ctxt)
t2 = psb_wtime() - t1
tpgen = psb_wtime() - t1
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='amg_gen_pde3d'
@@ -298,7 +298,7 @@ program amg_s_pde3d
if (iam == psb_root_) &
& write(psb_out_unit,'("PDE Coefficients : ",a)')pdecoeff
if (iam == psb_root_) &
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')t2
& write(psb_out_unit,'("Overall matrix creation time : ",es12.5)')tpgen
if (iam == psb_root_) &
& write(psb_out_unit,'(" ")')
!
@@ -473,7 +473,7 @@ program amg_s_pde3d
call psb_barrier(ctxt)
t1 = psb_wtime()
call prec%smoothers_build(a,desc_a,info)
tprec = psb_wtime()-t1
tsmth = psb_wtime()-t1
if (info /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_smoothers_bld')
goto 9999
@@ -558,30 +558,31 @@ program amg_s_pde3d
write(psb_out_unit,'("Discretization domain size : ",i12)') idim
write(psb_out_unit,'("Linear system size : ",i12)') system_size
write(psb_out_unit,'("PDE Coefficients : ",a)') trim(pdecoeff)
write(psb_out_unit,'("Problem setup time : ",es12.5)') tpgen
write(psb_out_unit,'("Krylov method : ",a)') trim(s_choice%kmethd)
write(psb_out_unit,'("Preconditioner : ",a)') trim(p_choice%descr)
write(psb_out_unit,'("Iterations to convergence : ",i12)') iter
write(psb_out_unit,'("Relative error estimate on exit : ",es12.5)') err
write(psb_out_unit,'("Number of levels in hierarchy : ",i12)') prec%get_nlevs()
write(psb_out_unit,'("Time to build hierarchy : ",es12.5)') thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tprec
write(psb_out_unit,'("Total time for preconditioner : ",es12.5)') tprec+thier
write(psb_out_unit,'("Time to build smoothers : ",es12.5)') tsmth
write(psb_out_unit,'("Total preconditioner setup time : ",es12.5)') tsmth+thier
write(psb_out_unit,'("Time to solve system : ",es12.5)') tslv
write(psb_out_unit,'("Time per iteration : ",es12.5)') tslv/iter
write(psb_out_unit,'("Total time : ",es12.5)') tslv+tprec+thier
write(psb_out_unit,'("Residual 2-norm : ",es12.5)') resmx
write(psb_out_unit,'("Residual inf-norm : ",es12.5)') resmxp
write(psb_out_unit,'("Total memory occupation for X : ",i12)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i12)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i12)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)') precsize
write(psb_out_unit,'("Total memory occupation : ",i12)') &
write(psb_out_unit,'("Total memory occupation for X : ",i16)') vecsize
write(psb_out_unit,'("Total memory occupation for A : ",i16)') amatsize
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i16)') descsize
write(psb_out_unit,'("Total memory occupation for PREC : ",i16)') precsize
write(psb_out_unit,'("Total memory occupation : ",i16)') &
& amatsize + descsize+precsize+2*vecsize
write(psb_out_unit,'("Storage format for A : ",a )') a%get_fmt()
write(psb_out_unit,'("Storage format for DESC_A : ",a )') desc_a%get_fmt()
end if
call psb_print_timers(ctxt)
! call psb_print_timers(ctxt)
!
! cleanup storage and exit
!
+4 -3
View File
@@ -55,15 +55,16 @@ subroutine amg_d_tlu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
type(psb_dspmat_type), intent(in), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_tlu_solver_type), intent(inout) :: sv
integer, intent(out) :: info
integer(psb_ipk_), intent(out) :: info
type(psb_dspmat_type), intent(in), target, optional :: b
class(psb_d_base_sparse_mat), intent(in), optional :: amold
class(psb_d_base_vect_type), intent(in), optional :: vmold
class(psb_i_base_vect_type), intent(in), optional :: imold
! Local variables
integer :: n_row,n_col, nrow_a, nztota
integer :: np,me,i, err_act, debug_unit, debug_level
integer(psb_ipk_) :: n_row, n_col, nrow_a, nztota
integer(psb_ipk_) :: np,me
integer(psb_ipk_) :: i, err_act, debug_unit, debug_level
type(psb_ctxt_type) :: ctxt
character(len=20) :: name='d_tlu_solver_bld', ch_err
+15 -15
View File
@@ -330,7 +330,7 @@ contains
allocate(bndx(0:npx),bndy(0:npy),bndz(0:npz))
! We can reuse idx2ijk for process indices as well.
call idx2ijk(iamx,iamy,iamz,iam,npx,npy,npz,base=0)
call idx2ijk(iamx,iamy,iamz,iam,npx,npy,npz,base=mzero)
! Now let's split the 3D cube in hexahedra
call dist1Didx(bndx,idim,npx)
mynx = bndx(iamx+1)-bndx(iamx)
@@ -373,7 +373,7 @@ contains
!
! Use adjcncy methods
!
integer(psb_mpk_), allocatable :: neighbours(:)
integer(psb_ipk_), allocatable :: neighbours(:)
integer(psb_mpk_) :: cnt
logical, parameter :: debug_adj=.true.
if (debug_adj.and.(np > 1)) then
@@ -381,27 +381,27 @@ contains
allocate(neighbours(np))
if (iamx < npx-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx+1,iamy,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx+1,iamy,iamz,npx,npy,npz,base=mzero)
end if
if (iamy < npy-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy+1,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy+1,iamz,npx,npy,npz,base=mzero)
end if
if (iamz < npz-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy,iamz+1,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy,iamz+1,npx,npy,npz,base=mzero)
end if
if (iamx >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx-1,iamy,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx-1,iamy,iamz,npx,npy,npz,base=mzero)
end if
if (iamy >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy-1,iamz,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy-1,iamz,npx,npy,npz,base=mzero)
end if
if (iamz >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy,iamz-1,npx,npy,npz,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy,iamz-1,npx,npy,npz,base=mzero)
end if
call psb_realloc(cnt, neighbours,info)
call desc_a%set_p_adjcncy(neighbours)
@@ -780,7 +780,7 @@ contains
allocate(bndx(0:npx),bndy(0:npy))
! We can reuse idx2ijk for process indices as well.
call idx2ijk(iamx,iamy,iam,npx,npy,base=0)
call idx2ijk(iamx,iamy,iam,npx,npy,base=mzero)
! Now let's split the 2D square in rectangles
call dist1Didx(bndx,idim,npx)
mynx = bndx(iamx+1)-bndx(iamx)
@@ -819,7 +819,7 @@ contains
!
! Use adjcncy methods
!
integer(psb_mpk_), allocatable :: neighbours(:)
integer(psb_ipk_), allocatable :: neighbours(:)
integer(psb_mpk_) :: cnt
logical, parameter :: debug_adj=.true.
if (debug_adj.and.(np > 1)) then
@@ -827,19 +827,19 @@ contains
allocate(neighbours(np))
if (iamx < npx-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx+1,iamy,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx+1,iamy,npx,npy,base=mzero)
end if
if (iamy < npy-1) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy+1,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy+1,npx,npy,base=mzero)
end if
if (iamx >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx-1,iamy,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx-1,iamy,npx,npy,base=mzero)
end if
if (iamy >0) then
cnt = cnt + 1
call ijk2idx(neighbours(cnt),iamx,iamy-1,npx,npy,base=0)
call ijk2idx(neighbours(cnt),iamx,iamy-1,npx,npy,base=mzero)
end if
call psb_realloc(cnt, neighbours,info)
call desc_a%set_p_adjcncy(neighbours)
@@ -1144,7 +1144,7 @@ program amg_d_pde3d
end if
thier = psb_wtime()-t1
nlv = prec%get_nlevs()
call prec%set(tlusv, info,ilev=1,ilmax=max(1,nlv-1))
call prec%set(tlusv, info,ilev=1_psb_ipk_,ilmax=ione*max(1,nlv-1))
call psb_barrier(ctxt)
t1 = psb_wtime()
+129
View File
@@ -0,0 +1,129 @@
cmake_minimum_required(VERSION 3.15)
project(AMGExamples Fortran)
# Installation directories (passed as CMake variables)
set(AMG4PSBLAS_INSTALL_DIR "" CACHE PATH "Path to AMG installation")
set(PSBLAS_INSTALL_DIR "" CACHE PATH "Path to PSBLAS installation")
# Check if installation directories are set
if(NOT AMG4PSBLAS_INSTALL_DIR)
message(FATAL_ERROR "AMG_INSTALL_DIR must be set. Use -DAMG_INSTALL_DIR=/path/to/amg when running CMake.")
endif()
if(NOT PSBLAS_INSTALL_DIR)
message(FATAL_ERROR "PSBLAS_INSTALL_DIR must be set. Use -DPSBLAS_INSTALL_DIR=/path/to/psblas when running CMake.")
endif()
find_package(psblas REQUIRED PATHS ${PSBLAS_INSTALL_DIR})
find_package(amg4psblas REQUIRED PATHS ${AMG4PSBLAS_INSTALL_DIR})
# Include directories
include_directories(
"."
"${AMG4PSBLAS_INSTALL_DIR}/include"
"${AMG4PSBLAS_INSTALL_DIR}/modules"
"${PSBLAS_INSTALL_DIR}/include"
)
# Fortran module directory
set(CMAKE_Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/modules")
set(FMFLAG "-I")
# Library directories
link_directories(
"${AMG4PSBLAS_INSTALL_DIR}/lib"
"${PSBLAS_INSTALL_DIR}/lib"
)
# Libraries
set(AMG_LIBS amg4psblas::amgprec)
set(PSBLAS_LIBS psblas::util psblas::linsolve psblas::prec psblas::base)
# Executable directory
set(EXEDIR "${CMAKE_CURRENT_BINARY_DIR}/runs")
file(MAKE_DIRECTORY "${EXEDIR}")
set(COMMON_SOURCE data_input.f90)
# Source files
set(DMOBJS ${COMMON_SOURCE} amg_dexample_ml.f90)
set(D1OBJS ${COMMON_SOURCE} amg_dexample_1lev.f90)
set(ZMOBJS ${COMMON_SOURCE} amg_zexample_ml.f90)
set(Z1OBJS ${COMMON_SOURCE} amg_zexample_1lev.f90)
set(SMOBJS ${COMMON_SOURCE} amg_sexample_ml.f90)
set(S1OBJS ${COMMON_SOURCE} amg_sexample_1lev.f90)
set(CMOBJS ${COMMON_SOURCE} amg_cexample_ml.f90)
set(C1OBJS ${COMMON_SOURCE} amg_cexample_1lev.f90)
# Function to create executable
macro(create_amg_executable target sources)
add_executable(${target} ${sources})
target_link_libraries(${target} PUBLIC
${AMG_LIBS}
${PSBLAS_LIBS}
)
# Move executable to EXEDIR (post-build)
#add_custom_command(TARGET ${target} POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E move $<TARGET_FILE:${target}> ${EXEDIR}
#)
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${EXEDIR}
)
endmacro()
# Create executables
create_amg_executable(amg_dexample_ml "${DMOBJS}")
create_amg_executable(amg_dexample_1lev "${D1OBJS}")
create_amg_executable(amg_zexample_ml "${ZMOBJS}")
create_amg_executable(amg_zexample_1lev "${Z1OBJS}")
create_amg_executable(amg_sexample_ml "${SMOBJS}")
create_amg_executable(amg_sexample_1lev "${S1OBJS}")
create_amg_executable(amg_cexample_ml "${CMOBJS}")
create_amg_executable(amg_cexample_1lev "${C1OBJS}")
# Create "runs" directory (if it doesn't exist)
add_custom_target(create_runs_dir
COMMAND ${CMAKE_COMMAND} -E make_directory "${EXEDIR}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Creating runs directory"
)
add_dependencies(amg_dexample_ml create_runs_dir)
add_dependencies(amg_dexample_1lev create_runs_dir)
add_dependencies(amg_zexample_ml create_runs_dir)
add_dependencies(amg_zexample_1lev create_runs_dir)
add_dependencies(amg_sexample_ml create_runs_dir)
add_dependencies(amg_sexample_1lev create_runs_dir)
add_dependencies(amg_cexample_ml create_runs_dir)
add_dependencies(amg_cexample_1lev create_runs_dir)
# lib target
add_custom_target(lib
COMMAND ${CMAKE_COMMAND} -E chdir "../../" ${CMAKE_COMMAND} --build . --target library
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Building library"
)
# verycleanlib target
add_custom_target(verycleanlib
COMMAND ${CMAKE_COMMAND} -E chdir "../../" ${CMAKE_COMMAND} --build . --target veryclean
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Cleaning library"
)
# Install target (optional)
install(TARGETS
amg_dexample_ml
amg_dexample_1lev
amg_zexample_ml
amg_zexample_1lev
amg_sexample_ml
amg_sexample_1lev
amg_cexample_ml
amg_cexample_1lev
DESTINATION bin
)
+17 -16
View File
@@ -73,21 +73,21 @@ program amg_cexample_1lev
! solver and preconditioner parameters
real(psb_spk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: i,info,j,m_problem
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_spk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name, kmethod
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -103,7 +103,7 @@ program amg_cexample_1lev
name='amg_cexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -152,14 +152,14 @@ program amg_cexample_1lev
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -177,7 +177,7 @@ program amg_cexample_1lev
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -198,7 +198,7 @@ program amg_cexample_1lev
! set number of overlaps
call P%set('SUB_OVR',2,info)
call P%set('SUB_OVR',itwo,info)
! build the preconditioner
@@ -226,7 +226,7 @@ program amg_cexample_1lev
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -263,9 +263,9 @@ program amg_cexample_1lev
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -306,10 +306,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: itmax
integer(psb_ipk_) :: itmax
real(psb_spk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)
+20 -19
View File
@@ -89,23 +89,23 @@ program amg_cexample_ml
! solver and preconditioner parameters
real(psb_spk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: choice
integer :: i,info,j,m_problem
integer(psb_ipk_) :: choice
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_spk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name
character(len=20), parameter :: kmethod='FCG'
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -121,7 +121,7 @@ program amg_cexample_ml
name='amg_cexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -170,14 +170,14 @@ program amg_cexample_ml
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -195,7 +195,7 @@ program amg_cexample_ml
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -228,7 +228,7 @@ program amg_cexample_ml
call P%set('SMOOTHER_TYPE','BJAC',info)
call P%set('COARSE_SOLVE','BJAC',info)
call P%set('COARSE_SUBSOLVE','ILU',info)
call P%set('COARSE_SWEEPS',8,info)
call P%set('COARSE_SWEEPS',8_psb_ipk_,info)
case(3)
@@ -241,9 +241,9 @@ program amg_cexample_ml
call P%init(ctxt,'ML',info)
call P%set('PAR_AGGR_ALG','COUPLED',info)
call P%set('AGGR_TYPE','MATCHBOXP',info)
call P%set('AGGR_SIZE',8,info)
call P%set('AGGR_SIZE',8_psb_ipk_,info)
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('SMOOTHER_SWEEPS',itwo,info)
call P%set('COARSE_SOLVE','KRM',info)
call P%set('COARSE_MAT','DIST',info)
call P%set('KRM_METHOD','FCG',info)
@@ -275,7 +275,7 @@ program amg_cexample_ml
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=1,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=ione,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -313,9 +313,9 @@ program amg_cexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -356,10 +356,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: choice, itmax
integer(psb_ipk_) :: choice, itmax
real(psb_spk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)
+17 -16
View File
@@ -73,21 +73,21 @@ program amg_dexample_1lev
! solver and preconditioner parameters
real(psb_dpk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: i,info,j,m_problem
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_dpk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name, kmethod
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -103,7 +103,7 @@ program amg_dexample_1lev
name='amg_dexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -152,14 +152,14 @@ program amg_dexample_1lev
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -177,7 +177,7 @@ program amg_dexample_1lev
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -198,7 +198,7 @@ program amg_dexample_1lev
! set number of overlaps
call P%set('SUB_OVR',2,info)
call P%set('SUB_OVR',itwo,info)
! build the preconditioner
@@ -226,7 +226,7 @@ program amg_dexample_1lev
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -263,9 +263,9 @@ program amg_dexample_1lev
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -306,10 +306,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: itmax
integer(psb_ipk_) :: itmax
real(psb_dpk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)
+20 -19
View File
@@ -89,23 +89,23 @@ program amg_dexample_ml
! solver and preconditioner parameters
real(psb_dpk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: choice
integer :: i,info,j,m_problem
integer(psb_ipk_) :: choice
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_dpk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name
character(len=20), parameter :: kmethod='FCG'
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -121,7 +121,7 @@ program amg_dexample_ml
name='amg_dexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -170,14 +170,14 @@ program amg_dexample_ml
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -195,7 +195,7 @@ program amg_dexample_ml
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -228,7 +228,7 @@ program amg_dexample_ml
call P%set('SMOOTHER_TYPE','BJAC',info)
call P%set('COARSE_SOLVE','BJAC',info)
call P%set('COARSE_SUBSOLVE','ILU',info)
call P%set('COARSE_SWEEPS',8,info)
call P%set('COARSE_SWEEPS',8_psb_ipk_,info)
case(3)
@@ -241,9 +241,9 @@ program amg_dexample_ml
call P%init(ctxt,'ML',info)
call P%set('PAR_AGGR_ALG','COUPLED',info)
call P%set('AGGR_TYPE','MATCHBOXP',info)
call P%set('AGGR_SIZE',8,info)
call P%set('AGGR_SIZE',8_psb_ipk_,info)
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('SMOOTHER_SWEEPS',itwo,info)
call P%set('COARSE_SOLVE','KRM',info)
call P%set('COARSE_MAT','DIST',info)
call P%set('KRM_METHOD','FCG',info)
@@ -275,7 +275,7 @@ program amg_dexample_ml
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=1,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=ione,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -313,9 +313,9 @@ program amg_dexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -356,10 +356,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: choice, itmax
integer(psb_ipk_) :: choice, itmax
real(psb_dpk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)
+17 -16
View File
@@ -73,21 +73,21 @@ program amg_sexample_1lev
! solver and preconditioner parameters
real(psb_spk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: i,info,j,m_problem
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_spk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name, kmethod
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -103,7 +103,7 @@ program amg_sexample_1lev
name='amg_sexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -152,14 +152,14 @@ program amg_sexample_1lev
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -177,7 +177,7 @@ program amg_sexample_1lev
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -198,7 +198,7 @@ program amg_sexample_1lev
! set number of overlaps
call P%set('SUB_OVR',2,info)
call P%set('SUB_OVR',itwo,info)
! build the preconditioner
@@ -226,7 +226,7 @@ program amg_sexample_1lev
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -263,9 +263,9 @@ program amg_sexample_1lev
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -306,10 +306,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: itmax
integer(psb_ipk_) :: itmax
real(psb_spk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)
+20 -19
View File
@@ -89,23 +89,23 @@ program amg_sexample_ml
! solver and preconditioner parameters
real(psb_spk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: choice
integer :: i,info,j,m_problem
integer(psb_ipk_) :: choice
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_spk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name
character(len=20), parameter :: kmethod='FCG'
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -121,7 +121,7 @@ program amg_sexample_ml
name='amg_sexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -170,14 +170,14 @@ program amg_sexample_ml
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -195,7 +195,7 @@ program amg_sexample_ml
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -228,7 +228,7 @@ program amg_sexample_ml
call P%set('SMOOTHER_TYPE','BJAC',info)
call P%set('COARSE_SOLVE','BJAC',info)
call P%set('COARSE_SUBSOLVE','ILU',info)
call P%set('COARSE_SWEEPS',8,info)
call P%set('COARSE_SWEEPS',8_psb_ipk_,info)
case(3)
@@ -241,9 +241,9 @@ program amg_sexample_ml
call P%init(ctxt,'ML',info)
call P%set('PAR_AGGR_ALG','COUPLED',info)
call P%set('AGGR_TYPE','MATCHBOXP',info)
call P%set('AGGR_SIZE',8,info)
call P%set('AGGR_SIZE',8_psb_ipk_,info)
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('SMOOTHER_SWEEPS',itwo,info)
call P%set('COARSE_SOLVE','KRM',info)
call P%set('COARSE_MAT','DIST',info)
call P%set('KRM_METHOD','FCG',info)
@@ -275,7 +275,7 @@ program amg_sexample_ml
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=1,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=ione,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -313,9 +313,9 @@ program amg_sexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -356,10 +356,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: choice, itmax
integer(psb_ipk_) :: choice, itmax
real(psb_spk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)
+17 -16
View File
@@ -73,21 +73,21 @@ program amg_zexample_1lev
! solver and preconditioner parameters
real(psb_dpk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: i,info,j,m_problem
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_dpk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name, kmethod
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -103,7 +103,7 @@ program amg_zexample_1lev
name='amg_zexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -152,14 +152,14 @@ program amg_zexample_1lev
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -177,7 +177,7 @@ program amg_zexample_1lev
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -198,7 +198,7 @@ program amg_zexample_1lev
! set number of overlaps
call P%set('SUB_OVR',2,info)
call P%set('SUB_OVR',itwo,info)
! build the preconditioner
@@ -226,7 +226,7 @@ program amg_zexample_1lev
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -263,9 +263,9 @@ program amg_zexample_1lev
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -306,10 +306,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: itmax
integer(psb_ipk_) :: itmax
real(psb_dpk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)
+20 -19
View File
@@ -89,23 +89,23 @@ program amg_zexample_ml
! solver and preconditioner parameters
real(psb_dpk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
integer(psb_ipk_) :: itmax, iter, istop
integer(psb_ipk_) :: nlev
! parallel environment parameters
type(psb_ctxt_type) :: ctxt
integer :: iam, np
integer(psb_ipk_) :: iam, np
! other variables
integer :: choice
integer :: i,info,j,m_problem
integer(psb_ipk_) :: choice
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_epk_) :: amatsize, precsize, descsize
integer :: ierr, ircode
integer(psb_ipk_) :: ierr, ircode
real(psb_dpk_) :: resmx, resmxp
real(psb_dpk_) :: t1, t2, tprec
character(len=20) :: name
character(len=20), parameter :: kmethod='FCG'
integer, parameter :: iunit=12
integer(psb_ipk_), parameter :: iunit=12
! initialize the parallel environment
@@ -121,7 +121,7 @@ program amg_zexample_ml
name='amg_zexample_ml'
if(psb_get_errstatus() /= 0) goto 9999
info=psb_success_
call psb_set_errverbosity(2)
call psb_set_errverbosity(itwo)
!
! Hello world
!
@@ -170,14 +170,14 @@ program amg_zexample_ml
call psb_bcast(ctxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,1) == m_problem) then
if (psb_size(aux_b,ione) == m_problem) then
! if any rhs were present, broadcast the first one
write(0,'("Ok, got an rhs ")')
b_glob =>aux_b(:,1)
else
write(*,'("Generating an rhs...")')
write(*,'(" ")')
call psb_realloc(m_problem,1,aux_b,ircode)
call psb_realloc(m_problem,ione,aux_b,ircode)
if (ircode /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
@@ -195,7 +195,7 @@ program amg_zexample_ml
call psb_barrier(ctxt)
if (iam == psb_root_) write(*,'("Partition type: block")')
call psb_matdist(aux_A, A, ctxt, desc_A,info,parts=part_block)
call psb_scatter(b_glob,b,desc_a,info,root=psb_root_)
call psb_scatter(b_glob,b,desc_a,info,root=ione*psb_root_)
t2 = psb_wtime() - t1
@@ -228,7 +228,7 @@ program amg_zexample_ml
call P%set('SMOOTHER_TYPE','BJAC',info)
call P%set('COARSE_SOLVE','BJAC',info)
call P%set('COARSE_SUBSOLVE','ILU',info)
call P%set('COARSE_SWEEPS',8,info)
call P%set('COARSE_SWEEPS',8_psb_ipk_,info)
case(3)
@@ -241,9 +241,9 @@ program amg_zexample_ml
call P%init(ctxt,'ML',info)
call P%set('PAR_AGGR_ALG','COUPLED',info)
call P%set('AGGR_TYPE','MATCHBOXP',info)
call P%set('AGGR_SIZE',8,info)
call P%set('AGGR_SIZE',8_psb_ipk_,info)
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('SMOOTHER_SWEEPS',itwo,info)
call P%set('COARSE_SOLVE','KRM',info)
call P%set('COARSE_MAT','DIST',info)
call P%set('KRM_METHOD','FCG',info)
@@ -275,7 +275,7 @@ program amg_zexample_ml
call psb_barrier(ctxt)
t1 = psb_wtime()
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=1,istop=2)
call psb_krylov(kmethod,A,P,b,x,tol,desc_A,info,itmax,iter,err,itrace=ione,istop=itwo)
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
@@ -313,9 +313,9 @@ program amg_zexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
call psb_gather(x_glob,x,desc_a,info,root=ione*psb_root_)
if (info == psb_success_) &
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
& call psb_gather(r_glob,r,desc_a,info,root=ione*psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then
write(0,'(" ")')
@@ -356,10 +356,11 @@ contains
implicit none
type(psb_ctxt_type) :: ctxt
integer :: choice, itmax
integer(psb_ipk_) :: choice, itmax
real(psb_dpk_) :: tol
character(len=*) :: mtrx, rhs,filefmt
integer :: iam, np, inp_unit
integer(psb_ipk_) :: inp_unit
integer(psb_mpk_) :: iam, np
character(len=1024) :: filename
call psb_info(ctxt,iam,np)

Some files were not shown because too many files have changed in this diff Show More