From daab1fe5880c47695c6e21124f99aa6b2589aba1 Mon Sep 17 00:00:00 2001 From: Engbert Miedema Date: Mon, 29 Nov 2021 11:19:51 +0100 Subject: [PATCH] Updated README to include build instructions for including dependencies without root --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4203569..e62ddea 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This code uses a Kinetic Monte Carlo simulation to estimate the behaviour of variable range hopping in Dopant Networks. More information can be found [here](https://www.researchsquare.com/article/rs-757616/latest.pdf). -## Installation +## Installation (with root) This installation guide has been written using Ubuntu on WSL2 (Windows Subsystem for Linux), but should be usable on a range of linux operating systems. Install the dependencies through apt (for Ubuntu/Debian): @@ -28,6 +28,31 @@ conda create --name mcnetwork numpy scipy matplotlib h5py conda activate mcnetwork ``` +## Installation (without root) +On systems without libhdf5 and no root one has to manually include libhdf5. + +Note: Replace the HDF download link by the appropriate CMake version, which can be found [here](https://portal.hdfgroup.org/display/support/Downloads). +```bash +git clone https://github.com/MUTUEL/MCNetwork.git +git clone https://github.com/mfem/mfem.git +mkdir mfem-build && cd mfem-build +cmake ../mfem +make ../mfem + +wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.N/hdf5-1.N.N/src/.tar.gz +gzip -cd .tar.gz | tar xvf - +cd CMake-hdf5- +./build-unix.sh +cp HDF5--Linux.tar.gz .. +cd .. +tar -xvf HDF5--Linux.tar.gz + +mkdir MCNetwork/build && cd MCNetwork/build +env MFEM_DIR=../../mfem-build HDF5_DIR=../../HDF5--Linux/HDF_Group/HDF5//share/cmake/hdf5 cmake .. +make +``` +These install instruction have been adapted from the [HDF5 Building with CMake manual](https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake). + ## Usage Define the device parameters you want to use in `data/in.txt`. To make a new device with Monte Carlo optimization and random voltages go to the `data` folder in your shell and enter the following command: ```bash