Skip to content

Commit

Permalink
Prepare v1.0.2 (#388)
Browse files Browse the repository at this point in the history
* Bump Eigen to 3.4 (#387)

* Compatibility with Eigen-3.4

* Bump MRCPP to 1.4

* Prepare v1.0.2

Co-authored-by: gitpeterwind <[email protected]>
  • Loading branch information
stigrj and gitpeterwind authored Oct 14, 2021
1 parent 132d64f commit b5fbff5
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 58 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

variables:
ubuntu-1804: &ubuntu-1804
ubuntu-2004: &ubuntu-2004
docker:
- image: quay.io/metamr/circleci_ubuntu-18.04:f969788
- image: ghcr.io/mrchemsoft/metamr/circleci_ubuntu-20.04:sha-343e011
name: tsubame
user: merzbow
working_directory: ~/mrchem
Expand All @@ -12,7 +12,7 @@ variables:
name: Configuring serial
shell: /bin/bash
command: |
python3 setup \
python setup \
--type=release \
--cxx=g++ \
--prefix=$HOME/Software/MRChem
Expand All @@ -21,7 +21,7 @@ variables:
name: Configuring OpenMP parallel
shell: /bin/bash
command: |
python3 setup \
python setup \
--type=release \
--cxx=g++ \
--omp \
Expand All @@ -31,7 +31,7 @@ variables:
name: Configuring MPI parallel
shell: /bin/bash
command: |
python3 setup \
python setup \
--type=release \
--cxx=mpicxx \
--mpi \
Expand All @@ -52,14 +52,14 @@ variables:
jobs:
serial-py3:
<<: *ubuntu-1804
<<: *ubuntu-2004
steps:
- checkout
- *configure-serial
- *build
- *tests
omp-py3:
<<: *ubuntu-1804
<<: *ubuntu-2004
environment:
- OMP_NUM_THREADS: '2'
steps:
Expand All @@ -68,7 +68,7 @@ jobs:
- *build
- *tests
mpi-py3:
<<: *ubuntu-1804
<<: *ubuntu-2004
steps:
- checkout
- *configure-mpi
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change log

## Version 1.0.2 2021-10-13

### Changed

- Updated MRCPP to v1.4.0
- Updated Eigen to v3.4.0

### Fixed

- Compile error with Eigen-3.4 due to conversion std::array<double> -> Eigen::VectorXd

## Version 1.0.1 2020-12-04

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2015-2020 by Radovan Bast, Roberto Di Remigio, Jonas Juselius, and contributors.

# set minimum cmake version
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

# project name
project(MRChem LANGUAGES CXX)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.0.2
2 changes: 1 addition & 1 deletion cmake/autocmake.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: MRChem
language: CXX
min_cmake_version: 3.12
min_cmake_version: 3.14
setup_script: setup
default_build_type: release

Expand Down
26 changes: 0 additions & 26 deletions external/upstream/eigen-config-cmake.patch

This file was deleted.

26 changes: 8 additions & 18 deletions external/upstream/fetch_eigen3.cmake
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
find_package(Eigen3 3.3 CONFIG QUIET NO_CMAKE_PACKAGE_REGISTRY)
find_package(Eigen3 3.4 CONFIG QUIET
NO_CMAKE_PATH
NO_CMAKE_PACKAGE_REGISTRY
)

if(TARGET Eigen3::Eigen)
message(STATUS "Using Eigen3: ${EIGEN3_ROOT_DIR} (version ${Eigen3_VERSION})")
else()
message(STATUS "Suitable Eigen3 could not be located. Fetching and building!")
include(FetchContent)

FetchContent_Declare(eigen3_sources
FetchContent_Declare(eigen3
QUIET
URL
https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/eigen-config-cmake.patch
https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
)

FetchContent_GetProperties(eigen3_sources)

set(BUILD_TESTING OFF CACHE BOOL "" FORCE)

if(NOT eigen3_sources_POPULATED)
FetchContent_Populate(eigen3_sources)

add_subdirectory(
${eigen3_sources_SOURCE_DIR}
${eigen3_sources_BINARY_DIR}
)
endif()
# Provide an alias, so linking to Eigen looks the same regardless if it was
# found on the system or if it was fetched at configuration
add_library(Eigen3::Eigen ALIAS eigen)
FetchContent_MakeAvailable(eigen3)
endif()
4 changes: 2 additions & 2 deletions external/upstream/fetch_mrcpp.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
find_package(MRCPP CONFIG QUIET
find_package(MRCPP 1.3 CONFIG QUIET
NO_CMAKE_PATH
NO_CMAKE_PACKAGE_REGISTRY
NO_CMAKE_SYSTEM_PACKAGE_REGISTRY
Expand Down Expand Up @@ -37,7 +37,7 @@ else()
FetchContent_Declare(mrcpp_sources
QUIET
URL
https://github.com/MRChemSoft/mrcpp/archive/v1.3.6.tar.gz
https://github.com/MRChemSoft/mrcpp/archive/v1.4.0.tar.gz
)

FetchContent_GetProperties(mrcpp_sources)
Expand Down
2 changes: 1 addition & 1 deletion src/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ void driver::build_fock_operator(const json &json_fock, Molecule &mol, FockOpera
///////////////// External Operator ///////////////////
///////////////////////////////////////////////////////////
if (json_fock.contains("external_operator")) {
auto field = json_fock["external_operator"]["electric_field"];
auto field = json_fock["external_operator"]["electric_field"].get<std::array<double, 3>>();
auto r_O = json_fock["external_operator"]["r_O"];
auto V_ext = std::make_shared<ElectricFieldOperator>(field, r_O);
F.getExtOperator() = V_ext;
Expand Down

0 comments on commit b5fbff5

Please sign in to comment.