Commit 442afb8e authored by Andreas Marek's avatar Andreas Marek

Merge branch 'master_pre_stage'

parents 1a8df0f3 7aa770b2
This diff is collapsed.
......@@ -38,6 +38,8 @@ libelpa@SUFFIX@_private_la_SOURCES = \
src/elpa_autotune_impl.F90 \
src/elpa_abstract_impl.F90 \
src/helpers/mod_precision.F90 \
src/helpers/mod_blas_interfaces.F90 \
src/helpers/mod_scalapack_interfaces.F90 \
src/helpers/mod_mpi.F90 \
src/helpers/mod_mpi_stubs.F90 \
src/helpers/mod_omp.F90 \
......@@ -454,6 +456,12 @@ if WANT_SINGLE_PRECISION_COMPLEX
endif
endif
if STORE_BUILD_CONFIG
libelpa@SUFFIX@_private_la_SOURCES += src/helpers/print_build_config.c
endif
# Cuda files
.cu.lo:
NVCC="$(NVCC)" libtool --mode=compile --tag=CC $(top_srcdir)/nvcc_wrap $(NVCCFLAGS) $(LDFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $< -o $@
......@@ -470,6 +478,8 @@ BUILT_SOURCES = $(generated_headers)
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
nobase_elpa_include_HEADERS = \
$(wildcard modules/*) \
src/helpers/lapack_interfaces.h \
src/helpers/scalapack_interfaces.h \
elpa/elpa.h \
elpa/elpa_generic.h \
elpa/elpa_legacy.h
......@@ -607,52 +617,40 @@ endif
#include test_programs_manual.am
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@_default.sh
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
double_instance@SUFFIX@_LDADD = $(test_program_ldadd)
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
noinst_PROGRAMS += validate_double_instance@SUFFIX@
check_SCRIPTS += validate_double_instance@SUFFIX@_default.sh
validate_double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
validate_double_instance@SUFFIX@_LDADD = $(test_program_ldadd)
validate_double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules $(FC_MODINC)private_modules
noinst_PROGRAMS += real_2stage_banded@SUFFIX@
check_SCRIPTS += real_2stage_banded@SUFFIX@_default.sh
real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_banded.F90
real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
noinst_PROGRAMS += validate_real_2stage_banded@SUFFIX@
check_SCRIPTS += validate_real_2stage_banded@SUFFIX@_default.sh
validate_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_banded.F90
validate_real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
validate_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules $(FC_MODINC)private_modules
noinst_PROGRAMS += complex_2stage_banded@SUFFIX@
check_SCRIPTS += complex_2stage_banded@SUFFIX@_default.sh
complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
noinst_PROGRAMS += validate_complex_2stage_banded@SUFFIX@
check_SCRIPTS += validate_complex_2stage_banded@SUFFIX@_default.sh
validate_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
validate_complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
validate_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules $(FC_MODINC)private_modules
if WANT_SINGLE_PRECISION_REAL
noinst_PROGRAMS += single_real_2stage_banded@SUFFIX@
check_SCRIPTS += single_real_2stage_banded@SUFFIX@_default.sh
single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
single_real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
noinst_PROGRAMS += validate_single_real_2stage_banded@SUFFIX@
check_SCRIPTS += validate_single_real_2stage_banded@SUFFIX@_default.sh
validate_single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
validate_single_real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
validate_single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules $(FC_MODINC)private_modules
endif
if WANT_SINGLE_PRECISION_COMPLEX
noinst_PROGRAMS += single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += single_complex_2stage_banded@SUFFIX@_default.sh
single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
single_complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
noinst_PROGRAMS += validate_single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += validate_single_complex_2stage_banded@SUFFIX@_default.sh
validate_single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
validate_single_complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
validate_single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules $(FC_MODINC)private_modules
endif
#noinst_PROGRAMS += test_c_bindings@SUFFIX@
#check_SCRIPTS += test_c_bindings@SUFFIX@_default.sh
#test_c_bindings@SUFFIX@_SOURCES = test/Fortran/elpa_generalized/test_bindings.F90
#test_c_bindings@SUFFIX@_LDADD = $(test_program_ldadd) $(FCLIBS)
#test_c_bindings@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
#noinst_PROGRAMS += test_c_cannon@SUFFIX@
#check_SCRIPTS += test_c_cannon@SUFFIX@_default.sh
#test_c_cannon@SUFFIX@_SOURCES = test/C/elpa_generalized/test_cannon.c
#test_c_cannon@SUFFIX@_LDADD = $(test_program_ldadd) $(FCLIBS)
#test_c_cannon@SUFFIX@_CFLAGS = $(test_program_cflags)
# python wrapper
pyelpadir = $(pythondir)/pyelpa
if WITH_PYTHON
......@@ -669,7 +667,6 @@ wrapper_la_CFLAGS = $(PYTHON_INCLUDE) $(NUMPY_INCLUDE) $(AM_CFLAGS)
python/pyelpa/wrapper.c: python/pyelpa/wrapper.pyx
cython $< -o $@
# test scripts
TASKS ?= 2
if WITH_MPI
......@@ -733,7 +730,7 @@ CLEANFILES = \
clean-local:
-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
-rm -rf test_*.sh
-rm -rf validate_*.sh
-rm -rf legacy_*.sh
-rm -rf real_2stage*.sh
-rm -rf complex_2stage*.sh
......@@ -793,8 +790,6 @@ EXTRA_DIST = \
src/elpa2/elpa2_tridiag_band_template.F90 \
src/elpa2/kernels/complex_128bit_256bit_512bit_BLOCK_template.c \
src/elpa2/kernels/complex_template.F90 \
src/elpa2/kernels/real_vsx_4hv_template.c \
src/elpa2/kernels/real_vsx_6hv_template.c \
src/elpa2/kernels/real_128bit_256bit_512bit_BLOCK_template.c \
src/elpa2/kernels/real_template.F90 \
src/elpa2/kernels/simple_template.F90 \
......
......@@ -51,7 +51,8 @@ not supported anymore.
- III) List of computational routines
- IV) Using OpenMP threading
- V) Influencing default values with environment variables
- VI) Autotuning
- VI) Autotuning
- VII) A simple example how to use ELPA in an MPI application
## I) General concept of the *ELPA* API ##
......@@ -385,10 +386,132 @@ C Synopsis
}
elpa_autotune_set_best(handle, autotune_handle &error); // from now on use values used by autotuning
elpa_autotune_deallocate(autotune_handle); // cleanup autotuning
```
## VII) A simple example how to use ELPA in an MPI application ##
The following is a skeleton code of an basic example on how to use ELPA. The purpose is to show the steps that have
to be done in the application using MPI which wants to call ELPA, namely
- Initializing the MPI
- creating a blacs distributed matrics
- using this matrix within ELPA
The skeleton is not ment to be copied and pasted, since the details will always be dependent on the application which should
call ELPA.
For simplicity only a Fortran example is shown
```Fortran
use mpi
implicit none
integer :: mpierr, myid, nprocs
integer :: np_cols, np_rows, npcol, nprow
integer :: my_blacs_ctxt, sc_desc(9), info
integer :: na = [some value] ! global dimension of the matrix to be solved
integer :: nblk = [some value ] ! the block size of the scalapack block cyclic distribution
real*8, allocatable :: a(:,:), ev(:)
!-------------------------------------------------------------------------------
! MPI Initialization
call mpi_init(mpierr)
call mpi_comm_rank(mpi_comm_world,myid,mpierr)
call mpi_comm_size(mpi_comm_world,nprocs,mpierr)
!-------------------------------------------------------------------------------
! Selection of number of processor rows/columns
! the application has to decide how the matrix should be distributed
np_cols = [ some value ]
np_rows = [ some value ]
!-------------------------------------------------------------------------------
! Set up BLACS context and MPI communicators
!
! The BLACS context is only necessary for using Scalapack.
!
! For ELPA, the MPI communicators along rows/cols are sufficient,
! and the grid setup may be done in an arbitrary way as long as it is
! consistent (i.e. 0<=my_prow<np_rows, 0<=my_pcol<np_cols and every
! process has a unique (my_prow,my_pcol) pair).
! For details look at the documentation of BLACS_Gridinit and
! BLACS_Gridinfo of your BLACS installation
my_blacs_ctxt = mpi_comm_world
call BLACS_Gridinit( my_blacs_ctxt, 'C', np_rows, np_cols )
call BLACS_Gridinfo( my_blacs_ctxt, nprow, npcol, my_prow, my_pcol )
! compute for your distributed matrix the number of local rows and columns
! per MPI task, e.g. with
! the Scalapack tools routine NUMROC
! Set up a scalapack descriptor for the checks below.
! For ELPA the following restrictions hold:
! - block sizes in both directions must be identical (args 4+5)
! - first row and column of the distributed matrix must be on row/col 0/0 (args 6+7)
call descinit( sc_desc, na, na, nblk, nblk, 0, 0, my_blacs_ctxt, na_rows, info )
! Allocate matrices
allocate(a (na_rows,na_cols))
allocate(ev(na))
! fill the matrix with resonable values
a(i,j) = [ your problem to be solved]
! UP to this point this where all the prerequisites which have to be done in the
! application if you have a distributed eigenvalue problem to be solved, independent of
! whether you want to use ELPA, Scalapack, EigenEXA or alike
! Now you can start using ELPA
if (elpa_init(20171201) /= ELPA_OK) then ! put here the API version that you are using
print *, "ELPA API version not supported"
stop
endif
elpa => elpa_allocate(success)
if (success != ELPA_OK) then
! react on the error
! we urge every user to always check the error codes
! of all ELPA functions
endif
! set parameters decribing the matrix and it's MPI distribution
call elpa%set("na", na, success) ! size of the na x na matrix
call elpa%set("nev", nev, success) ! number of eigenvectors that should be computed ( 1<= nev <= na)
call elpa%set("local_nrows", na_rows, success) ! number of local rows of the distributed matrix on this MPI task
call elpa%set("local_ncols", na_cols, success) ! number of local columns of the distributed matrix on this MPI task
call elpa%set("nblk", nblk, success) ! size of the BLACS block cyclic distribution
call elpa%set("mpi_comm_parent", MPI_COMM_WORLD, success) ! the global MPI communicator
call elpa%set("process_row", my_prow, success) ! row coordinate of MPI process
call elpa%set("process_col", my_pcol, success) ! column coordinate of MPI process
success = elpa%setup()
! if desired, set any number of tunable run-time options
! look at the list of possible options as detailed later in
! USERS_GUIDE.md
call e%set("solver", ELPA_SOLVER_2STAGE, success)
! set the AVX BLOCK2 kernel, otherwise ELPA_2STAGE_REAL_DEFAULT will
! be used
call e%set("real_kernel", ELPA_2STAGE_REAL_AVX_BLOCK2, success)
! use method solve to solve the eigenvalue problem to obtain eigenvalues
! and eigenvectors
! other possible methods are desribed in USERS_GUIDE.md
call e%eigenvectors(a, ev, z, success)
! cleanup
call elpa_deallocate(e)
call elpa_uninit()
```
This diff is collapsed.
......@@ -14,6 +14,7 @@ skipStep=0
batchCommand=""
interactiveRun="yes"
slurmBatch="no"
gpuJob="no"
function usage() {
cat >&2 <<-EOF
......@@ -21,7 +22,7 @@ function usage() {
Call all the necessary steps to perform an ELPA CI test
Usage:
run_ci_tests [-c configure arguments] [-j makeTasks] [-h] [-t MPI Tasks] [-m matrix size] [-n number of eigenvectors] [-b block size] [-o OpenMP threads] [-s skipStep] [-q submit command] [-i interactive run] [-S submit to Slurm]"
run_ci_tests [-c configure arguments] [-j makeTasks] [-h] [-t MPI Tasks] [-m matrix size] [-n number of eigenvectors] [-b block size] [-o OpenMP threads] [-s skipStep] [-q submit command] [-i interactive run] [-S submit to Slurm] [-g GPU job]"
Options:
-c configure arguments
......@@ -56,13 +57,15 @@ function usage() {
-S submit to slurm
if "yes" a SLURM batch job will be submitted
-g gpu job
if "yes" a GPU job is assumed
-h
Print this help text
EOF
}
while getopts "c:t:j:m:n:b:o:s:q:i:S:h" opt; do
while getopts "c:t:j:m:n:b:o:s:q:i:S:g:h" opt; do
case $opt in
j)
makeTasks=$OPTARG;;
......@@ -86,6 +89,8 @@ while getopts "c:t:j:m:n:b:o:s:q:i:S:h" opt; do
interactiveRun=$OPTARG;;
S)
slurmBatch=$OPTARG;;
g)
gpuJob=$OPTARG;;
:)
echo "Option -$OPTARG requires an argument" >&2;;
h)
......@@ -128,7 +133,7 @@ then
echo "Running on $CLUSTER with runner $CI_RUNNER_DESCRIPTION with tag $CI_RUNNER_TAGS on $mpiTasks tasks"
# GPU runners
if [ "$CI_RUNNER_TAGS" == "gpu" ]
if [ "$gpuJob" == "yes" ]
then
cp $HOME/runners/job_script_templates/run_${CLUSTER}_1node_2GPU.sh .
echo "./configure " "$configureArgs" >> ./run_${CLUSTER}_1node_2GPU.sh
......@@ -138,6 +143,10 @@ then
echo "export OMP_NUM_THREADS=$ompThreads" >> ./run_${CLUSTER}_1node_2GPU.sh
echo "export TASKS=$mpiTasks" >> ./run_${CLUSTER}_1node_2GPU.sh
echo "make check TEST_FLAGS=\" $matrixSize $nrEV $blockSize \" " >> ./run_${CLUSTER}_1node_2GPU.sh
echo " " >> ./run_${CLUSTER}_1node_2GPU.sh
echo "#copy everything back from /tmp/elpa to runner directory" >> ./run_${CLUSTER}_1node_2GPU.sh
echo "cp -r * \$runner_path" >> ./run_${CLUSTER}_1node_2GPU.sh
echo "cd .. && rm -rf /tmp/elpa_\$SLURM_JOB_ID" >> ./run_${CLUSTER}_1node_2GPU.sh
echo " "
echo "Job script for the run"
......@@ -156,50 +165,51 @@ then
cat ./ELPA_CI_2gpu.err.*
#fi
fi
else
#SSE, AVX, AVX2, and AVX-512 runners
if [[ "$CI_RUNNER_TAGS" =~ "sse" ]] || [[ "$CI_RUNNER_TAGS" =~ "avx" ]] || [[ "$CI_RUNNER_TAGS" =~ "avx2" ]] || [ ["$CI_RUNNER_TAGS" =~ "avx512" ]]
then
cp $HOME/runners/job_script_templates/run_${CLUSTER}_1node.sh .
echo "./configure " "$configureArgs" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "make -j 16" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "export OMP_NUM_THREADS=$ompThreads" >> ./run_${CLUSTER}_1node.sh
echo "export TASKS=$mpiTasks" >> ./run_${CLUSTER}_1node.sh
echo "make check TEST_FLAGS=\" $matrixSize $nrEV $blockSize \" " >> ./run_${CLUSTER}_1node.sh
#SSE, AVX, AVX2, and AVX-512 runners
if [[ "$CI_RUNNER_TAGS" =~ "sse" ]] || [[ "$CI_RUNNER_TAGS" =~ "avx" ]] || [[ "$CI_RUNNER_TAGS" =~ "avx2" ]] || [ ["$CI_RUNNER_TAGS" =~ "avx512" ]]
then
cp $HOME/runners/job_script_templates/run_${CLUSTER}_1node.sh .
echo "./configure " "$configureArgs" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "make -j 16 " >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "export OMP_NUM_THREADS=$ompThreads" >> ./run_${CLUSTER}_1node.sh
echo "export TASKS=$mpiTasks" >> ./run_${CLUSTER}_1node.sh
echo "make check TEST_FLAGS=\" $matrixSize $nrEV $blockSize \" " >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#copy everything back from /tmp/elpa to runner directory" >> ./run_${CLUSTER}_1node.sh
echo "cp -r * \$runner_path" >> ./run_${CLUSTER}_1node.sh
echo "cd .. && rm -rf /tmp/elpa_\$SLURM_JOB_ID" >> ./run_${CLUSTER}_1node.sh
echo " "
echo "Job script for the run"
cat ./run_${CLUSTER}_1node.sh
echo " "
echo "Submitting to SLURM"
if sbatch -W ./run_${CLUSTER}_1node.sh; then
exitCode=$?
else
exitCode=$?
echo "Submission excited with exitCode $exitCode"
fi
echo " "
echo "Exit Code of sbatch: $exitCode"
echo " "
cat ./ELPA_CI.out.*
#if [ $exitCode -ne 0 ]
#then
cat ./ELPA_CI.err.*
#fi
echo " "
echo "Job script for the run"
cat ./run_${CLUSTER}_1node.sh
echo " "
echo "Submitting to SLURM"
if sbatch -W ./run_${CLUSTER}_1node.sh; then
exitCode=$?
else
exitCode=$?
echo "Submission excited with exitCode $exitCode"
fi
echo " "
echo "Exit Code of sbatch: $exitCode"
echo " "
cat ./ELPA_CI.out.*
#if [ $exitCode -ne 0 ]
#then
cat ./ELPA_CI.err.*
#fi
fi
#if [ $exitCode -ne 0 ]
#then
if [ -f ./test-suite.log ]
then
cat ./test-suite.log
fi
#fi
exit $exitCode
......
......@@ -11,6 +11,7 @@ ompThreads=1
configueArg=""
batchCommand=""
slurmBatch="no"
gpuJob="no"
function usage() {
cat >&2 <<-EOF
......@@ -18,11 +19,15 @@ function usage() {
Call all the necessary steps to perform an ELPA CI test
Usage:
run_distcheck_tests [-c configure arguments] [-h] [-t MPI Tasks] [-m matrix size] [-n number of eigenvectors] [-b block size] [-o OpenMP threads] [-q submit command] [-S submit to Slurm]"
run_distcheck_tests [-c configure arguments] [-d distcheck configure arguments] [-h] [-t MPI Tasks] [-m matrix size] [-n number of eigenvectors] [-b block size] [-o OpenMP threads] [-q submit command] [-S submit to Slurm] [-g GPU job]"
Options:
-c configure arguments
Line of arguments passed to configure call
-d configure arguments to distcheck
Line of arguments passed to distcheck configure call
-t MPI Tasks
Number of MPI processes used during test runs of ELPA tests
......@@ -44,13 +49,16 @@ function usage() {
-S submit to slurm
if "yes" a SLURM batch job will be submitted
-g gpu job
if "yes" a gpu job is assumed
-h
Print this help text
EOF
}
while getopts "c:t:j:m:n:b:o:s:q:i:S:h" opt; do
while getopts "c:d:t:j:m:n:b:o:s:q:i:S:g:h" opt; do
case $opt in
t)
mpiTasks=$OPTARG;;
......@@ -64,10 +72,15 @@ while getopts "c:t:j:m:n:b:o:s:q:i:S:h" opt; do
ompThreads=$OPTARG;;
c)
configureArgs=$OPTARG;;
d)
distcheckConfigureArgs=$OPTARG;;
q)
batchCommand=$OPTARG;;
S)
slurmBatch=$OPTARG;;
g)
gpuJob=$OPTARG;;
:)
echo "Option -$OPTARG requires an argument" >&2;;
h)
......@@ -108,12 +121,16 @@ then
if [[ "$CI_RUNNER_TAGS" =~ "distcheck" ]]
then
cp $HOME/runners/job_script_templates/run_${CLUSTER}_1node.sh .
echo "./configure " "$configureArgs" >> ./run_${CLUSTER}_1node.sh
echo "./configure " "$configureArgs" " || { cat config.log; exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "export TASKS=$mpiTasks" >> ./run_${CLUSTER}_1node.sh
echo "export DISTCHECK_CONFIGURE_FLAGS=\" $configureArgs \" " >> ./run_${CLUSTER}_1node.sh
echo "export DISTCHECK_CONFIGURE_FLAGS=\" $distcheckConfigureArgs \" " >> ./run_${CLUSTER}_1node.sh
echo "make distcheck TEST_FLAGS=\" $matrixSize $nrEV $blockSize \" || { chmod u+rwX -R . ; exit 1 ; } " >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#copy everything back from /tmp/elpa to runner directory" >> ./run_${CLUSTER}_1node.sh
echo "cp -r * \$runner_path" >> ./run_${CLUSTER}_1node.sh
echo "cd .. && rm -rf /tmp/elpa_\$SLURM_JOB_ID" >> ./run_${CLUSTER}_1node.sh
echo " "
echo "Job script for the run"
cat ./run_${CLUSTER}_1node.sh
......@@ -128,20 +145,15 @@ then
cat ./ELPA_CI.out.*
#if [ $exitCode -ne 0 ]
#then
cat ./ELPA_CI.err.*
cat ./ELPA_CI.err.*
#fi
if [ -f ./test-suite.log ]
then
cat ./test-suite.log
fi
fi
#if [ $exitCode -ne 0 ]
#then
if [ -f ./test-suite.log ]
then
cat ./test-suite.log
#fi
fi
exit $exitCode
fi
......@@ -14,6 +14,7 @@ slurmBatch="no"
projectName="unknown"
projectExecutable=""
projectConfigureArg=""
gpuJob="no"
function usage() {
cat >&2 <<-EOF
......@@ -21,7 +22,7 @@ function usage() {
Call all the necessary steps to perform an ELPA CI test
Usage:
run_project_tests [-c configure arguments] [-h] [-t MPI Tasks] [-m matrix size] [-n number of eigenvectors] [-b block size] [-o OpenMP threads] [-q submit command] [-S submit to Slurm] [-p projectName] [-e projectExecutable] [-C project configure arguments]"
run_project_tests [-c configure arguments] [-h] [-t MPI Tasks] [-m matrix size] [-n number of eigenvectors] [-b block size] [-o OpenMP threads] [-q submit command] [-S submit to Slurm] [-p projectName] [-e projectExecutable] [-C project configure arguments] [-g gpu job]"
Options:
-c configure arguments
......@@ -56,13 +57,16 @@ function usage() {
-C project configure arguments
arguments for the configure of the project
-g gpu job
if "yes" a gpu job is assumed
-h
Print this help text
EOF
}
while getopts "c:t:j:m:n:b:o:s:q:i:S:p:e:C:h" opt; do
while getopts "c:t:j:m:n:b:o:s:q:i:S:p:e:C:g:h" opt; do
case $opt in
t)
mpiTasks=$OPTARG;;
......@@ -86,6 +90,8 @@ while getopts "c:t:j:m:n:b:o:s:q:i:S:p:e:C:h" opt; do
projectExecutable=$OPTARG;;
C)
projectConfigureArgs=$OPTARG;;
g)
gpuJob=$OPTARG;;
:)
echo "Option -$OPTARG requires an argument" >&2;;
h)
......@@ -133,15 +139,15 @@ then
echo "../autogen.sh" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#Running configure " >> ./run_${CLUSTER}_1node.sh
echo "../configure " "$configureArgs" >> ./run_${CLUSTER}_1node.sh
echo "../configure " "$configureArgs" " || { cat config.log; exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "export TASKS=$mpiTasks" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#Running make " >> ./run_${CLUSTER}_1node.sh
echo "make -j 8" >> ./run_${CLUSTER}_1node.sh
echo "make -j 8 || { exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#Running make install" >> ./run_${CLUSTER}_1node.sh
echo "make install" >> ./run_${CLUSTER}_1node.sh
echo "make install || { exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo "popd" >> ./run_${CLUSTER}_1node.sh
echo "mkdir -p $projectName/build" >> ./run_${CLUSTER}_1node.sh
echo "pushd $projectName/build" >> ./run_${CLUSTER}_1node.sh
......@@ -159,19 +165,22 @@ then
echo "../autogen.sh" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#Running configure " >> ./run_${CLUSTER}_1node.sh
echo "../configure " "$projectConfigureArgs " >> ./run_${CLUSTER}_1node.sh
echo "../configure " "$projectConfigureArgs " " || { cat config.log; exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#Running make " >> ./run_${CLUSTER}_1node.sh
echo "make -j 8" >> ./run_${CLUSTER}_1node.sh
echo "make -j 8 || { exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo "export LD_LIBRARY_PATH=$MKL_HOME/lib/intel64:\$LD_LIBRARY_PATH" >> ./run_${CLUSTER}_1node.sh
echo "./$projectExecutable" >> ./run_${CLUSTER}_1node.sh
echo "make distclean" >> ./run_${CLUSTER}_1node.sh
echo "make distclean || { exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo "popd" >> ./run_${CLUSTER}_1node.sh
echo "pushd build" >> ./run_${CLUSTER}_1node.sh
echo "make distclean" >> ./run_${CLUSTER}_1node.sh
echo "make distclean || { exit 1; }" >> ./run_${CLUSTER}_1node.sh
echo "rm -rf installdest" >> ./run_${CLUSTER}_1node.sh
echo "popd" >> ./run_${CLUSTER}_1node.sh
echo " " >> ./run_${CLUSTER}_1node.sh
echo "#copy everything back from /tmp/elpa to runner directory" >> ./run_${CLUSTER}_1node.sh
echo "cp -r * \$runner_path" >> ./run_${CLUSTER}_1node.sh
echo "cd .. && rm -rf /tmp/elpa_\$SLURM_JOB_ID" >> ./run_${CLUSTER}_1node.sh
echo " "
echo "Job script for the run"
cat ./run_${CLUSTER}_1node.sh
......
......@@ -164,13 +164,28 @@ if test x"${enable_openmp}" = x"yes"; then
CFLAGS="$OPENMP_CFLAGS $CFLAGS"
fi
AX_CHECK_COMPILE_FLAG([-std=c11], [
CFLAGS+=" -std=c11"
c11_standard=no
AX_CHECK_COMPILE_FLAG([-std=gnu11], [
c11_standard=yes
], [
echo "C compiler cannot compile C11 code"
exit -1
echo "C compiler cannot compile -std=gnu11 code"
echo "testing -std=c11.."
])
if test x"$c11_standard" = x"yes"; then
CFLAGS+=" -std=gnu11"
fi
if test x"$c11_standard" = x"no"; then
AX_CHECK_COMPILE_FLAG([-std=c11], [
c11_standard=yes
], [
echo "C compiler cannot compile C11 code"
exit -1
])
if test x"$c11_standard" = x"yes"; then
CFLAGS+=" -std=c11"
fi
fi
AC_MSG_CHECKING(whether C compiler can use _Generic )
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
......@@ -1304,7 +1319,7 @@ AC_MSG_CHECKING(whether we build for K-computer)
AC_ARG_ENABLE([K-computer],
AS_HELP_STRING([--enable-K-computer],
[enable builds on K-Computer, default no.]),
[if test x"$enableval"=x"yes"; then
[if test x"$enableval" = x"yes"; then
enable_kcomputer=yes
else
enable_kcomputer=no
......@@ -1323,6 +1338,29 @@ if test x"${enable_kcomputer}" = x"yes"; then
fi
fi
AC_MSG_CHECKING(whether we build for NEC SX-Auroa)
AC_ARG_ENABLE([SX-Aurora],
AS_HELP_STRING([--enable-SX-Aurora],
[enable builds on SX-Aurora, default no.]),
[if test x"$enableval" = x"yes"; then
enable_sxaurora=yes