Skip to content

Commit 528e517

Browse files
siggmoIshaanDesaisanathkeshav
authored
Improve traditional installation guide (#22)
* Add build toolchain and recommended utilities to installation guide * fix mardown linter problems, and remove minimal installation section * Rework large parts of the README * Further improvements to the README * Update Changelog * Revert "Update Changelog" This reverts commit cb6888c. * fix: Unix file utility is not part of GNU * Refer to FANS_Dashboard explicitly Co-authored-by: Sanath Keshav <[email protected]> --------- Co-authored-by: Ishaan Desai <[email protected]> Co-authored-by: Sanath Keshav <[email protected]>
1 parent 28782a0 commit 528e517

File tree

1 file changed

+49
-38
lines changed

1 file changed

+49
-38
lines changed

README.md

Lines changed: 49 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,63 @@ Fourier Accelerated Nodal Solvers (FANS) is an FFT-based homogenization solver d
44

55
<img src="docs/images/FANS_example.png" alt="Example Image" width="400" height="300">
66

7-
## Table of Contents
7+
## Table of contents
88

9-
- [Installation](#installation)
10-
- [Input File Format](#input-file-format)
9+
- [Dependencies](#dependencies)
10+
- [Building](#building)
11+
- [Installing](#installing)
12+
- [Input file format](#input-file-format)
1113
- [Examples](#examples)
12-
- [Acknowledgements](#acknowledgements)
13-
- [Contributors](#contributors)
1414

15-
## Installation
15+
## Dependencies
1616

17-
### Prerequisites
17+
FANS has the following dependencies:
1818

19-
Before proceeding with the installation, ensure that your system has the necessary dependencies. The prerequisites of FANS can be installed using Spack for a streamlined setup on high-performance computing systems, or through traditional package management for personal use.
20-
21-
### Traditional Installation
22-
23-
If you're setting up FANS on a personal computer or in a non-HPC environment, follow these instructions:
24-
25-
Please ensure you have the following dependencies installed on your system:
26-
27-
- CMake (version 3.0 or higher)
19+
- A C++ compiler (e.g. GCC)
20+
- CMake (version 3.0 or higher) (+ Unix file utility for creating .deb packages)
21+
- Git (for cloning this repo)
2822
- MPI (mpicc and mpic++)
2923
- HDF5 with parallel support
3024
- Eigen3
3125
- FFTW3 with MPI support
3226

33-
Specifically, to run FANS, you at least need the following packages:
27+
### Installing dependencies
28+
29+
We recommend installing the dependencies using a package manager. For example, using `apt`, the following commands are run:
3430

3531
```bash
36-
openmpi-bin libc6 libfftw3-double3 libfftw3-mpi3 libgcc-s1 libgomp1 libhdf5-103 libopenmpi3 libstdc++6
32+
apt-get install \
33+
libhdf5-dev \
34+
libopenmpi-dev \
35+
libeigen3-dev \
36+
libfftw3-dev \
37+
libfftw3-mpi-dev
3738
```
3839

39-
To build fans, you additionally need these packages:
40+
Also, we recommend to set up a Python virtual environment for the `FANS_Dashboard`:
4041

4142
```bash
42-
libhdf5-dev libopenmpi-dev libeigen3-dev libfftw3-dev libfftw3-mpi-dev
43+
apt-get install \
44+
time \
45+
htop \
46+
python3 \
47+
python3-pip \
48+
python3-venv \
49+
python-is-python3 \
50+
python3-dev
51+
52+
python -m venv ~/venvs/FANS
53+
source ~/venvs/FANS/bin/activate
54+
python -m pip install h5py lxml
4355
```
4456

45-
If for some reason you are unable to install these packages directly on your host machine, have a look at the [set of Docker images](docker/) to create and work with FANS within an isolated environment.
57+
We also provide a [set of Docker images](docker/) to work with FANS within an isolated environment.
4658

47-
### Spack Installation (Recommended for Clusters/Supercomputers)
59+
### Installing dependencies using Spack
4860

49-
Spack is a package manager designed for high-performance computing environments. It simplifies the installation of complex software stacks, making it ideal for setting up FANS on large clusters or supercomputers.
61+
Spack is a package manager designed for high-performance computing environments. It simplifies the installation of complex software stacks, making it ideal for setting up FANS on remote systems.
5062

51-
1. **Install Spack**: If you don’t have Spack installed, you can set it up with the following commands:
63+
1. **Install Spack**: If Spack is not installed, set it up with the following commands:
5264

5365
```bash
5466
git clone https://github.com/spack/spack.git
@@ -66,15 +78,15 @@ Spack is a package manager designed for high-performance computing environments.
6678
spack install fftw +mpi
6779
```
6880

69-
You can also use alternative and optimized FFTW implementations depending on your system's architecture like amdfftw (For AMD systems) or cray-fftw (For Cray systems) or fujitsu-fftw (For Fujitsu systems).
81+
Alternatively, optimized FFTW implementations can be used depending on your system's architecture, for example `amdfftw` (For AMD systems) or `cray-fftw` (For Cray systems) or `fujitsu-fftw` (For Fujitsu systems).
7082
7183
3. **Load Dependencies** Once dependencies are installed, you can load them before building:
7284
7385
```bash
7486
spack load cmake mpi hdf5 eigen fftw
7587
```
7688
77-
### Building the Project
89+
## Building
7890
7991
1. Clone the repository:
8092
@@ -83,40 +95,40 @@ Spack is a package manager designed for high-performance computing environments.
8395
cd FANS
8496
```
8597
86-
2. Configure the project using CMake:
98+
2. Configure the build using CMake:
8799
88100
```bash
89101
mkdir build
90102
cd build
91103
cmake ..
92104
```
93105
94-
3. Compile the project:
106+
3. Compile:
95107
96108
```bash
97109
cmake --build . -j
98110
```
99111
100-
The compilation will symlink the generated `FANS` binary into the `test/` directory for convenience.
112+
The compilation symlinks the generated `FANS` binary into the `test/` directory for convenience.
101113
102-
### Build Options
114+
### Configuring a build
103115
104-
This project supports the following CMake build options:
116+
The following CMake configuration options exist:
105117
106118
- `CMAKE_BUILD_TYPE`: Sets the build type. Common values are Debug, Release, RelWithDebInfo, and MinSizeRel.
107119
108120
- `FANS_BUILD_STATIC`: Build static library instead of shared library.
109121
- Default: OFF
110122
- Usage: `-DFANS_BUILD_STATIC=ON`
111123
112-
- `CMAKE_INTERPROCEDURAL_OPTIMIZATION`: Enable interprocedural optimization (IPO) for all targets.
124+
- `CMAKE_INTERPROCEDURAL_OPTIMIZATION`: Enable inter-procedural optimization (IPO) for all targets.
113125
- Default: ON (if supported)
114126
- Usage: `-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF`
115127
- Note: When you run the configure step for the first time, IPO support is automatically checked and enabled if available. A status message will indicate whether IPO is activated or not supported.
116128
117-
### Installing the Project
129+
## Installing
118130
119-
After compiling, you can install FANS (system-wide) using the following options:
131+
Install FANS (system-wide) using the following options:
120132
121133
1. Using CMake (sudo required if --prefix is omitted):
122134
@@ -134,8 +146,7 @@ After compiling, you can install FANS (system-wide) using the following options:
134146
135147
## Input File Format
136148
137-
To run the FANS solver, you need to provide a JSON input file specifying the problem parameters.
138-
Example input files can be found in the [`test/input_files`](test/input_files) directory. You can use these files as a reference to create your own input file. The input file is in JSON format and contains several fields to define the problem settings...
149+
FANS requires a JSON input file specifying the problem parameters. Example input files can be found in the [`test/input_files`](test/input_files) directory. It is recommended to use these files as a reference to create your own input file.
139150
140151
### Microstructure Definition
141152
@@ -218,9 +229,9 @@ In the case of path/time-dependent loading as shown, for example as in plasticit
218229
219230
- Additional material model specific results can be included depending on the problem type and material model.
220231
221-
### Examples
232+
## Examples
222233
223-
If you would like to run some example tests, you can execute the [`run_tests.sh`](test/run_tests.sh) file. For example to run a linear elastic mechanical homogenization problem for a 6 othonormal load cases on a microstructure image of size `32 x 32 x 32` with a single spherical inclusion,
234+
Execute the [`run_tests.sh`](test/run_tests.sh) file to run tests, which are also examples. For example, to run a linear elastic mechanical homogenization problem for a 6 othonormal load cases on a microstructure image of size `32 x 32 x 32` with a single spherical inclusion,
224235
225236
```bash
226237
mpiexec -n 2 ./FANS input_files/test_LinearElastic.json test_results.h5

0 commit comments

Comments
 (0)