From f85d1d2f30245b6bff804eb536ffb73a5aa71d24 Mon Sep 17 00:00:00 2001 From: Mike Wall Date: Thu, 30 Nov 2023 10:48:34 -0500 Subject: [PATCH] Modifications for Cray build o Add "integer argc" to benchmarks o Disable testing and example builds in crusher script o Include prg_c_interface conditionally in progress library o Fix lint issues --- CMakeLists.txt | 2 +- benchmarks/dmconstruction/dmconstruction.F90 | 1 + benchmarks/dmconstruction3d/dmconstruction3d.F90 | 1 + benchmarks/dmconstruction3d/dmconstruction_bio.F90 | 4 ++-- .../dmconstruction_graphBased_bio.F90 | 3 +-- scripts/build_crusher_rocsparse_cce.sh | 4 ++-- src/CMakeLists.txt | 10 +++++++--- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46d906cb..a23be714 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ add_definitions(-DPROGRESS_VERSION=${PROGRESS_VERSION}) message(STATUS "Setting PROGRESS_VERSION to '${PROGRESS_VERSION}'") if(CMAKE_Fortran_COMPILER_ID STREQUAL "Cray") - set(EXTRA_FCFLAGS "-ef ${EXTRA_FCFLAGS}") + set(EXTRA_FCFLAGS "-ef ${EXTRA_FCFLAGS}") else() set(EXTRA_FCFLAGS "-ffree-line-length-none ${EXTRA_FCFLAGS}") endif() diff --git a/benchmarks/dmconstruction/dmconstruction.F90 b/benchmarks/dmconstruction/dmconstruction.F90 index c00a10f3..95d4686f 100644 --- a/benchmarks/dmconstruction/dmconstruction.F90 +++ b/benchmarks/dmconstruction/dmconstruction.F90 @@ -27,6 +27,7 @@ program hmodel real(dp), allocatable :: eigenvalues(:) real(dp) :: ef,sparsity,dec,mlsi,mlsf,bnorm character(20) :: bml_dmode + integer :: iargc call prg_initParallel() diff --git a/benchmarks/dmconstruction3d/dmconstruction3d.F90 b/benchmarks/dmconstruction3d/dmconstruction3d.F90 index ff2b8b8f..0e4c9619 100644 --- a/benchmarks/dmconstruction3d/dmconstruction3d.F90 +++ b/benchmarks/dmconstruction3d/dmconstruction3d.F90 @@ -27,6 +27,7 @@ program hmodel real(dp), allocatable :: eigenvalues(:) real(dp) :: ef,sparsity,dec,mlsi,mlsf,bnorm character(20) :: bml_dmode + integer :: iargc call prg_initParallel() diff --git a/benchmarks/dmconstruction3d/dmconstruction_bio.F90 b/benchmarks/dmconstruction3d/dmconstruction_bio.F90 index db48abdc..b0ddf602 100644 --- a/benchmarks/dmconstruction3d/dmconstruction_bio.F90 +++ b/benchmarks/dmconstruction3d/dmconstruction_bio.F90 @@ -39,6 +39,7 @@ program biosolve type(tbparams_type) :: tb real(dp) :: tol real(dp), allocatable :: eigenvalues(:) + integer :: iargc call prg_progress_init() myRank = getMyRank() + 1 @@ -90,8 +91,7 @@ program biosolve if(bioham%mdim == 0) bioham%mdim = norbs ! Get occupation based on last shell population. - nel = sum(element_numel(syf%atomic_number(:)),& - & size(syf%atomic_number,dim=1)) + nel = sum(element_numel(syf%atomic_number)) if(myRank == 1)write(*,*)"N electrons = ",nel bndfil = nel/(2.0_dp*real(norbs,dp)) if(myRank == 1)write(*,*)"bndfil = ",bndfil diff --git a/benchmarks/dmconstruction_graphBased/dmconstruction_graphBased_bio.F90 b/benchmarks/dmconstruction_graphBased/dmconstruction_graphBased_bio.F90 index 7eec4701..f32a6a04 100644 --- a/benchmarks/dmconstruction_graphBased/dmconstruction_graphBased_bio.F90 +++ b/benchmarks/dmconstruction_graphBased/dmconstruction_graphBased_bio.F90 @@ -95,8 +95,7 @@ program gpsolve if(bioham%mdim == 0) bioham%mdim = norbs ! Get occupation based on last shell population. - nel = sum(element_numel(syf%atomic_number(:)),& - & size(syf%atomic_number,dim=1)) + nel = sum(element_numel(syf%atomic_number)) bndfil = nel/(2.0_dp*real(norbs,dp)) call bml_threshold(ham_bml,bioham%threshold) diff --git a/scripts/build_crusher_rocsparse_cce.sh b/scripts/build_crusher_rocsparse_cce.sh index 2b9e8c23..79f4c509 100755 --- a/scripts/build_crusher_rocsparse_cce.sh +++ b/scripts/build_crusher_rocsparse_cce.sh @@ -15,9 +15,9 @@ export BML_OPENMP=yes export PROGRESS_OPENMP=${PROGRESS_OPENMP:=yes} export INSTALL_DIR=${INSTALL_DIR:="${MY_PATH}/install"} export PROGRESS_GRAPHLIB=${PROGRESS_GRAPHLIB:=no} -export PROGRESS_TESTING=${PROGRESS_TESTING:=yes} +export PROGRESS_TESTING=${PROGRESS_TESTING:=no} export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=RelWithDebInfo} -export PROGRESS_EXAMPLES=${PROGRESS_EXAMPLES:=yes} +export PROGRESS_EXAMPLES=${PROGRESS_EXAMPLES:=no} export PROGRESS_BENCHMARKS=${PROGRESS_BENCHMARKS:=yes} export EXTRA_FCFLAGS="-hsystem_alloc" export EXTRA_LINK_FLAGS="" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 58132ad6..89dec935 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ include_directories(${BML_INCLUDEDIR}) -add_library(progress +set(PROGRESS_SOURCES # LATTE modules ./latte_mods/coulomb_latte_mod.F90 ./latte_mods/ham_latte_mod.F90 @@ -49,9 +49,13 @@ add_library(progress prg_timer_mod.F90 prg_xlbo_mod.F90 prg_graphsolver_mod.F90 - prg_xlbokernel_mod.F90 - prg_c_interface.F90) + prg_xlbokernel_mod.F90) +if(NOT (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")) + set(PROGRESS_SOURCES ${PROGRESS_SOURCES} prg_c_interface.F90) +endif() + +add_library(progress ${PROGRESS_SOURCES}) message(STATUS "debug ${CMAKE_CURRENT_SOURCE_DIR}") include_directories(${CMAKE_CURRENT_SOURCE_DIR})