Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MolDyn
lib4neuro
Commits
f6ccad98
Commit
f6ccad98
authored
Jun 06, 2018
by
bes0030
Browse files
NEW: Added neuron_m memory leak test with storing into and reading from binary file.
parent
0b3f17c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/neuron_m.f90
View file @
f6ccad98
...
...
@@ -354,6 +354,7 @@ module neuron_m
#endif
this
%
potential
=
0
this
%
state
=
0
!TODO maybe init with values from normal distribution
this
%
id
=
1
!TODO modify - should be index in the whole set of neurons
#ifdef TIME_PROFILING
call
time_profiling_stop
(
start_time
,
'neuron_init_components_impl'
)
...
...
@@ -386,7 +387,6 @@ module neuron_m
integer
,
intent
(
in
)
::
unit
integer
,
intent
(
out
)
::
iostat
character
(
*
),
intent
(
inout
)
::
iomsg
integer
::
i
!< Counter
#ifdef TIME_PROFILING
real
::
start_time
call
time_profiling_start
(
start_time
)
...
...
@@ -405,7 +405,6 @@ module neuron_m
integer
,
intent
(
in
)
::
unit
integer
,
intent
(
out
)
::
iostat
character
(
*
),
intent
(
inout
)
::
iomsg
integer
::
i
#ifdef TIME_PROFILING
real
::
start_time
call
time_profiling_start
(
start_time
)
...
...
src/neuron_m_mem_leak_test.f90
0 → 100644
View file @
f6ccad98
program
neuron_m_mem_leak_test
use
neuron_m
implicit
none
type
(
linear_neuron_t
)
::
ln
type
(
linear_neuron_t
),
allocatable
::
ln2
ln
=
linear_neuron_t
()
allocate
(
ln2
)
open
(
123
,
file
=
'neuron.test'
,
form
=
'unformatted'
)
write
(
123
)
ln
close
(
123
)
open
(
123
,
file
=
'neuron.test'
,
form
=
'unformatted'
)
read
(
123
)
ln2
close
(
123
)
write
(
*
,
*
)
ln2
%
get_potential
(),
ln2
%
get_state
(),
ln2
%
get_id
()
end
program
neuron_m_mem_leak_test
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment