Skip to content

Commit 4eb9c4c

Browse files
authored
Merge pull request #80 from milancurcic/update-build-instructions
Update fpm instructions in light of the required HDF5 dependency
2 parents 9954ccd + 613ab2c commit 4eb9c4c

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,18 @@ Compilers tested include:
6969

7070
#### Building in serial mode
7171

72-
```
73-
fpm build
74-
```
75-
76-
By default, without specifying the build profile, fpm will build neural-fortran
77-
using the debug compiler flags, and without optimization.
78-
To build optimized code, build with the release profile:
79-
80-
```
81-
fpm build --profile release
82-
```
83-
84-
If you're using GFortran, make sure to also pass an additional flag:
72+
With gfortran, the following will create an optimized build of neural-fortran:
8573

8674
```
87-
fpm build --profile release --flag "-fno-frontend-optimize"
75+
fpm build \
76+
--profile release \
77+
--flag "-fno-frontend-optimize -I$HDF5INC -L$HDF5LIB"
8878
```
8979

80+
HDF5 is now a required dependency, so you have to provide it to fpm.
81+
The above command assumes that the `HDF5INC` and `HDF5LIB` environment
82+
variables are set to the include and library paths, respectively, of your
83+
HDF5 install.
9084
The `-fno-frontend-optimize` disables some optimizations that may be harmful
9185
when building neural-fortran.
9286

@@ -98,13 +92,18 @@ Once installed, use the compiler wrappers `caf` and `cafrun` to build and execut
9892
in parallel, respectively:
9993

10094
```
101-
fpm build --compiler caf --profile release --flag "-fno-frontend-optimize"
95+
fpm build \
96+
--compiler caf \
97+
--profile release \
98+
--flag "-fno-frontend-optimize -I$HDF5INC -L$HDF5LIB"
10299
```
103100

104101
#### Testing with fpm
105102

106103
```
107-
fpm test
104+
fpm test \
105+
--profile release \
106+
--flag "-fno-frontend-optimize -I$HDF5INC -L$HDF5LIB"
108107
```
109108

110109
For the time being, you need to specify the same compiler flags to `fpm test`

0 commit comments

Comments
 (0)