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
a0880a1e
Commit
a0880a1e
authored
Jul 07, 2016
by
Lorenz Huedepohl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test in configure if "use mpi" can be used
parent
3b812ca4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
53 deletions
+88
-53
configure.ac
configure.ac
+60
-41
src/elpa2_kernels/elpa2_kernels_real_bgq.f90
src/elpa2_kernels/elpa2_kernels_real_bgq.f90
+4
-8
src/mod_mpi.F90
src/mod_mpi.F90
+7
-3
test/Fortran/read_real.F90
test/Fortran/read_real.F90
+11
-0
test_project/src/test_real.F90
test_project/src/test_real.F90
+6
-1
No files found.
configure.ac
View file @
a0880a1e
...
...
@@ -263,26 +263,26 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
)
AC_MSG_RESULT([${can_compile_avx}])
#
if test "${can_compile_avx}" = "yes" ; then
#
AC_MSG_CHECKING([whether we can compile AVX intrinsics in C++])
#
AC_LANG_PUSH([C++])
#
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#
#include <x86intrin.h>
#
int main(int argc, char **argv){
#
double* q;
#
__m256d a1_1 = _mm256_load_pd(q);
#
return 0;
#
}
#
])],
#
[can_compile_avx=yes],
#
[can_compile_avx=no]
#
)
#
AC_LANG_POP([C++])
#
AC_MSG_RESULT([${can_compile_avx}])
#
if test "${can_compile_avx}" = "no" ; then
#
AC_MSG_WARN([Cannot compile C++ with AVX: disabling AVX alltogether])
#
fi
#
fi
dnl
if test "${can_compile_avx}" = "yes" ; then
dnl
AC_MSG_CHECKING([whether we can compile AVX intrinsics in C++])
dnl
AC_LANG_PUSH([C++])
dnl
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
dnl
#include <x86intrin.h>
dnl
int main(int argc, char **argv){
dnl
double* q;
dnl
__m256d a1_1 = _mm256_load_pd(q);
dnl
return 0;
dnl
}
dnl
])],
dnl
[can_compile_avx=yes],
dnl
[can_compile_avx=no]
dnl
)
dnl
AC_LANG_POP([C++])
dnl
AC_MSG_RESULT([${can_compile_avx}])
dnl
if test "${can_compile_avx}" = "no" ; then
dnl
AC_MSG_WARN([Cannot compile C++ with AVX: disabling AVX alltogether])
dnl
fi
dnl
fi
AC_MSG_CHECKING([whether we can compile AVX2 intrinsics in C])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
...
...
@@ -298,27 +298,28 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
[can_compile_avx2=no]
)
AC_MSG_RESULT([${can_compile_avx2}])
#if test "${can_compile_avx2}" = "yes" ; then
# AC_MSG_CHECKING([whether we can compile AVX2 intrinsics in C++])
# AC_LANG_PUSH([C++])
# AC_COMPILE_IFELSE([AC_LANG_SOURCE([
# #include <x86intrin.h>
# int main(int argc, char **argv){
# double* q;
# __m256d q1 = _mm256_load_pd(q);
# __m256d y1 = _mm256_fmadd_pd(q1, q1, q1);
# return 0;
# }
# ])],
# [can_compile_avx2=yes],
# [can_compile_avx2=no]
# )
# AC_LANG_POP([C++])
# AC_MSG_RESULT([${can_compile_avx2}])
# if test "${can_compile_avx2}" = "no" ; then
# AC_MSG_WARN([Cannot compile C++ with AVX2!])
# fi
#fi
dnl if test "${can_compile_avx2}" = "yes" ; then
dnl AC_MSG_CHECKING([whether we can compile AVX2 intrinsics in C++])
dnl AC_LANG_PUSH([C++])
dnl AC_COMPILE_IFELSE([AC_LANG_SOURCE([
dnl #include <x86intrin.h>
dnl int main(int argc, char **argv){
dnl double* q;
dnl __m256d q1 = _mm256_load_pd(q);
dnl __m256d y1 = _mm256_fmadd_pd(q1, q1, q1);
dnl return 0;
dnl }
dnl ])],
dnl [can_compile_avx2=yes],
dnl [can_compile_avx2=no]
dnl )
dnl AC_LANG_POP([C++])
dnl AC_MSG_RESULT([${can_compile_avx2}])
dnl if test "${can_compile_avx2}" = "no" ; then
dnl AC_MSG_WARN([Cannot compile C++ with AVX2!])
dnl fi
dnl fi
if test "${can_compile_avx}" = "yes" ; then
install_real_avx_block2=yes
...
...
@@ -609,6 +610,24 @@ if test x"${fortran_can_check_environment}" = x"yes" ; then
AC_DEFINE([HAVE_ENVIRONMENT_CHECKING],[1],[Fortran can querry environment variables])
fi
if test x"${with_mpi}" = x"yes"; then
AC_MSG_CHECKING(whether Fortran mpi module can be used)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
program test_mpi_module
use mpi
real :: time
time = MPI_WTime()
end program
])],
[fortran_mpi_module=yes],
[fortran_mpi_module=no]
)
AC_MSG_RESULT([${fortran_mpi_module}])
if test x"${fortran_mpi_module}" = x"yes" ; then
AC_DEFINE([HAVE_MPI_MODULE],[1],[can use Fortran mpi module])
fi
fi
dnl last check whether user wants to compile only a specific kernel
dnl
...
...
src/elpa2_kernels/elpa2_kernels_real_bgq.f90
View file @
a0880a1e
...
...
@@ -109,10 +109,9 @@ contains
subroutine
hh_trafo_kernel_24_bgq
(
q
,
hh
,
nb
,
ldq
,
ldh
,
s
)
use
precision
use
elpa_mpi
implicit
none
include
'mpif.h'
integer
(
kind
=
ik
),
intent
(
in
)
::
nb
,
ldq
,
ldh
real
(
kind
=
rk
),
intent
(
inout
)
::
q
(
ldq
,
*
)
...
...
@@ -317,10 +316,9 @@ contains
subroutine
hh_trafo_kernel_16_bgq
(
q
,
hh
,
nb
,
ldq
,
ldh
,
s
)
use
precision
use
elpa_mpi
implicit
none
include
'mpif.h'
integer
(
kind
=
ik
),
intent
(
in
)
::
nb
,
ldq
,
ldh
real
(
kind
=
rk
),
intent
(
inout
)
::
q
(
ldq
,
*
)
...
...
@@ -475,10 +473,9 @@ contains
subroutine
hh_trafo_kernel_8_bgq
(
q
,
hh
,
nb
,
ldq
,
ldh
,
s
)
use
precision
use
elpa_mpi
implicit
none
include
'mpif.h'
integer
(
kind
=
ik
),
intent
(
in
)
::
nb
,
ldq
,
ldh
real
(
kind
=
rk
),
intent
(
inout
)
::
q
(
ldq
,
*
)
...
...
@@ -582,10 +579,9 @@ contains
subroutine
hh_trafo_kernel_4_bgq
(
q
,
hh
,
nb
,
ldq
,
ldh
,
s
)
use
precision
use
elpa_mpi
implicit
none
include
'mpif.h'
integer
(
kind
=
ik
),
intent
(
in
)
::
nb
,
ldq
,
ldh
real
(
kind
=
rk
),
intent
(
inout
)
::
q
(
ldq
,
*
)
...
...
src/mod_mpi.F90
View file @
a0880a1e
...
...
@@ -47,9 +47,13 @@ module elpa_mpi
#ifndef WITH_MPI
use
elpa_mpi_stubs
#else
#ifdef HAVE_MPI_MODULE
use
mpi
implicit
none
public
include
"mpif.h"
#else
implicit
none
include
'mpif.h'
#endif
#endif
public
end
module
test/Fortran/read_real.F90
View file @
a0880a1e
...
...
@@ -73,8 +73,13 @@ program read_real
#ifdef HAVE_DETAILED_TIMINGS
use
timings
#endif
#ifdef HAVE_MPI_MODULE
use
mpi
implicit
none
#else
implicit
none
include
'mpif.h'
#endif
!-------------------------------------------------------------------------------
! Please set system size parameters below!
...
...
@@ -370,7 +375,13 @@ end
subroutine
read_matrix
(
iunit
,
na
,
a
,
lda
,
nblk
,
my_prow
,
my_pcol
,
np_rows
,
np_cols
)
implicit
none
#ifdef HAVE_MPI_MODULE
use
mpi
implicit
none
#else
implicit
none
include
'mpif.h'
#endif
integer
,
intent
(
in
)
::
iunit
,
na
,
lda
,
nblk
,
my_prow
,
my_pcol
,
np_rows
,
np_cols
real
*
8
,
intent
(
out
)
::
a
(
lda
,
*
)
...
...
test_project/src/test_real.F90
View file @
a0880a1e
...
...
@@ -75,8 +75,13 @@ program test_real_example
use
ELPA1
use
elpa_utilities
,
only
:
error_unit
use
iso_c_binding
#ifdef HAVE_MPI_MODULE
use
mpi
implicit
none
include
"mpif.h"
#else
implicit
none
include
'mpif.h'
#endif
!-------------------------------------------------------------------------------
! Please set system size parameters below!
...
...
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