Skip to content

Commit

Permalink
BUGFIX: add back missing directories
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jun 22, 2021
1 parent ce8c1bd commit 2af69d4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 17 deletions.
18 changes: 5 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,12 @@ target_compile_definitions(scalapack PRIVATE ${cargs})
add_library(SCALAPACK::SCALAPACK INTERFACE IMPORTED GLOBAL)
target_link_libraries(SCALAPACK::SCALAPACK INTERFACE scalapack blacs)

configure_file(tools/CMakeLists.txt ${scalapack_SOURCE_DIR}/TOOLS/ COPYONLY)
add_subdirectory(${scalapack_SOURCE_DIR}/TOOLS ${scalapack_BINARY_DIR}/TOOLS)
foreach(d src/ pblas/src/ pblas/src/pbblas/ pblas/src/ptools/ pblas/src/ptzblas/ redist/src/ tools/ tools/lapack/)
string(TOUPPER ${d} D)

configure_file(pblas/src/CMakeLists.txt ${scalapack_SOURCE_DIR}/PBLAS/SRC/ COPYONLY)
add_subdirectory(${scalapack_SOURCE_DIR}/PBLAS/SRC ${scalapack_BINARY_DIR}/PBLAS/SRC)

configure_file(redist/src/CMakeLists.txt ${scalapack_SOURCE_DIR}/REDIST/SRC/ COPYONLY)
add_subdirectory(${scalapack_SOURCE_DIR}/REDIST/SRC ${scalapack_BINARY_DIR}/REDIST/SRC)

configure_file(src/CMakeLists.txt ${scalapack_SOURCE_DIR}/SRC/ COPYONLY)
add_subdirectory(${scalapack_SOURCE_DIR}/SRC ${scalapack_BINARY_DIR}/SRC)

configure_file(tools/lapack/CMakeLists.txt ${scalapack_SOURCE_DIR}/TOOLS/LAPACK/ COPYONLY)
add_subdirectory(${scalapack_SOURCE_DIR}/TOOLS/LAPACK ${scalapack_BINARY_DIR}/TOOLS/LAPACK)
configure_file(${d}CMakeLists.txt ${scalapack_SOURCE_DIR}/${D} COPYONLY)
add_subdirectory(${scalapack_SOURCE_DIR}/${D} ${scalapack_BINARY_DIR}/${D})
endforeach()

if(${PROJECT_NAME}_BUILD_TESTING)
add_subdirectory(tests)
Expand Down
4 changes: 0 additions & 4 deletions pblas/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
add_subdirectory(PBBLAS)
add_subdirectory(PTZBLAS)
add_subdirectory(PTOOLS)

add_library(appblas OBJECT pilaenv.f)
#---------------------------------------------------------------------------
# Level 1 PBLAS.
Expand Down
7 changes: 7 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,11 @@ if("d" IN_LIST arith)
add_test(NAME scalapack:unit:real64
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 $<TARGET_FILE:test_scalapack_d>)
set_tests_properties(scalapack:unit:real64 PROPERTIES TIMEOUT 15)

# TODO: make this a running test too.
add_executable(test_pdgetrf test_pdgetrf.f90)
target_link_libraries(test_pdgetrf PRIVATE SCALAPACK::SCALAPACK)
# add_test(NAME scalapack:unit:pdgetrf
# COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 $<TARGET_FILE:test_pdgetrf>)
# set_tests_properties(scalapack:unit:pdgetrf PROPERTIES TIMEOUT 15)
endif()
29 changes: 29 additions & 0 deletions tests/test_pdgetrf.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
program test_pdgetrf

use, intrinsic :: iso_fortran_env, only : real64
!! this can be a source of linking issues, so be sure scalapack linked correctly
implicit none

external :: pdgetrf

character, parameter :: ORDER = 'R'
integer, parameter :: NPROW = 2, NPCOL = 2, M=4, N=4, MB=2,NB=MB
integer :: dt, icontxt, myrow, mycol, info, desc_a(9), ipvt(9+2)

integer, parameter :: MMAX=8,NMAX=8,LDA=MMAX,LW=NMAX
real(real64) :: A(LDA,NMAX)

desc_a = [DT, ICONTXT, M, N, MB, NB, NPROW, NPCOL, LDA]



CALL BLACS_GET (0, 0, ICONTXT)
CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL)
CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL)

CALL PDGETRF( 9 , 9 , A , 1 , 1 , DESC_A , IPVT , INFO )

call blacs_gridexit(icontxt)
call blacs_exit(0)

end program

0 comments on commit 2af69d4

Please sign in to comment.