@@ -13,24 +13,6 @@ if(NOT CMAKE_BUILD_TYPE)
13
13
set (CMAKE_BUILD_TYPE "release" )
14
14
endif ()
15
15
16
- # handle integer size
17
- if (INT)
18
- message (STATUS "Configuring build for ${INT} -bit integers" )
19
- add_definitions (-DINT${INT} )
20
- else ()
21
- message (STATUS "Configuring build for 32-bit integers" )
22
- add_definitions (-DINT32)
23
- endif ()
24
-
25
- # handle real size
26
- if (REAL)
27
- message (STATUS "Configuring build for ${REAL} -bit reals" )
28
- add_definitions (-DREAL${REAL} )
29
- else ()
30
- message (STATUS "Configuring build for 32-bit reals" )
31
- add_definitions (-DREAL32)
32
- endif ()
33
-
34
16
if (SERIAL)
35
17
message (STATUS "Configuring build for serial execution" )
36
18
else ()
@@ -51,9 +33,8 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
51
33
message (STATUS "Configuring build to use BLAS from ${BLAS} " )
52
34
endif ()
53
35
54
- set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -cpp" )
55
- set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -C -fbacktrace" )
56
- set (CMAKE_Fortran_FLAGS_RELEASE "-O3 -ffast-math" )
36
+ set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fcheck=bounds -fbacktrace" )
37
+ set (CMAKE_Fortran_FLAGS_RELEASE "-Ofast -fno-frontend-optimize" )
57
38
endif ()
58
39
59
40
# compiler flags for ifort
@@ -64,7 +45,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
64
45
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -coarray=single" )
65
46
endif ()
66
47
67
- set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpp - assume byterecl,realloc_lhs -heap-arrays " )
48
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -assume byterecl" )
68
49
set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -C -traceback" )
69
50
set (CMAKE_Fortran_FLAGS_RELEASE "-O3" )
70
51
@@ -83,36 +64,49 @@ endif()
83
64
84
65
# library to archive (libneural.a)
85
66
add_library (neural
86
- src/mod_activation.f90
87
- src/mod_activation_submodule.f90
88
- src/mod_io.f90
89
- src/mod_io_submodule.f90
90
- src/mod_kinds.f90
91
- src/mod_layer.f90
92
- src/mod_layer_submodule.f90
93
- src/mod_mnist.f90
94
- src/mod_mnist_submodule.f90
95
- src/mod_network.f90
96
- src/mod_network_submodule.f90
97
- src/mod_parallel.f90
98
- src/mod_parallel_submodule.f90
99
- src/mod_random.f90
100
- src/mod_random_submodule.f90
67
+ src/nf_activation.f90
68
+ src/nf_base_layer.f90
69
+ src/nf_base_layer_submodule.f90
70
+ src/nf_conv2d_layer.f90
71
+ src/nf_datasets_mnist.f90
72
+ src/nf_datasets_mnist_submodule.f90
73
+ src/nf_dense_layer.f90
74
+ src/nf_dense_layer_submodule.f90
75
+ src/nf.f90
76
+ src/nf_input1d_layer.f90
77
+ src/nf_input1d_layer_submodule.f90
78
+ src/nf_input3d_layer.f90
79
+ src/nf_input3d_layer_submodule.f90
80
+ src/nf_io.f90
81
+ src/nf_io_submodule.f90
82
+ src/nf_layer_constructors.f90
83
+ src/nf_layer_constructors_submodule.f90
84
+ src/nf_layer.f90
85
+ src/nf_layer_submodule.f90
86
+ src/nf_loss.f90
87
+ src/nf_loss_submodule.f90
88
+ src/nf_network.f90
89
+ src/nf_network_submodule.f90
90
+ src/nf_optimizers.f90
91
+ src/nf_parallel.f90
92
+ src/nf_parallel_submodule.f90
93
+ src/nf_random.f90
94
+ src/nf_random_submodule.f90
101
95
)
102
96
103
97
# Remove leading or trailing whitespace
104
98
string (REGEX REPLACE "^ | $" "" LIBS "${LIBS} " )
105
99
106
100
# tests
107
101
enable_testing ()
108
- foreach (execid mnist network_save network_sync set_activation_function )
102
+ foreach (execid input1d_layer dense_layer dense_network )
109
103
add_executable (test_${execid} test /test_${execid} .f90)
110
104
target_link_libraries (test_${execid} neural ${LIBS} )
111
105
add_test (test_${execid} bin/test_${execid} )
112
106
endforeach ()
113
107
114
- foreach (execid mnist mnist_epochs save_and_load simple sine)
115
- add_executable (example_ ${execid} example/example_ ${execid} .f90)
116
- target_link_libraries (example_ ${execid} neural ${LIBS} )
117
- add_test (example_${execid} bin/example_${execid} )
108
+ foreach (execid mnist simple sine)
109
+ add_executable (${execid} example/${execid} .f90)
110
+ target_link_libraries (${execid} neural ${LIBS} )
111
+ # add_test(example_${execid} bin/example_${execid})
118
112
endforeach ()
0 commit comments