Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenSource
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
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Willem Thorbecke
OpenSource
Commits
d19130a0
Commit
d19130a0
authored
6 years ago
by
Jan Thorbecke
Browse files
Options
Downloads
Patches
Plain Diff
adding #ifdeg for OpenMP specific parts
parent
e2bf92e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corrvir/corrvir.c
+6
-0
6 additions, 0 deletions
corrvir/corrvir.c
fdelmodc/threadAffinity.c
+1
-1
1 addition, 1 deletion
fdelmodc/threadAffinity.c
with
7 additions
and
1 deletion
corrvir/corrvir.c
+
6
−
0
View file @
d19130a0
...
...
@@ -11,10 +11,12 @@
double
wallclock_time
(
void
);
#ifdef _OPENMP
int
omp_get_max_threads
(
void
);
int
omp_get_num_threads
(
void
);
int
omp_get_thread_num
(
void
);
void
omp_set_num_threads
(
int
num_threads
);
#endif
typedef
struct
{
/* complex number */
float
r
,
i
;
...
...
@@ -383,7 +385,9 @@ int main (int argc, char **argv)
c
=
(
complex
*
)
malloc
((
ntfft
/
2
+
1
)
*
sizeof
(
complex
));
//itrace_out=0;
#ifdef _OPENMP
fprintf
(
stderr
,
"Number of OpenMP threads set = %d number=%d
\n
"
,
omp_get_max_threads
(),
omp_get_thread_num
());
#endif
ivs
=
0
;
while
(
ivs
<
nvsrc
)
{
/* loop over the number of virtual source positions to be created */
...
...
@@ -638,7 +642,9 @@ int main (int argc, char **argv)
{
if
(
verbose
>=
3
)
{
t3_ivs
=
wallclock_time
();
#ifdef _OPENMP
fprintf
(
stderr
,
"Number of OpenMP threads set = %d number=%d
\n
"
,
omp_get_max_threads
(),
omp_get_thread_num
());
#endif
//tlogic_ivs = ((t3_ivs-t1_ivs)-tread_ivs-tfft_ivs-tcorr_ivs-twrite_ivs-tmemcpy);
fprintf
(
stderr
,
"************* Timings ************* vshot= %d (ivs = %d)
\n
"
,
vspeg
,
ivs
);
//fprintf(stderr,"CPU-time read data = %.3f\n", tread_ivs);
...
...
This diff is collapsed.
Click to expand it.
fdelmodc/threadAffinity.c
+
1
−
1
View file @
d19130a0
...
...
@@ -94,7 +94,7 @@ void threadAffinity(void)
/* for use inside parallel region */
#pragma omp critical
{
#ifdef _
_USE_GNU
#ifdef _
OPENMP
thread
=
omp_get_thread_num
();
#else
thread
=
1
;
...
...
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