Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPC_Imaging
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Claudio Gheller
HPC_Imaging
Commits
5671f4d5
Commit
5671f4d5
authored
Apr 11, 2024
by
Claudio Gheller
Browse files
Options
Downloads
Patches
Plain Diff
seg fault on one core execution
parent
57bf64fc
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
init.c
+13
-12
13 additions, 12 deletions
init.c
proto.h
+1
-1
1 addition, 1 deletion
proto.h
with
14 additions
and
13 deletions
init.c
+
13
−
12
View file @
5671f4d5
...
...
@@ -48,9 +48,7 @@ void init(int index)
metaData_calculation
();
// Allocate Data Buffer
// CLAAAAAA assume here that data shape/size will never change across multiple data read
allocate_memory
();
//if (index == 0) allocate_memory();
allocate_memory
(
index
);
// Reading Data
readData
();
...
...
@@ -354,7 +352,7 @@ void metaData_calculation() {
}
void
allocate_memory
()
{
void
allocate_memory
(
int
index
)
{
// DAV: all these arrays can be allocatate statically for the sake of optimization. However be careful that if MPI is used
...
...
@@ -371,6 +369,8 @@ void allocate_memory() {
// Create sector grid
if
(
index
==
0
)
{
size_of_grid
=
2
*
param
.
num_w_planes
*
xaxis
*
yaxis
;
int
size_of_grid_pointers
=
(
3
+
2
*
(
param
.
reduce_method
!=
REDUCE_RING
))
*
size_of_grid
;
...
...
@@ -393,6 +393,7 @@ void allocate_memory() {
// CLAAAAA these two arrays are need ONLY for I/O purposes. Can be improved!
gridss_real
=
gridss_w
+
size_of_grid
;
gridss_img
=
gridss_real
+
size_of_grid
/
2
;
}
}
...
...
This diff is collapsed.
Click to expand it.
proto.h
+
1
−
1
View file @
5671f4d5
...
...
@@ -9,7 +9,7 @@ void read_parameter_file(char *);
void
fileName
(
char
datapath
[
900
],
char
file
[
30
]);
void
readMetaData
(
char
fileLocal
[
1000
]);
void
metaData_calculation
();
void
allocate_memory
();
void
allocate_memory
(
int
);
void
readData
();
#ifdef __cplusplus
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment