Skip to content

Commit

Permalink
Merge pull request #2784 from QMCPACK/rc_3100
Browse files Browse the repository at this point in the history
Rc 3100
  • Loading branch information
prckent authored Nov 10, 2020
2 parents 8064ebf + 6b90043 commit f775d65
Show file tree
Hide file tree
Showing 2,160 changed files with 233,598 additions and 160,862 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ qmcpack_manual.out
qmcpack_manual.toc
qmcpack_manual.pdf
.DS_Store
/build_*/
docs/_build
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@

Notable changes to QMCPACK are documented in this file.

## [3.10.0] - 2020-11-10

### Notes

This release contains multiple feature improvements and bug fixes. The AFQMC implementation has been significantly enhanced, and
an important wavefunction optimization bug fixed in real space QMC.

* The QMCPACK manual is now available at https://qmcpack.readthedocs.io, having been converted to use reStructuredText and the sphinx
documentation system.
* Significant improvements to the AFQMC code including HIP support for AMD GPUs, updated documentation, and support for non-collinear calculations and spin-orbit k-point Hamiltonians
[\#2734](https://github.com/QMCPACK/qmcpack/pull/2734).
* Improved support for spin-orbit in real-space QMC including documentation [\#2733](https://github.com/QMCPACK/qmcpack/pull/2733).
* Important bug fix for wavefunction optimization in few electron systems such as isolated atoms. The bug would result in slow or no
convergence. Thanks to Jaron Krogel and Matus Dubecky for reports and reproducers.
[\#2496](https://github.com/QMCPACK/qmcpack/issues/2496).
* Implementation of L2 potentials and evaluation in DMC [\#1948](https://github.com/QMCPACK/qmcpack/pull/1948).
* Consistent with our two year support policy for open source compilers, libraries, and tooling, several version minimums have
been increased to either avoid bugs or to utilize new features.
* Clang 7 is the earliest supported Clang compiler. The latest release is recommended.
* Intel 2019 is the earliest supported Intel compiler. The latest release is recommended.
* Future releases of QMCPACK will require C++17. The current minimum is C++14.
* AoS builds are no longer supported. The code has been removed now that the default structures-of-arrays (SoA) build has
sufficiently broad capability.
* The default CUDA architecture is set to sm_70 (Volta).
* QMCPACK is built with ENABLE_TIMERS=ON by default [\#2663](https://github.com/QMCPACK/qmcpack/issues/2663)
* Various bug fixes to complete the transition to Python 3.
* Ongoing improvements to the OpenMP offload implementation.

### NEXUS

* NEXUS manual is now available at https://nexus-workflows.readthedocs.io, having been converted to use the reStructuredText and sphinx
documentation system.
* Various small fixes and improvements.

## [3.9.2] - 2020-04-29

### Notes
Expand Down
45 changes: 40 additions & 5 deletions CMake/ClangCompilers.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check compiler version
IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4 )
IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0 )
MESSAGE(STATUS "Compiler Version ${CMAKE_CXX_COMPILER_VERSION}")
MESSAGE(FATAL_ERROR "Requires clang 3.4 or higher ")
MESSAGE(FATAL_ERROR "Requires clang 7.0 or higher ")
ENDIF()

# Set the std
Expand All @@ -10,15 +10,23 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
# Enable OpenMP
IF(QMC_OMP)
SET(ENABLE_OPENMP 1)
IF(ENABLE_OFFLOAD)
IF(ENABLE_OFFLOAD AND NOT CMAKE_SYSTEM_NAME STREQUAL "CrayLinuxEnvironment")
SET(OFFLOAD_TARGET "nvptx64-nvidia-cuda" CACHE STRING "Offload target architecture")
IF(DEFINED OFFLOAD_ARCH)
SET(CLANG_OPENMP_OFFLOAD_FLAGS "-fopenmp-targets=${OFFLOAD_TARGET} -Xopenmp-target=${OFFLOAD_TARGET} -march=${OFFLOAD_ARCH}")
ELSE()
SET(CLANG_OPENMP_OFFLOAD_FLAGS "-fopenmp-targets=${OFFLOAD_TARGET}")
ENDIF()

# Intel clang compiler needs a different flag for the host side OpenMP library when offload is used.
IF(OFFLOAD_TARGET MATCHES "spir64")
SET(OMP_FLAG "-fiopenmp")
ELSE(OFFLOAD_TARGET MATCHES "spir64")
SET(OMP_FLAG "-fopenmp")
ENDIF(OFFLOAD_TARGET MATCHES "spir64")

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OMP_FLAG}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OMP_FLAG} -fopenmp-targets=${OFFLOAD_TARGET}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OMP_FLAG}")
ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
Expand All @@ -31,6 +39,18 @@ ADD_DEFINITIONS( -Drestrict=__restrict__ )
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstrict-aliasing")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstrict-aliasing -D__forceinline=inline")

# treat VLA as error
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=vla")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wvla")

# set compiler warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-variable -Wno-overloaded-virtual -Wno-unused-private-field -Wno-unused-local-typedef")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
IF( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0 )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmisleading-indentation")
ENDIF()


# Set extra optimization specific flags
SET( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer -ffast-math" )
SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -ffast-math" )
Expand All @@ -49,7 +69,7 @@ SET( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fs
# arm: -mpcu
# default or cray: none
#--------------------------------------
IF($ENV{CRAYPE_VERSION} MATCHES ".")
IF(CMAKE_SYSTEM_NAME STREQUAL "CrayLinuxEnvironment")
# It's a cray machine. Don't do anything
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
# the case for x86_64
Expand Down Expand Up @@ -79,6 +99,21 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64" OR CMAKE_SYSTEM_PROCESSOR MATCHES
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcpu=native")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
endif() #(CMAKE_CXX_FLAGS MATCHES "-mcpu=" OR CMAKE_C_FLAGS MATCHES "-mcpu=")

IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
# Ensure PowerPC builds include optimization flags in release and release-with-debug builds
# Otherwise these are missing (2020-06-22)
SET( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -DNDEBUG" )
SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG" )
SET( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -DNDEBUG" )
SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -DNDEBUG" )
ENDIF()
ENDIF()

# Add OpenMP offload flags
# This step is intentionally put after the -march parsing for CPUs.
IF(DEFINED CLANG_OPENMP_OFFLOAD_FLAGS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLANG_OPENMP_OFFLOAD_FLAGS}")
ENDIF()

# Add static flags if necessary
Expand Down
65 changes: 46 additions & 19 deletions CMake/FindIBMMASS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,17 @@ endif (NOT MASS_LINK_DIRECTORIES)
MESSAGE(STATUS "MASS_LINK_DIRECTORIES: ${MASS_LINK_DIRECTORIES}")

set(MASS_LINKER_FLAGS -L${MASS_LINK_DIRECTORIES} -Wl,-rpath,${MASS_LINK_DIRECTORIES})
set(MASS_LIBRARIES "-lmass -lmassv")

set(MASS_LIBRARY "-lmass")
FILE( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mass.cxx"
"#include <cmath>
#include <mass.h>
#include <massv.h>
#include <iostream>
int main(void) {
double input = 1.1;
double outsin, outcos;;
sincos(input,&outsin, &outcos);
int in_size = 10;
double inputv[in_size];
double resultv[in_size];
for( int i = 0; i < in_size; ++i)
inputv[i] = i;
vlog10(resultv, inputv, &in_size);
sincos(input, &outsin, &outcos);
}
")

Expand All @@ -51,25 +44,59 @@ try_compile(HAVE_MASS ${CMAKE_BINARY_DIR}
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${MASS_INCLUDE_DIRECTORIES} "
"-DLINK_DIRECTORIES=${MASS_LINK_DIRECTORIES}"
LINK_LIBRARIES "${MASS_LIBRARIES}"
COMPILE_DEFINITIONS "${MASS_COMPILE_DEFINITIONS}"
LINK_LIBRARIES "${MASS_LIBRARY}"
OUTPUT_VARIABLE MASS_OUT)
if ( NOT HAVE_MASS )
MESSAGE( "${MASS_OUT}" )
endif ( NOT HAVE_MASS )

IF ( HAVE_MASS )
set(MASSV_LIBRARY "-lmassv")
FILE( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_massv.cxx"
"#include <massv.h>
#include <iostream>
int main(void) {
int in_size = 10;
double inputv[in_size];
double resultv[in_size];
for( int i = 0; i < in_size; ++i)
inputv[i] = i;
vlog10(resultv, inputv, &in_size);
}
")

try_compile(HAVE_MASSV ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_massv.cxx
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${MASS_INCLUDE_DIRECTORIES} "
"-DLINK_DIRECTORIES=${MASS_LINK_DIRECTORIES}"
LINK_LIBRARIES "${MASSV_LIBRARY}"
OUTPUT_VARIABLE MASSV_OUT)
if ( NOT HAVE_MASSV )
MESSAGE( "${MASSV_OUT}" )
endif ( NOT HAVE_MASSV )


IF ( HAVE_MASS OR HAVE_MASSV )
SET( MASS_FOUND TRUE )
SET( HAVE_MASSV TRUE )
MESSAGE(STATUS "MASS found: HAVE_MASS=${HAVE_MASS}, HAVE_MASSV=${HAVE_MASSV}")

#create scalar_vector_functions target
ADD_LIBRARY(Math::scalar_vector_functions INTERFACE IMPORTED)
SET_TARGET_PROPERTIES(Math::scalar_vector_functions PROPERTIES INTERFACE_COMPILE_DEFINITIONS "HAVE_MASS;HAVE_MASSV"
INTERFACE_INCLUDE_DIRECTORIES "${MASS_INCLUDE_DIRECTORIES}"
INTERFACE_LINK_LIBRARIES "${MASS_LINKER_FLAGS} ${MASS_LIBRARIES}")
set( SINCOS_INCLUDE mass.h )
ELSE( HAVE_MASS )
SET_TARGET_PROPERTIES(Math::scalar_vector_functions PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MASS_INCLUDE_DIRECTORIES}"
INTERFACE_LINK_OPTIONS "${MASS_LINKER_FLAGS}")
IF( HAVE_MASS )
SET_PROPERTY(TARGET Math::scalar_vector_functions APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS "HAVE_MASS")
SET_PROPERTY(TARGET Math::scalar_vector_functions APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MASS_LIBRARY}")
SET( SINCOS_INCLUDE mass.h )
ENDIF()

IF( HAVE_MASSV )
SET_PROPERTY(TARGET Math::scalar_vector_functions APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS "HAVE_MASSV")
SET_PROPERTY(TARGET Math::scalar_vector_functions APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MASSV_LIBRARY}")
ENDIF()

ELSE()
SET( MASS_FOUND FALSE )
MESSAGE(STATUS "MASS not found")
ENDIF( HAVE_MASS )
ENDIF()
Loading

0 comments on commit f775d65

Please sign in to comment.