Advent of Code 2024 with Modern Fortran.
All the cases can be compiled and run using the Fortran Package Manager.
To build a conda environment using pixi and activate it:
pixi init env
cd env
pixi add gfortran=13.2 fpm=0.10.0 ford=7.0 python=3.13 graphviz=12.0 numpy==2.1 ipython==8.30
pixi shell
fpm run --profile release problem_01
fpm run --profile release --all
Problem | Stars | Solution | Runtime† |
---|---|---|---|
1 | ⭐⭐ | problem_01.f90 | 1 ms |
2 | ⭐⭐ | problem_02.f90 | 4 ms |
3 | ⭐⭐ | problem_03.f90 | 1 ms |
4 | ⭐⭐ | problem_04.f90 | 36 ms |
5 | ⭐⭐ | problem_05.f90 | 9 ms |
6 | ⭐⭐ | problem_06.f90 | 33 ms |
7 | ⭐⭐ | problem_07.f90 | 242 ms |
8 | ⭐⭐ | problem_08.f90 | <1 ms |
9 | ⭐⭐ | problem_09.f90 | 825 ms |
10 | ⭐⭐ | problem_10.f90 | < 1 ms |
11 | ⭐⭐ | problem_11.f90 | 318 ms |
12 | ⭐⭐ | problem_12.f90 | 42 ms |
13 | ⭐⭐ | problem_13.f90 | 1 ms |
14 | ⭐⭐ | problem_14.f90 | 97 ms |
15 | ⭐☆ | problem_15.f90 | |
16 | ☆☆ | problem_16.f90 | |
17 | ☆☆ | problem_17.f90 | |
18 | ☆☆ | problem_18.f90 | |
19 | ☆☆ | problem_19.f90 | |
20 | ☆☆ | problem_20.f90 | |
21 | ☆☆ | problem_21.f90 | |
22 | ☆☆ | problem_22.f90 | |
23 | ☆☆ | problem_23.f90 | |
24 | ☆☆ | problem_24.f90 | |
25 | ☆☆ | problem_25.f90 |
† Runtimes for Apple M1 MacBook Pro.
†† With OpenMP enabled (i.e, add --flag "-fopenmp"
to the FPM call).