Skip to content

Commit

Permalink
Modifications for Cray build
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mewall committed Nov 30, 2023
1 parent 2bb1c93 commit f85d1d2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions benchmarks/dmconstruction/dmconstruction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 1 addition & 0 deletions benchmarks/dmconstruction3d/dmconstruction3d.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/dmconstruction3d/dmconstruction_bio.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_crusher_rocsparse_cce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down
10 changes: 7 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit f85d1d2

Please sign in to comment.