diff --git a/README.md b/README.md index 97cc3bb..31f07d3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,17 @@ CMake: a. Latest Ninja Binary at https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip 1. Intel OneAPI toolkit, should include C, C++, Fortran Compilers, MPI, MKL libraries (refer https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html#vtune) 2. Prebuilt AOCL libraries for Blis, Libflame and Scalapack + a. Blis and Libflame libraries can be built from source or extracted from AOCL_Windows-setup-xxxx-AMD.exe based on integer size needed, LP64 or ILP64. Refer https://developer.amd.com/amd-aocl/ for more details. + 1. Choose MT Shared libraries for Blis: AOCL-LibBlis-Win-MT-dll.lib and AOCL-LibBlis-Win-MT-dll.dll + 2. Shared libraries for Libflame: AOCL-LibFlame-Win-MT-dll.lib and AOCL-LibFlame-Win-MT-dll.dll + b. Scalapack library needs to be built manually after the below changes to sources for Mumps + a. Comment the line that sets 'lowercase' to 'CMAKE_Fortran_FLAGS' variable in aocl-scalapack\BLACS\INSTALL\CMakeLists.txt and aocl-scalapack/CMakeLists.txt + #set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /names:lowercase") + b. Remove DTL Logging source files "aocl_dtl_trace_entry.c" and "aocl_dtl_trace_exit.c" from aocl-scalapack\SRC\CMakeLists.txt + c. Link the Blis/Libflame libraries that are extracted from AMD installer exe and build the Scalapack library + d. Refer AOCL User Guide for build instructions of Scalapack at https://developer.amd.com/amd-aocl/ + c. LP64/ILP64 libraries of the dependent libraries (Blis, Libflame and Scalapack) need to be linked with the corresponding Mumps LP64/ILP64 builds + 3. If reordering library is chosen to be Metis, Prebuilt Metis Library from SuiteSparse public repo (https://github.com/group-gu/SuiteSparse.git). Build Metis library separately from metis folder. a. cd SuiteSparse\metis-5.1.0 b. Define IDXTYPEWIDTH and REALTYPEWIDTH to 32/64 based on integer size required in metis/include/metis.h diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 21321d6..7fef0c4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,6 +27,11 @@ set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) find_package(Boost 1.77 REQUIRED) # header only libraries must not be added here +if(MUMPS_UPSTREAM_VERSION VERSION_LESS 5.1) + message(STATUS "Mumps version set is less than 5.1. Not supported.") + return() +endif() + if("d" IN_LIST arith) add_executable(amd_aocl amd_mumps.cpp) target_compile_options(amd_aocl PRIVATE /Qopenmp /Qopenmp-threadprivate:compat -DAdd_) @@ -51,21 +56,3 @@ if("d" IN_LIST arith) set(CMAKE_POSITION_INDEPENDENT_CODE ON) target_link_libraries(Csimple PRIVATE ${IMPI_LIB_ILP64} ${MPI_C_LIBRARIES} MUMPS::MUMPS ${NUMERIC_LIBS}) endif() - -if(MUMPS_UPSTREAM_VERSION VERSION_LESS 5.1) - return() -endif() - -# Windows DLL -get_property(test_names DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY TESTS) - -set_tests_properties(${test_names} PROPERTIES -RESOURCE_LOCK cpu_mpi -TIMEOUT 30 -) - -if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.22) - set_tests_properties(${test_names} PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_append:${CMAKE_INSTALL_PREFIX}/bin;PATH=path_list_append:${CMAKE_PREFIX_PATH}/bin;PATH=path_list_append:${PROJECT_BINARY_DIR}" - ) -endif() diff --git a/tests/amd_mumps.cpp b/tests/amd_mumps.cpp index ef49369..f8ad580 100644 --- a/tests/amd_mumps.cpp +++ b/tests/amd_mumps.cpp @@ -354,14 +354,15 @@ int main(int argc, char* argv[]) { { int ompNumThrds = omp_get_max_threads(); double sparsity_percent = 0.0; - double symbolic_t = 0.0, numeric_t = 0.0, solve_t = 0.0, sns_t = 0.0; + double symbolic_t = 0.0, numeric_t = 0.0, solve_t = 0.0, afs_t = 0.0, fs_t = 0.0; sparsity_percent = (nrows * nrows) - nnz; sparsity_percent = sparsity_percent / (nrows * nrows); sparsity_percent = sparsity_percent * 100; symbolic_t = std::chrono::duration_cast(SymbolicFactorizationTime).count() / 1.0e9; numeric_t = std::chrono::duration_cast(NumericFactorizationTime).count() / 1.0e9; solve_t = std::chrono::duration_cast(FBSolveTime).count() / 1.0e9; - sns_t = std::chrono::duration_cast(SymbolicFactorizationTime + NumericFactorizationTime + FBSolveTime).count() / 1.0e9; + afs_t = std::chrono::duration_cast(SymbolicFactorizationTime + NumericFactorizationTime + FBSolveTime).count() / 1.0e9; + fs_t = std::chrono::duration_cast(NumericFactorizationTime + FBSolveTime).count() / 1.0e9; #ifdef PARAM_LOG std::cout.precision(2); std::cout.setf(std::ios::fixed); @@ -372,10 +373,11 @@ int main(int argc, char* argv[]) { << std::setw(12) << "nnz" << std::setw(12) << "mpi_ranks" << std::setw(12) << "sparsity_%" - << std::setw(16) << "symbolic_time" - << std::setw(16) << "numeric_time" + << std::setw(16) << "analysis_time" + << std::setw(16) << "fact_time" << std::setw(16) << "solve_time" - << std::setw(16) << "sns_time" + << std::setw(16) << "afs_time" + << std::setw(16) << "fs_time" << std::setw(12) << "relativeError" << std::endl; @@ -387,12 +389,13 @@ int main(int argc, char* argv[]) { << std::setw(16) << std::scientific << symbolic_t << std::setw(16) << std::scientific << numeric_t << std::setw(16) << std::scientific << solve_t - << std::setw(16) << std::scientific << sns_t + << std::setw(16) << std::scientific << afs_t + << std::setw(16) << std::scientific << fs_t << std::setw(12) << std::fixed << relativeError << std::endl; #else - //input, mpiProcs, ompThrds, symmetry, nrows, nnz, sparsity_%, symbolic_t, numeric_t, solve_t, sns_t, relError - printf("%s, %d, %d, %d, %d, %d, %5.2f, %5.2f, %5.2f, %5.2f, %5.2f, %5.2f\n", matrix_name.c_str(), comm_size, ompNumThrds, id.sym, nrows, nnz, sparsity_percent, - symbolic_t, numeric_t, solve_t, sns_t, relativeError); + //input, mpiProcs, ompThrds, symmetry, nrows, nnz, sparsity_%, analysis_time, fact_time, solve_t, afs_time, fs_time, relError + printf("%s, %d, %d, %d, %d, %d, %5.2f, %5.2f, %5.2f, %5.2f, %5.2f, %5.2f, %5.2f\n", matrix_name.c_str(), comm_size, ompNumThrds, id.sym, nrows, nnz, sparsity_percent, + symbolic_t, numeric_t, solve_t, afs_t, fs_t, relativeError); #endif }