Skip to content

Commit

Permalink
Fixed bugs in CMake build from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce J Palmer committed Oct 21, 2024
1 parent 16f41a6 commit 9f64485
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 142 deletions.
14 changes: 2 additions & 12 deletions comex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,10 @@ add_library(GlobalArrays::armci ALIAS armci)
target_include_directories(armci PRIVATE ${MPI_C_INCLUDE_DIRS})

target_include_directories(armci PRIVATE ${MPI_C_INCLUDE_DIRS})
if(ENABLE_CUDA)
cuda_add_cublas_to_target(armci)
else()
target_link_libraries(armci PUBLIC ${CUDA_LIBRARIES})
endif()
if(ENABLE_HIP)
target_link_libraries(armci PUBLIC roc::rocblas hip::device)
elseif(ENABLE_CUDA)
target_link_libraries(armci PUBLIC CUDA::cublas)
target_link_libraries(armci PUBLIC CUDA::cudart CUDA::cublas)
endif()

install(TARGETS armci
Expand All @@ -183,15 +178,10 @@ add_library(GlobalArrays::comex ALIAS comex)
target_include_directories(comex PRIVATE ${MPI_C_INCLUDE_DIRS})

target_include_directories(comex PRIVATE ${MPI_C_INCLUDE_DIRS})
if(ENABLE_CUDA)
cuda_add_cublas_to_target(comex)
else()
target_link_libraries(comex PUBLIC ${CUDA_LIBRARIES})
endif()
if(ENABLE_HIP)
target_link_libraries(comex PUBLIC roc::rocblas hip::device)
elseif(ENABLE_CUDA)
target_link_libraries(comex PUBLIC CUDA::cublas)
target_link_libraries(comex PUBLIC CUDA::cudart CUDA::cublas)
endif()

install(TARGETS comex
Expand Down
134 changes: 4 additions & 130 deletions global/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,134 +53,14 @@ endif()
# This test uses random() and srandom() which are not available on
# Windows
#if (NOT MSVC)
# add_executable (mulmatpatchc.x mulmatpatchc.c util.c)
# ga_add_parallel_test(mulmatpatchc mulmatpatchc.x ${TEST_NPROCS_1})
#endif (NOT MSVC)
if (ENABLE_CUDA OR ENABLE_HIP)
add_executable (c_test.x c_test.c)
add_executable (c_test_pg.x c_test_pg.c)
add_executable (copy_dev_test.x copy_dev_test.c)
ga_add_parallel_test (c_test c_test.x ${TEST_NPROCS_2})
ga_add_parallel_test (c_test_pg c_test_pg.x ${TEST_NPROCS_2})
ga_add_parallel_test (copy_dev_test copy_dev_test.x ${TEST_NPROCS_2})
ga_add_parallel_test (c_test "c_test.c")
ga_add_parallel_test (c_test_pg "c_test_pg.c")
ga_add_parallel_test (copy_dev_test "copy_dev_test.c")
endif()
add_executable (normc.x normc.c util.c)
#FIXME:Works upto 10 ranks
ga_add_parallel_test(normc normc.x ${TEST_NPROCS_4})
add_executable (ntestc.x ntestc.c)
ga_add_parallel_test(ntestc ntestc.x)
add_executable (ntestfc.x ntestfc.c)
ga_add_parallel_test(ntestfc ntestfc.x)
add_executable (packc.x packc.c util.c)
ga_add_parallel_test(packc packc.x)
add_executable (patch_enumc.x patch_enumc.c util.c)
ga_add_parallel_test(patch_enumc patch_enumc.x)
add_executable (perf2.x perf2.c util.c)
ga_add_parallel_test(perf2 perf2.x)
add_executable (print.x print.c util.c)
ga_add_parallel_test(print print.x ${TEST_NPROCS_4})
add_executable (scan_addc.x scan_addc.c util.c)
ga_add_parallel_test(scan_addc scan_addc.x)
add_executable (scan_copyc.x scan_copyc.c util.c)
ga_add_parallel_test(scan_copyc scan_copyc.x)
add_executable (simple_groups_commc.x simple_groups_commc.c util.c)
ga_add_parallel_test(simple_groups_commc simple_groups_commc.x)
#add_executable (sprsmatvec.x sprsmatvec.c util.c)
add_executable (testc.x testc.c util.c)
ga_add_parallel_test(testc testc.x)
add_executable (testmatmultc.x testmatmultc.c util.c)
ga_add_parallel_test(testmatmultc testmatmultc.x)
add_executable (testmult.x testmult.c util.c)
ga_add_parallel_test(testmult testmult.x)
add_executable (testmultrect.x testmultrect.c util.c)
ga_add_parallel_test(testmultrect testmultrect.x)
add_executable (unpackc.x unpackc.c util.c)
ga_add_parallel_test(unpack unpackc.x)
if (ENABLE_FORTRAN)
add_executable (bin.x bin.F ffflush.F)
ga_add_parallel_test(bin bin.x ${TEST_NPROCS_4})
# add_executable (blktest.x blktest.F ffflush.F)
add_executable (d2test.x d2test.F ffflush.F util.c)
ga_add_parallel_test(d2test d2test.x)
add_executable (g2test.x g2test.F ffflush.F util.c)
ga_add_parallel_test(g2test g2test.x)
add_executable (g3test.x g3test.F ffflush.F util.c)
ga_add_parallel_test(g3test g3test.x)
add_executable (ga_shift.x ga_shift.F ffflush.F)
ga_add_parallel_test(ga_shift ga_shift.x)
add_executable (ghosts.x ghosts.F ffflush.F util.c)
ga_add_parallel_test(ghosts ghosts.x)
add_executable (jacobi.x jacobi.F ffflush.F)
ga_add_parallel_test(jacobi jacobi.x)
# add_executable (merge.x merge.F ffflush.F)
add_executable (mir_perf1.x mir_perf1.F ffflush.F util.c)
ga_add_parallel_test(mir_perf1 mir_perf1.x ${TEST_NPROCS_4})
add_executable (mir_perf2.x mir_perf2.F ffflush.F util.c)
ga_add_parallel_test(mir_perf2 mir_perf2.x ${TEST_NPROCS_4})
add_executable (mmatrix.x mmatrix.F ffflush.F util.c)
ga_add_parallel_test(mmatrix mmatrix.x)
# add_executable (mulmatpatch.x mulmatpatch.F ffflush.F testblas.F)
# add_executable (nb2test.x nb2test.F ffflush.F util.c)
# ga_add_parallel_test(nb2test nb2test.x)
# add_executable (nbtest.x nbtest.F ffflush.F util.c)
# ga_add_parallel_test(nbtest nbtest.x)
add_executable (ndim.x ndim.F ffflush.F util.c)
ga_add_parallel_test(ndim ndim.x)
# add_executable (nga-onesided.x nga-onesided.F ffflush.F util.c)
# add_executable (nga-patch.x nga-patch.F ffflush.F util.c)
# add_executable (nga-periodic.x nga-periodic.F ffflush.F util.c)
# add_executable (nga-scatter.x nga-scatter.F ffflush.F)
# add_executable (nga_test.x nga_test.F ffflush.F)
# add_executable (ngatest.x ngatest.F ffflush.F util.c)
# add_executable (nga-util.x nga-util.F ffflush.F)
add_executable (patch2.x patch2.F ffflush.F)
ga_add_parallel_test(patch2 patch2.x)
add_executable (patch_enumf.x patch_enumf.F ffflush.F)
ga_add_parallel_test(patch_enumf patch_enumf.x)
add_executable (patch.x patch.F ffflush.F testblas.F)
ga_add_parallel_test(patch patch.x)
add_executable (perf.x perf.F ffflush.F util.c)
ga_add_parallel_test(perf perf.x ${TEST_NPROCS_4})
add_executable (perfmod.x perfmod.F ffflush.F util.c)
ga_add_parallel_test(perfmod perfmod.x ${TEST_NPROCS_4})
add_executable (perform.x perform.F ffflush.F util.c)
ga_add_parallel_test(perform perform.x ${TEST_NPROCS_4})
add_executable (pg2test.x pg2test.F ffflush.F util.c)
ga_add_parallel_test(pg2test pg2test.x)
# add_executable (pg2testmatmult.x pg2testmatmult.F ffflush.F util.c)
add_executable (pgtest.x pgtest.F ffflush.F util.c)
ga_add_parallel_test(pgtest pgtest.x)
# add_executable (pgtestmatmult.x pgtestmatmult.F ffflush.F util.c)
add_executable (random.x random.F ffflush.F util.c)
ga_add_parallel_test(random random.x)
add_executable (scan.x scan.F ffflush.F)
ga_add_parallel_test(scan scan.x)
add_executable (simple_groups_comm.x simple_groups_comm.F ffflush.F)
ga_add_parallel_test(simple_groups_comm simple_groups_comm.x)
add_executable (simple_groups.x simple_groups.F ffflush.F)
ga_add_parallel_test(simple_groups simple_groups.x)
add_executable (sparse.x sparse.F ffflush.F)
ga_add_parallel_test(sparse sparse.x)
add_executable (sprsmatmult.x sprsmatmult.F ffflush.F)
ga_add_parallel_test(sprsmatmult sprsmatmult.x)
add_executable (stride.x stride.F ffflush.F)
ga_add_parallel_test(stride stride.x)
# add_executable (testblas.x testblas.F ffflush.F)
add_executable (test.x test.F ffflush.F util.c)
ga_add_parallel_test(main_test test.x)
# add_executable (testmatmult.x testmatmult.F ffflush.F util.c)
add_executable (testsolve.x testsolve.F ffflush.F)
ga_add_parallel_test(testsolve testsolve.x)
if (ENABLE_SCALAPACK)
add_executable (testspd.x testspd.F ffflush.F)
ga_add_parallel_test(testspd testspd.x)
add_executable (testeig.x testeig.F ffflush.F)
ga_add_parallel_test(testeig testeig.x)
endif()
add_executable (types-test.x types-test.F ffflush.F util.c)
ga_add_parallel_test(types-test types-test.x)
endif()

ga_add_parallel_test (elempatch "elempatch.c util.c" )
ga_add_parallel_test (getmem "getmem.c util.c" )
ga_add_parallel_test (mtest "mtest.c util.c" )
Expand Down Expand Up @@ -216,12 +96,6 @@ if(LAPACK_FOUND)
ga_add_parallel_test (ga_lu "ga_lu.c util.c")
endif()

if (ENABLE_CUDA OR ENABLE_HIP)
ga_add_parallel_test (c_test c_test.c ${TEST_NPROCS_2})
ga_add_parallel_test (c_test_pg c_test_pg.c ${TEST_NPROCS_2})
ga_add_parallel_test (copy_dev_test copy_dev_test.c ${TEST_NPROCS_2})
endif()

if (ENABLE_FORTRAN)
ga_add_parallel_test (bin "bin.F ffflush.F" Fortran)
ga_add_parallel_test (blktest "blktest.F ffflush.F" Fortran)
Expand Down Expand Up @@ -307,4 +181,4 @@ if (ENABLE_FORTRAN)
add_dependencies(nga-util.x GenerateNGATests)



endif()

0 comments on commit 9f64485

Please sign in to comment.