Skip to content

Instantly share code, notes, and snippets.

View wistaria's full-sized avatar

Synge Todo wistaria

View GitHub Profile
@wistaria
wistaria / intel-qs.patch
Created November 7, 2022 06:35
arm64 workaround for Intel Quantum Simulator
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b0331d..0196ad7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,7 +196,9 @@ endif() # for the MKL configuration
if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
# Ad-hoc modifications to compile and link with g++.
add_compile_options(-O3)
- add_compile_options(-m64)
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES x86_64)
@wistaria
wistaria / gist:fea3674c3e87c6a401c4e0a092c272c5
Last active August 26, 2021 08:57
OpenMX 3.9.6 @ MateriApps LIVE 3.3
sudo apt-get -y install libblas-dev libfftw3-dev liblapack-dev libscalapack-mpi-dev mpi-default-dev
wget http://t-ozaki.issp.u-tokyo.ac.jp/openmx3.9.tar.gz
wget http://www.openmx-square.org/bugfixed/21Aug21/patch3.9.6.tar.gz
tar zxvf openmx3.9.tar.gz
cd openmx3.9/source
tar zxvf ../../patch3.9.6.tar.gz
make CC="mpicc -O3 -fopenmp -Dkcomp" FC="mpif90 -O3 -fopenmp -Dkcomp" LIB="-lscalapack-openmpi -lfftw3 -llapack -lblas -lgfortran -lmpi_mpifh -lm" all
@wistaria
wistaria / 1Ddos.text
Created August 31, 2018 09:13
Sample data file for Gnuplot tutorial
-0.0005000 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004990 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004980 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004970 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004960 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004950 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004940 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004930 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004920 0.0000000 0.0000000 0.0000000 0.0000000
-0.0004910 0.0000000 0.0000000 0.0000000 0.0000000
@wistaria
wistaria / .gitignore
Created January 16, 2018 02:31
LaTeXディレクトリ用標準.gitignoreファイル
*main.aux
*main.dvi
*main.fdb_latexmk
*main.fls
*main.log
*main.pdf
*main.synctex.gz
diff
@wistaria
wistaria / .latexmkrc
Created January 16, 2018 02:16
latexmk用標準設定ファイル
#!/usr/bin/env perl
$latex = 'platex -synctex=1 -halt-on-error';
$latex_silent = 'platex -synctex=1 -halt-on-error -interaction=batchmode';
$bibtex = 'pbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
$makeindex = 'mendex %O -o %D %S';
$max_repeat = 5;
$pdf_mode = 3;
$pvc_view_file_via_temporary = 0;
@wistaria
wistaria / file2.cpp
Created November 15, 2017 18:58
OpenMP並列での擬似乱数の生成方法 ref: https://qiita.com/syngetodo/items/f6641e6fe57b8c806754
#pragma omp parallel
{
int tid = omp_get_thread_num();
for (int p = 0; p < num_threads; ++p) {
if (p == tid)
gens[p].reset(new boost::mt19937(seed_gen));
#pragma omp barrier
}
}
@wistaria
wistaria / build-hphi-for-eccs.sh
Last active May 9, 2017 09:38
ECCSのiMacでHPhiをビルドする手順
#!/bin/sh
set -x
# ソースコードとパッチのダウンロード
wget https://github.com/QLMS/HPhi/releases/download/v2.0.0/HPhi-2.0.0.tar.gz
wget https://gist.github.com/wistaria/3d316f0d90a4949fe71dcb843769175f/raw/HPhi-2.0.0.patch
# コードの展開とパッチの適用
tar zxf HPhi-2.0.0.tar.gz
cd HPhi-2.0.0
diff --git a/src/komega/CMakeLists.txt b/src/komega/CMakeLists.txt
index bbb42633..a1fda843 100644
--- a/src/komega/CMakeLists.txt
+++ b/src/komega/CMakeLists.txt
@@ -5,9 +5,14 @@ if(${CMAKE_PROJECT_NAME} STREQUAL "Project")
endif(${CMAKE_PROJECT_NAME} STREQUAL "Project")
set(SOURCES_KOMEGA komega_bicg.F90 komega_math.F90 komega_vals.F90)
-add_definitions(${MPI_Fortran_COMPILE_FLAGS})
-include_directories(${MPI_Fortran_INCLUDE_PATH})
*** alps_20160816~r7711.orig/tool/alpsvars.sh.in
--- alps_20160816~r7711/tool/alpsvars.sh.in
***************
*** 4,11 ****
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
! ALPS_HOME="@CMAKE_INSTALL_PREFIX@"; export ALPS_HOME
! ALPS_ROOT="@CMAKE_INSTALL_PREFIX@"; export ALPS_ROOT
@wistaria
wistaria / build-alps-for-eccs.sh
Last active April 13, 2017 10:10
ECCSのiMacで(移動可能な)ALPSをビルドする手順
#!/bin/sh
# ソースのダウンロード
mkdir alps-build
cd alps-build
wget -O - https://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2 | tar jxf -
wget -O - https://sourceforge.net/projects/materiappslive/files/Debian/archive/wheezy/alps_20160816~r7711.orig.tar.gz | tar zxf -
wget https://gist.github.com/wistaria/cf77f15fe35c1d145d865f58e7f27377/raw/alps-for-eccs.patch
# alpsvars.shへのパッチ