Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
elpa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
elpa
elpa
Commits
f8b7ddb9
Commit
f8b7ddb9
authored
Jun 12, 2018
by
Andreas Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a newly introduced error in OpenMP code path
parent
6385071d
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
6 deletions
+34
-6
src/elpa1/elpa1_merge_systems_real_template.F90
src/elpa1/elpa1_merge_systems_real_template.F90
+0
-1
src/elpa1/legacy_interface/elpa_solve_tridi.F90
src/elpa1/legacy_interface/elpa_solve_tridi.F90
+14
-0
src/elpa_index.c
src/elpa_index.c
+7
-5
test/Fortran/test.F90
test/Fortran/test.F90
+13
-0
No files found.
src/elpa1/elpa1_merge_systems_real_template.F90
View file @
f8b7ddb9
...
...
@@ -438,7 +438,6 @@
#ifdef WITH_OPENMP
call
obj
%
timer
%
start
(
"OpenMP parallel"
//
PRECISION_SUFFIX
)
! OPENMP_CHANGE here
!$OMP PARALLEL PRIVATE(i,my_thread,delta,s,info,j)
my_thread
=
omp_get_thread_num
()
!$OMP DO
...
...
src/elpa1/legacy_interface/elpa_solve_tridi.F90
View file @
f8b7ddb9
...
...
@@ -62,6 +62,9 @@
&
_
impl
use
elpa
use
elpa_abstract_impl
#ifdef WITH_OPENMP
use
omp_lib
#endif
implicit
none
integer
(
kind
=
ik
)
::
na
,
nev
,
ldq
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
real
(
kind
=
REAL_DATATYPE
)
::
d
(
na
),
e
(
na
)
...
...
@@ -75,6 +78,9 @@
logical
::
success
! the return value
integer
::
error
class
(
elpa_t
),
pointer
::
obj
#ifdef WITH_OPENMP
integer
::
nrThreads
#endif
!call timer%start("elpa_solve_tridi_&
!&PRECISION&
...
...
@@ -132,6 +138,14 @@
return
endif
#ifdef WITH_OPENMP
nrThreads
=
omp_get_max_threads
()
call
obj
%
set
(
"omp_threads"
,
nrThreads
,
error
)
#else
call
obj
%
set
(
"omp_threads"
,
1
,
error
)
#endif
if
(
wantDebug
)
then
call
obj
%
set
(
"debug"
,
1
,
error
)
if
(
error
.ne.
ELPA_OK
)
then
...
...
src/elpa_index.c
View file @
f8b7ddb9
...
...
@@ -708,14 +708,12 @@ static int omp_threads_cardinality(elpa_index_t index) {
if
(
set_max_threads_glob
==
0
)
{
max_threads_glob
=
omp_get_max_threads
();
set_max_threads_glob
=
1
;
//printf("Setting global max threads to %d \n",max_threads_glob);
}
#else
max_threads_glob
=
1
;
set_max_threads_glob
=
1
;
#endif
max_threads
=
max_threads_glob
;
//printf("Setting max threads to %d \n",max_threads);
return
max_threads
;
}
...
...
@@ -726,11 +724,15 @@ static int omp_threads_enumerate(elpa_index_t index, int i) {
static
int
omp_threads_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
)
{
int
max_threads
;
#ifdef WITH_OPENMP
max_threads
=
max_threads_glob
;
if
(
set_max_threads_glob
==
0
)
{
max_threads_glob
=
omp_get_max_threads
();
set_max_threads_glob
=
1
;
}
#else
max_threads
=
1
;
max_threads_glob
=
1
;
set_max_threads_glob
=
1
;
#endif
//printf("In valid max threads to %d \n",max_threads)
;
max_threads
=
max_threads_glob
;
return
(
1
<=
new_value
)
&&
(
new_value
<=
max_threads
);
}
...
...
test/Fortran/test.F90
View file @
f8b7ddb9
...
...
@@ -120,6 +120,9 @@ program test
#ifdef HAVE_REDIRECT
use
test_redirect
#endif
#ifdef WITH_OPENMP
use
omp_lib
#endif
implicit
none
...
...
@@ -176,6 +179,10 @@ program test
do_test_toeplitz_eigenvalues
,
do_test_cholesky
,
&
do_test_hermitian_multiply
#ifdef WITH_OPENMP
integer
::
max_threads
#endif
call
read_input_parameters_traditional
(
na
,
nev
,
nblk
,
write_to_file
,
skip_check_correctness
)
call
setup_mpi
(
myid
,
nprocs
)
#ifdef HAVE_REDIRECT
...
...
@@ -568,6 +575,12 @@ program test
assert_elpa_ok
(
error
)
#endif
#ifdef WITH_OPENMP
max_threads
=
omp_get_max_threads
()
call
e
%
set
(
"omp_threads"
,
max_threads
,
error
)
assert_elpa_ok
(
error
)
#endif
if
(
myid
==
0
)
print
*
,
""
#ifdef TEST_ALL_KERNELS
...
...
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