Simple update
This commit is contained in:
parent
da46ac228c
commit
7029ccda2a
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ include ./bench/config.mk
|
||||
|
||||
MAIN = README.org
|
||||
|
||||
$(SOURCES_FILE): $(MAIN)
|
||||
$(SOURCES_FILE): $(MAIN) config.el
|
||||
echo -n "SOURCES = " > $@
|
||||
$(EMACS) --eval '(atrip-print-sources)' >> $@
|
||||
|
||||
|
||||
1882
README.org
1882
README.org
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,9 @@ int main(int argc, char** argv) {
|
||||
, Vppph(4, vvvo.data(), symmetries.data(), world)
|
||||
;
|
||||
|
||||
atrip::Atrip::init();
|
||||
atrip::Atrip::run({&ei, &ea, &Tph, &Tpphh, &Vpphh, &Vhhhp, &Vppph});
|
||||
|
||||
std::cout << "Hello world" << std::endl;
|
||||
MPI_Finalize();
|
||||
return 0;
|
||||
|
||||
25
config.el
25
config.el
@ -1,4 +1,5 @@
|
||||
(require 'subr-x)
|
||||
(require 'org)
|
||||
|
||||
(defun f-join (&rest args)
|
||||
(string-join args "/"))
|
||||
@ -7,11 +8,29 @@
|
||||
(defun atrip-print-sources ()
|
||||
(princ (string-join atrip-sources " ")))
|
||||
|
||||
(defvar atrip-include-f "include/atrip") ;; TODO: create defvar
|
||||
(defvar atrip-src-f "src/atrip") ;; TODO: create defvar
|
||||
|
||||
(defmacro atrip-def (name body) `(progn (defun ,name () ,body)
|
||||
(push (,name) atrip-sources)))
|
||||
|
||||
|
||||
(defmacro atrip-def-src (name body)
|
||||
`(atrip-def ,name (f-join atrip-src-f ,body)))
|
||||
(defmacro atrip-def-hdr (name body)
|
||||
`(atrip-def ,name (f-join atrip-include-f ,body)))
|
||||
|
||||
;; atrip variables for the org-mode file
|
||||
(atrip-def atrip-include-f "include/atrip")
|
||||
(atrip-def atrip-slice-h (f-join (atrip-include-f) "Slice.hpp"))
|
||||
(atrip-def atrip-utils-h (f-join (atrip-include-f) "Utils.hpp"))
|
||||
(atrip-def-hdr atrip-slice-h "Slice.hpp")
|
||||
(atrip-def-hdr atrip-slice-union-h "SliceUnion.hpp")
|
||||
(atrip-def-hdr atrip-utils-h "Utils.hpp")
|
||||
(atrip-def-hdr atrip-blas-h "Blas.hpp")
|
||||
(atrip-def-hdr atrip-rankmap-h "RankMap.hpp")
|
||||
(atrip-def-hdr atrip-unions-h "Unions.hpp")
|
||||
(atrip-def-hdr atrip-tuples-h "Tuples.hpp")
|
||||
(atrip-def-hdr atrip-equations-h "Equations.hpp")
|
||||
|
||||
(atrip-def-hdr atrip-atrip-h "Atrip.hpp")
|
||||
(atrip-def-src atrip-atrip-cxx "Atrip.cxx")
|
||||
|
||||
(atrip-def atrip-main-h "include/atrip.hpp")
|
||||
|
||||
@ -6,5 +6,6 @@ CXXFLAGS += -I$(ATRIP_ROOT)/include
|
||||
|
||||
CXXFLAGS += -I$(CTF_INCLUDE_PATH)
|
||||
LDFLAGS += -Wl,-Bstatic -L$(CTF_BUILD_PATH)/lib -lctf
|
||||
LDFLAGS += -fopenmp -L/usr/lib -lscalapack -L/opt/OpenBLAS/lib -lopenblas
|
||||
LDFLAGS += -fopenmp -L/usr/lib -L/opt/OpenBLAS/lib -lopenblas
|
||||
LDFLAGS += -L/usr/local/lib -lscalapack
|
||||
LDFLAGS += -Wl,-Bdynamic
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
CTF_REPOSITORY = https://github.com/cyclops-community/ctf
|
||||
CTF_COMMIT ?= v1.5.0
|
||||
|
||||
CTF_SRC_PATH = $(ATRIP_ROOT)/lib/src/ctf/$(CTF_COMMIT)
|
||||
CTF_BUILD_PATH = $(ATRIP_ROOT)/lib/build/ctf/$(CTF_COMMIT)
|
||||
CTF_SRC_PATH = $(ATRIP_ROOT)/extern/src/ctf/$(CTF_COMMIT)
|
||||
CTF_BUILD_PATH = $(ATRIP_ROOT)/extern/build/ctf/$(CTF_COMMIT)
|
||||
|
||||
CTF_CONFIG_FLAGS =
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EMACS = emacs -q --batch --load config.el
|
||||
define tangle
|
||||
$(EMACS) $(1) --eval "(require 'org)" --eval '(org-babel-tangle)'
|
||||
$(EMACS) $(1) --eval '(org-babel-tangle)'
|
||||
endef
|
||||
|
||||
|
||||
56
etc/nix/scalapack.nix
Normal file
56
etc/nix/scalapack.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, openssh
|
||||
, gfortran, mpi, blas, lapack
|
||||
} :
|
||||
|
||||
assert (!blas.isILP64) && (!lapack.isILP64);
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "scalapack";
|
||||
version = "2.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Reference-ScaLAPACK";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1c10d18gj3kvpmyv5q246x35hjxaqn4ygy1cygaydhyxnm4klzdj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake openssh ];
|
||||
buildInputs = [ mpi gfortran blas lapack ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray+=(
|
||||
-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON
|
||||
-DLAPACK_LIBRARIES="-llapack"
|
||||
-DBLAS_LIBRARIES="-lblas"
|
||||
)
|
||||
'';
|
||||
|
||||
# Increase individual test timeout from 1500s to 10000s because hydra's builds
|
||||
# sometimes fail due to this
|
||||
checkFlagsArray = [ "ARGS=--timeout 10000" ];
|
||||
|
||||
preCheck = ''
|
||||
# make sure the test starts even if we have less than 4 cores
|
||||
export OMPI_MCA_rmaps_base_oversubscribe=1
|
||||
|
||||
# Fix to make mpich run in a sandbox
|
||||
export HYDRA_IFACE=lo
|
||||
|
||||
# Run single threaded
|
||||
export OMP_NUM_THREADS=1
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.netlib.org/scalapack/";
|
||||
description = "Library of high-performance linear algebra routines for parallel distributed memory machines";
|
||||
license = licenses.bsd3;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ costrouc markuskowa ];
|
||||
};
|
||||
|
||||
}
|
||||
19
shell.nix
19
shell.nix
@ -14,4 +14,23 @@ pkgs.mkShell rec {
|
||||
emacs
|
||||
];
|
||||
|
||||
scalapack = import ./etc/nix/scalapack.nix {
|
||||
lib = pkgs.lib;
|
||||
stdenv = pkgs.stdenv;
|
||||
fetchFromGitHub = pkgs.fetchFromGitHub;
|
||||
cmake = pkgs.cmake;
|
||||
openssh = pkgs.openssh;
|
||||
gfortran = pkgs.gfortran;
|
||||
mpi = pkgs.mpi;
|
||||
blas = pkgs.blas;
|
||||
lapack = pkgs.lapack;
|
||||
};
|
||||
|
||||
shellHook = ''
|
||||
export LAPACK_PATH=${pkgs.lapack}
|
||||
export BLAS_PATH=${pkgs.blas}
|
||||
export SCALAPACK_PATH=${scalapack}
|
||||
export LD_LIBRARY_PATH=${scalapack}/lib:$LD_LIBRARY_PATH
|
||||
'';
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user