Unverified Commit a95677fc authored by Florian Weik's avatar Florian Weik Committed by GitHub

Merge branch 'python' into nvccflags

parents 63842985 86c82da2
Pipeline #7432 passed with stages
in 102 minutes and 39 seconds
......@@ -92,6 +92,17 @@ default:
- docker
- linux
#min_boost:
# <<: *global_job_definition
# stage: build
# image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:min_boost
# script:
# - export with_cuda=false myconfig=maxset python_version=3
# - bash maintainer/CI/build_cmake.sh
# tags:
# - docker
# - linux
maxset:
<<: *global_job_definition
stage: build
......@@ -171,9 +182,9 @@ fedora:
- docker
- linux
#ubuntu:1404 not needed: used in cuda:8.0
#ubuntu:1604 not needed: used in cuda:9.0
#ubuntu:1804 not needed: default used in non-CUDA builds
#ubuntu:1904 not needed: base image for builds on different architectures
### Builds with CUDA
......@@ -304,7 +315,7 @@ rocm-maxset:
script:
- export with_cuda=false test_timeout=900 check_skip_long=true
- export OMPI_MCA_btl_vader_single_copy_mechanism=none
- export myconfig=maxset
- export myconfig=maxset python_version=3
- bash maintainer/CI/build_cmake.sh
tags:
- docker
......
......@@ -388,7 +388,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(BOOST_MINIMUM_VERSION "1.66.0")
endif()
else()
set(BOOST_MINIMUM_VERSION "1.53.0")
set(BOOST_MINIMUM_VERSION "1.55.0")
endif()
# old Boost.MPI versions contain a use-after-free bug that seems to only cause crashes on 32-bit architectures
......
......@@ -459,7 +459,7 @@ everything in multiples of the van-der-Waals binding energy of the
respective particles.
The final choice is the time (or mass) scale. By default, |es| uses a reduced
mass of 1, so that the mass unit is simply the mass of all particles.
mass of 1 for all particles, so that the mass unit is simply the mass of one particle.
Combined with the energy and length scale, this is sufficient to derive
the resulting time scale:
......
......@@ -298,8 +298,6 @@ void Correlator::initialize() {
m_correlation_args[0] = m_correlation_args[0] * m_correlation_args[0];
m_correlation_args[1] = m_correlation_args[1] * m_correlation_args[1];
m_correlation_args[2] = m_correlation_args[2] * m_correlation_args[2];
fprintf(stderr, "args2: %f %f %f\n", m_correlation_args[0],
m_correlation_args[1], m_correlation_args[2]);
if (dim_A % 3)
throw std::runtime_error(init_errors[18]);
m_dim_corr = dim_A / 3;
......
......@@ -166,12 +166,15 @@ public:
* the linear compression method)
* @param compress2_ how the B values should be compressed (usually
* the linear compression method)
* @param correlation_args_ optional arguments for the correlation function
* (currently only used when @p corr_operation is "fcs_acf")
*
*/
Correlator(int tau_lin, double tau_max, int delta_N, std::string compress1_,
std::string compress2_, std::string corr_operation, obs_ptr obs1,
obs_ptr obs2)
: AccumulatorBase(delta_N), finalized(0), t(0), m_tau_lin(tau_lin),
obs_ptr obs2, Utils::Vector3d correlation_args_ = {})
: AccumulatorBase(delta_N), finalized(0), t(0),
m_correlation_args(correlation_args_), m_tau_lin(tau_lin),
m_dt(delta_N * time_step), m_tau_max(tau_max),
compressA_name(std::move(compress1_)),
compressB_name(std::move(compress2_)),
......
......@@ -22,22 +22,16 @@
#ifndef ESPRESSO_H5MD_CORE_HPP
#define ESPRESSO_H5MD_CORE_HPP
#include "MpiCallbacks.hpp"
#include "PartCfg.hpp"
#include "cells.hpp"
#include "global.hpp"
#include <algorithm>
#include <boost/filesystem.hpp>
#include <fstream>
#include <h5xx/h5xx.hpp>
#include <iostream>
#include <mpi.h>
#include <string>
#include <unordered_map>
#define BOOST_NO_CXX11_SCOPED_ENUMS
#include <boost/filesystem.hpp>
#undef BOOST_NO_CXX11_SCOPED_ENUMS
#include "communication.hpp"
#include <h5xx/h5xx.hpp>
#include "PartCfg.hpp"
namespace Writer {
namespace H5md {
......
......@@ -29,6 +29,7 @@
#include "core/accumulators/Correlator.hpp"
#include "observables/Observable.hpp"
#include "utils/Vector.hpp"
#include "utils/as_const.hpp"
#include <memory>
......@@ -71,7 +72,7 @@ public:
get_value_or<std::string>(args, "compress1", ""),
get_value_or<std::string>(args, "compress2", ""),
get_value<std::string>(args, "corr_operation"), m_obs1->observable(),
m_obs2->observable());
m_obs2->observable(), get_value_or<Utils::Vector3d>(args, "args", {}));
}
std::shared_ptr<::Accumulators::Correlator> correlator() {
......
......@@ -41,9 +41,9 @@ namespace Utils {
*/
template <class T>
auto make_lin_space(T start, T stop, size_t number, bool endpoint = true) {
using boost::make_counting_iterator;
using boost::make_iterator_range;
using boost::iterators::make_counting_iterator;
using boost::iterators::make_transform_iterator;
using boost::make_transform_iterator;
auto const dx = (stop - start) / (number - endpoint);
auto x = [dx, start](size_t i) { return start + i * dx; };
......
......@@ -17,6 +17,7 @@
import unittest as ut
import importlib_wrapper
import numpy as np
sample, skipIfMissingFeatures = importlib_wrapper.configure_and_import(
"@SAMPLES_DIR@/observables_correlators.py")
......@@ -26,6 +27,10 @@ sample, skipIfMissingFeatures = importlib_wrapper.configure_and_import(
class Sample(ut.TestCase):
system = sample.system
def test_fcs_acf(self):
fcs_acf_weights = sample.fcs.get_params()['args']
np.testing.assert_allclose(fcs_acf_weights, [100., 100., 100.])
if __name__ == "__main__":
ut.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment