Skip to content

Instantly share code, notes, and snippets.

@aeantipov
aeantipov / dask_composite_test.ipynb
Created October 21, 2018 17:15
dask_composite_task test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
//
// This file is a part of pomerol - a scientific ED code for obtaining
// properties of a Hubbard model on a finite-size lattice
//
// Copyright (C) 2010-2014 Andrey Antipov <Andrey.E.Antipov@gmail.com>
// Copyright (C) 2010-2014 Igor Krivenko <Igor.S.Krivenko@gmail.com>
//
// pomerol is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
@aeantipov
aeantipov / kwant_wsl.md
Last active May 18, 2019 17:31
Kwant WSL installation

Kwant WSL (Linux subsytem for Windows) installation

Prerequisites for installation: Windows 10 (updates after September 2016) and Linux subsystem for windows. Linux subsystem is in fact Ubuntu 14.04 Trusty, so the instructions are similar. One could in fact use ubuntu instructions (via sudo apt-get install python3-numpy or pip3 install numpy), but the performance would be suboptimal. In order to get optimal perfomance, one needs to compile LAPACK libraries and numpy/scipy. Two ways are possible: manual installation and package manager (spack).

Spack installation

This way of installation has not been tested, but should be easier to do. Since we don't need binaries and ubuntu trusty is old, one needs a source package manager.

[2016-11-27 20:11:43.027] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:44.027] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:45.026] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:46.035] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:47.026] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:48.026] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:49.027] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:50.026] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:51.026] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-27 20:11:52.026] [warning] [grabber] event_manipulator_ is not ready. Please wa
3c3
< int main() { std::cout << "Hello world" << std::endl; }
---
> int main() { std::cout << "Hello" << std::endl; }
@aeantipov
aeantipov / save_test.cpp
Last active August 29, 2015 14:08
accumulators::SignedObservableType + hdf5
#include <alps/mc/mcbase.hpp>
#include <alps/mc/mpiadapter.hpp>
#include <alps/mc/api.hpp>
#include <alps/mc/stop_callback.hpp>
#include <alps/accumulators.hpp>
#include <alps/params.hpp>
class sim1 : public alps::mcbase {
public:
@aeantipov
aeantipov / reduce_test02.cpp
Last active August 29, 2015 14:07
Crashes of RealVectorObservable on mpi reduce
#include <alps/mc/mcbase.hpp>
#include <alps/mc/mcmpiadapter.hpp>
#include <alps/mc/api.hpp>
#include <alps/accumulator.hpp>
#include <alps/params.hpp>
#include <alps/utility/stop_callback.hpp>
class sim1 : public alps::mcbase {
public:
#include <alps/mc/mcbase.hpp>
#include <alps/mc/mcmpiadapter.hpp>
#include <alps/mc/api.hpp>
#include <alps/accumulator.hpp>
#include <alps/params.hpp>
#include <alps/utility/stop_callback.hpp>
class sim1 : public alps::mcbase {
public:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eba818a..cfbeaee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -398,6 +398,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
configure_file(./cmake/TRIQSConfig.cmake.in Config/TRIQSConfig.cmake @ONLY)
else()
configure_file(./cmake/TRIQSConfig.cmake.in Config/TRIQSConfig1.cmake @ONLY )
+ find_package(Python)
EXEC_PYTHON_SCRIPT( "import re;open('${CMAKE_CURRENT_BINARY_DIR}/Config/TRIQSConfig.cmake','w').write(re.sub(r';*\\s*-framework\\s+([a-zA-Z_][a-zA-Z_0-9]*)',r' \"-framework \\1
@aeantipov
aeantipov / Pade_diff2
Created April 17, 2012 12:48
Pade %15.f diff
1c1
< HDF5 "pytriqs/Base/test/Pade.output.h5" {
---
> HDF5 "../triqs_src/pytriqs/Base/test/Pade.output.h5" {
20,1219c20,1219
< (0,0,0,0): -0.182154339549769, -0.004043478549395,
< (0,0,1,0): -0.182565179324801, -0.004066191898641,
< (0,0,2,0): -0.182978322228694, -0.004089138406826,
< (0,0,3,0): -0.183393790945537, -0.004112321547549,
< (0,0,4,0): -0.183811608485047, -0.004135744861183,