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
10
Issues
10
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
ba85291e
Commit
ba85291e
authored
Apr 28, 2015
by
Andreas Marek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into ELPA_GPU
parents
070e1c1c
4bc629fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
46 deletions
+72
-46
INSTALL
INSTALL
+25
-5
configure.ac
configure.ac
+39
-33
m4/ax_elpa_openmp.m4
m4/ax_elpa_openmp.m4
+8
-8
No files found.
INSTALL
View file @
ba85291e
...
...
@@ -53,14 +53,25 @@ The configure installation is best done in four steps
library. If this is successful, you do not have to specify anything
in this regard. However, this will fail, if you do not use Netlib
Blacs/Scalapack but vendor specific implementations (e.g. Intel's MKL
library or the implementation of Cray).
library or the implementation of Cray
and so forth...
).
Please then
point to your Blacs/Scalapack installation and the
In this case, please
point to your Blacs/Scalapack installation and the
link-line with the variables "SCALAPACK_LDFLAGS" and "SCALAPACK_FCFLAGS".
"SCALAPACK_LDFLAGS" should contain the correct link-line for your
Blacs/Scalapack installation and "SCALAPACK_FCFLAGS" the include path
and any other flags you need at compile time.
For example with Intel's MKL 11.2 library one might have to set
SCALAPACK_LDFLAGS="-L$MKLROOT/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 \
-lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 \
-lpthread -lm -Wl,-rpath,$MKL_HOME/lib/intel64"
and
SCALAPACK_FCFLAGS="-I$MKLROOT/include/intel64/lp64"
Note, that the actual MKL linkline depends on the installed MKL version.
If your libraries are in non-standard locations, you can think about
specifying a runtime library search path ("rpath") in the link-line,
otherwise it will be necessary to update the LD_LIBRARY_PATH environment
...
...
@@ -72,8 +83,9 @@ The configure installation is best done in four steps
1.3 Setting optimizations
Please set the optimisation that you prefer with the
variable "FCFLAGS", "CFLAGS", and "CXXFLAGS",
e.g. FCFLAGS="-O3 -xAVX",
variable "FCFLAGS", "CFLAGS", and "CXXFLAGS",
please see "./src/elpa2_kernels/README_elpa2_kernels.txt".
Note that _NO_ compiler optimization flags are set automatically. It
...
...
@@ -84,12 +96,20 @@ The configure installation is best done in four steps
Note that it is mandatory to set optimization flags for C, C++, and Fortran
since ELPA uses source files and compile steps from all these languages.
Also note that building of the SSE and AVX kernels, requires
compilation with the GNU C Compiler (gcc). It is advised to
set also CFLAGS="-march=native" CXXFLAGS="-march=native",
since otherwise the GNU compiler does not support AVX, even
if the hardware does. If you already included "-mAVX" in the
flags, you can skip "-march=native".
Setting the optimization flags for the AVX kernels can be a hassle. If AVX
kernels are build for your system, you can set the configure option
"--with-avx-optimizations=yes". This will automatically set a few compiler
optimization flags which turned out to be beneficial for AVX support.
However, it might be that on your system/compiler version etc. other flags
are the better choice. AND this
thu
s _not_ set the above mentioned flags,
are the better choice. AND this
doe
s _not_ set the above mentioned flags,
which you should still set by hand:
./configure CFLAGS="-O2" CXXFLAGS="-O2" FCFLAGS="-O2"
...
...
@@ -103,7 +123,7 @@ The configure installation is best done in four steps
1.5 Hybrid OpenMP support
If you want to use the hybrid MPI/OpenMP version of ELPA please specify
"--
with
-openmp". Note that the ELPA library will then contain a "_mt" in
"--
enable
-openmp". Note that the ELPA library will then contain a "_mt" in
it's name to indicate multi threading support.
1.6 Other
...
...
configure.ac
View file @
ba85291e
...
...
@@ -52,6 +52,20 @@ fi
m4_include([fdep/fortran_dependencies.m4])
FDEP_F90_GNU_MAKE_DEPS
###
AC_MSG_CHECKING(whether --enable-openmp is specified)
AC_ARG_ENABLE([openmp],
AS_HELP_STRING([--enable-openmp],
[use OpenMP threading, default no.]),
[],
[enable_openmp=no])
AC_MSG_RESULT([${enable_openmp}])
AM_CONDITIONAL([WITH_OPENMP],[test x"$enable_openmp" = x"yes"])
if test x"${enable_openmp}" = x"yes"; then
AC_DEFINE([WITH_OPENMP], [1], [use OpenMP threading])
fi
dnl check whether mpi compilers are available;
dnl if not abort since it is mandatory
...
...
@@ -59,12 +73,15 @@ dnl if not abort since it is mandatory
AC_LANG([C])
m4_include([m4/ax_prog_cc_mpi.m4])
AX_PROG_CC_MPI([true],[],[AC_MSG_ERROR([no MPI C wrapper found])])
AC_PROG_INSTALL
: ${CFLAGS=""}
: ${CXXFLAGS=""}
#: ${FCLAGS="-O2"}
if test x"${enable_openmp}" = x"yes"; then
AX_ELPA_OPENMP
if test "$ac_cv_prog_cc_openmp" = unsupported; then
AC_MSG_ERROR([Could not compile a C program with OpenMP, adjust CFLAGS])
fi
CFLAGS="$OPENMP_CFLAGS $CFLAGS"
fi
AC_PROG_INSTALL
AM_PROG_AR
AM_PROG_AS
...
...
@@ -74,11 +91,27 @@ AC_LANG([Fortran])
m4_include([m4/ax_prog_fc_mpi.m4])
AX_PROG_FC_MPI([],[],[AC_MSG_ERROR([no MPI Fortran wrapper found])])
if test x"${enable_openmp}" = x"yes"; then
AX_ELPA_OPENMP
if test "$ac_cv_prog_fc_openmp" = unsupported; then
AC_MSG_ERROR([Could not compile a Fortran program with OpenMP, adjust FCFLAGS])
fi
FCFLAGS="$OPENMP_FCFLAGS $FCFLAGS"
fi
# C++
AC_LANG([C++])
AC_PROG_CXX
if test x"${enable_openmp}" = x"yes"; then
AX_ELPA_OPENMP
if test "$ac_cv_prog_cxx_openmp" = unsupported; then
AC_MSG_ERROR([Could not compile a C++ program with OpenMP, adjust CXXFLAGS])
fi
CXXFLAGS="$OPENMP_CXXFLAGS $CXXFLAGS"
fi
...
...
@@ -249,33 +282,6 @@ AC_FC_MODULE_FLAG
AC_FC_MODULE_OUTPUT_FLAG
AC_FC_LIBRARY_LDFLAGS
AC_MSG_CHECKING(whether OpenMP usage is specified)
AC_ARG_WITH([openmp],
AS_HELP_STRING([--with-openmp],
[use OpenMP threading, default no.]),
[with_openmp=yes],
[with_openmp=no])
AC_MSG_RESULT([${with_openmp}])
if test x"${enable_openmp}" = x"yes"; then
with_openmp=yes
AC_MSG_CHECKING(whether --enable-openmp is specified)
AC_MSG_RESULT([${enable_openmp}])
fi
AM_CONDITIONAL([WITH_OPENMP],[test x"$with_openmp" = x"yes"])
if test x"${with_openmp}" = x"yes"; then
AC_DEFINE([WITH_OPENMP], [1], [use OpenMP threading])
AX_ELPA_OPENMP
if test "$ac_cv_prog_fc_openmp" = unsupported; then
AC_MSG_ERROR([Could not compile a program with OpenMP, adjust FCFLAGS])
fi
# Append to flags as this influences which
# kind of MPI library has to be used (thread-safe or not)
FCFLAGS="$OPENMP_FCFLAGS $FCFLAGS"
LDFLAGS="$OPENMP_FCFLAGS $LDFLAGS"
fi
save_FCFLAGS=$FCFLAGS
save_LDFLAGS=$LDFLAGS
...
...
@@ -824,7 +830,7 @@ mkdir modules
# into "postdeps_FC" and causes linking errors later on.
postdeps_FC=$(echo $postdeps_FC | sed 's/-l //g')
if test x"${
with
_openmp}" = x"yes"; then
if test x"${
enable
_openmp}" = x"yes"; then
SUFFIX="_openmp"
else
SUFFIX=""
...
...
m4/ax_elpa_openmp.m4
View file @
ba85291e
...
...
@@ -32,12 +32,12 @@ m4_copy([_AX_ELPA_LANG_OPENMP(C)], [_AX_ELPA_LANG_OPENMP(C++)])
# ---------------------------
m4_define([_AX_ELPA_LANG_OPENMP(Fortran 77)],
[
program test_openmp
use omp_lib
implicit none
!$
integer :: foobar
foobar = omp_get_num_threads()
end program
program test_openmp
use omp_lib
implicit none
!$
integer :: foobar
foobar = omp_get_num_threads()
end program
])
# _AX_ELPA_LANG_OPENMP(Fortran)
...
...
@@ -63,7 +63,7 @@ AC_DEFUN([AX_ELPA_OPENMP],
if test "$enable_openmp" != no; then
AC_CACHE_CHECK([for _AC_LANG_ABBREV option to support OpenMP],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp],
[AC_LINK_IFELSE([
_AX_ELPA_LANG_OPENMP
],
[AC_LINK_IFELSE([
AC_LANG_SOURCE([_AX_ELPA_LANG_OPENMP])
],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='none needed'],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='unsupported'
dnl Try these flags:
...
...
@@ -81,7 +81,7 @@ AC_DEFUN([AX_ELPA_OPENMP],
for ac_option in -openmp -fopenmp -xopenmp -mp -omp -qsmp=omp; do
ac_save_[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $ac_option"
AC_LINK_IFELSE([
_AX_ELPA_LANG_OPENMP
],
AC_LINK_IFELSE([
AC_LANG_SOURCE([_AX_ELPA_LANG_OPENMP])
],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp=$ac_option])
_AC_LANG_PREFIX[]FLAGS=$ac_save_[]_AC_LANG_PREFIX[]FLAGS
if test "$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp" != unsupported; then
...
...
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