Skip to content

Commit fe134a9

Browse files
committed
Add instructions for running tests
1 parent cfb6c3b commit fe134a9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ in parallel, respectively:
6060
fpm build --compiler caf --flag "-cpp -DCAF -O3 -ffast-math"
6161
```
6262

63+
#### Testing with fpm
64+
65+
```
66+
fpm test --flag "-cpp -O3 -ffast-math -fcoarray=single"
67+
```
68+
69+
For the time being, you need to specify the same compiler flags to `fpm test`
70+
as you did in `fpm build` so that fpm can figure out to use the same build
71+
profile.
72+
6373
See [Fortran Package Manager](https://github.com/fortran-lang/fpm) for more info on fpm.
6474

6575
### Building with CMake
@@ -135,6 +145,25 @@ To build with debugging flags enabled, type:
135145
cmake .. -DCMAKE_BUILD_TYPE=debug
136146
```
137147

148+
#### Running tests with CMake
149+
150+
Before running the tests, link the the data/ directory to the current directory:
151+
152+
```
153+
ln -s ../data
154+
```
155+
156+
The MNIST dataset which comes with the code as a tarball must be unpacked first.
157+
See [MNIST training example](#mnist-training-example) on how to do that.
158+
Once the MNIST dataset is unpacked and the data/ directory is linked in your
159+
CMake build/ directory, run
160+
161+
```
162+
ctest
163+
```
164+
165+
to run the tests.
166+
138167
## Examples
139168

140169
### Creating a network

0 commit comments

Comments
 (0)