Commit ae8a07e8 authored by Andreas Marek's avatar Andreas Marek
Browse files

Merge branch 'loh/spectest' into 'master'

Loh/spectest

See merge request !5
parents 04fb2477 878626e0
......@@ -226,10 +226,21 @@ ln -s ../configure .
%endif
%configure \
%ifarch i386 i486 i586 i686 x86_64
CFLAGS="$CFLAGS -msse4.2" \
FCFLAGS="$FFLAGS $FCFLAGS -msse4.2" \
%endif
%if %{sle_11_sp4} == 1
--disable-mpi-module \
%endif
--docdir=%{_docdir}/%{name}-%{version}
%ifnarch i386 i486 i586 i686 x86_64
--disable-sse \
--disable-sse-assembly \
%endif
--disable-avx \
--disable-avx2 \
--docdir=%{_docdir}/%{name}-%{version} \
|| { cat config.log; exit 1; }
make %{?_smp_mflags} V=1
popd
......@@ -247,11 +258,22 @@ ln -s ../configure .
%endif
%configure \
%ifarch i386 i486 i586 i686 x86_64
CFLAGS="$CFLAGS -msse4.2" \
FCFLAGS="$FFLAGS $FCFLAGS -msse4.2" \
%endif
%if %{sle_11_sp4} == 1
--disable-mpi-module \
%endif
%ifnarch i386 i486 i586 i686 x86_64
--disable-sse \
--disable-sse-assembly \
%endif
--disable-avx \
--disable-avx2 \
--docdir=%{_docdir}/%{name}_openmp-%{version} \
--enable-openmp
--enable-openmp \
|| { cat config.log; exit 1; }
make %{?_smp_mflags} V=1
popd
......@@ -303,7 +325,9 @@ popd
%files tools
%attr(0755,root,root) %{_bindir}/elpa2_print_kernels
%attr(0644,root,root) %_mandir/man1/elpa2_print_kernels.1.gz
%attr(0755,root,root) %{_bindir}/elpa_tests
%attr(0644,root,root) %{_mandir}/man1/elpa2_print_kernels.1.gz
%attr(0644,root,root) %{_mandir}/man1/elpa_tests.1.gz
%files devel
%defattr(-,root,root)
......@@ -327,7 +351,9 @@ popd
%files -n %{name}_openmp-tools
%defattr(-,root,root)
%{_bindir}/elpa2_print_kernels_openmp
%attr(0755,root,root) %{_bindir}/elpa2_print_kernels_openmp
%attr(0755,root,root) %{_bindir}/elpa_tests_openmp
%files -n %{name}_openmp-devel
%defattr(-,root,root)
......
......@@ -3,7 +3,7 @@ define extract_interface
@grep -h "^ *$1" $^ | sed 's/^ *$1//;' >> $@ || { rm $@; exit 1; }
endef
elpa test:
elpa test src:
@mkdir $@
test/shared: | test
......@@ -33,7 +33,7 @@ elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2/ker
$(call extract_interface,!f>)
$(call extract_interface,#!f>)
src/fortran_constants.X90: $(top_srcdir)/src/fortran_constants.h
src/fortran_constants.X90: $(top_srcdir)/src/fortran_constants.h | src
@$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -I. $< -o $@_ || { rm -f $@; exit 1; }
@awk '/!ELPA_C_DEFINE/ {gsub(/!ELPA_C_DEFINE/, "\n"); gsub(/NEWLINE/, "\n"); print;}' < $@_ > $@ || { rm -f $@; exit 1; }
@rm $@_
......
......@@ -222,8 +222,10 @@ FOR_ALL_TYPES(IMPLEMENT_GETENV)
#define IMPLEMENT_GET_FUNCTION(TYPE, PRINTF_SPEC, ERROR_VALUE) \
TYPE elpa_index_get_##TYPE##_value(elpa_index_t index, char *name, int *error) { \
char *env_value = NULL; \
TYPE ret; \
if (sizeof(TYPE##_entries) == 0) { \
return ELPA_ERROR_ENTRY_NOT_FOUND; \
} \
int n = find_##TYPE##_entry(name); \
if (n >= 0) { \
int from_env = 0; \
......@@ -249,6 +251,9 @@ FOR_ALL_TYPES(IMPLEMENT_GET_FUNCTION)
#define IMPLEMENT_LOC_FUNCTION(TYPE, ...) \
TYPE* elpa_index_get_##TYPE##_loc(elpa_index_t index, char *name) { \
if (sizeof(TYPE##_entries) == 0) { \
return NULL; \
} \
int n = find_##TYPE##_entry(name); \
if (n >= 0) { \
return &index->TYPE##_options.values[n]; \
......@@ -261,6 +266,9 @@ FOR_ALL_TYPES(IMPLEMENT_LOC_FUNCTION)
#define IMPLEMENT_SET_FUNCTION(TYPE, PRINTF_SPEC, ...) \
int elpa_index_set_##TYPE##_value(elpa_index_t index, char *name, TYPE value, int force_writable) { \
if (sizeof(TYPE##_entries) == 0) { \
return ELPA_ERROR_ENTRY_NOT_FOUND; \
} \
int n = find_##TYPE##_entry(name); \
if (n < 0) { \
return ELPA_ERROR_ENTRY_NOT_FOUND; \
......@@ -285,6 +293,9 @@ FOR_ALL_TYPES(IMPLEMENT_SET_FUNCTION)
#define IMPLEMENT_IS_SET_FUNCTION(TYPE, ...) \
int elpa_index_##TYPE##_value_is_set(elpa_index_t index, char *name) { \
if (sizeof(TYPE##_entries) == 0) { \
return ELPA_ERROR_ENTRY_NOT_FOUND; \
} \
int n = find_##TYPE##_entry(name); \
if (n >= 0) { \
if (index->TYPE##_options.is_set[n]) { \
......@@ -310,7 +321,7 @@ int elpa_index_value_is_set(elpa_index_t index, char *name) {
FOR_ALL_TYPES(RET_IF_SET)
printf("ERROR: Could not find entry '%s'\n");
printf("ERROR: Could not find entry '%s'\n", name);
return res;
}
......@@ -352,7 +363,6 @@ int elpa_int_value_to_strlen(char *name, int value) {
int elpa_index_int_value_to_strlen(elpa_index_t index, char *name) {
const char *string = NULL;
int n = find_int_entry(name);
if (n < 0) {
return 0;
......@@ -568,7 +578,6 @@ static int bw_is_valid(elpa_index_t index, int n, int new_value) {
}
elpa_index_t elpa_index_instance() {
char *env_value = NULL;
elpa_index_t index = (elpa_index_t) calloc(1, sizeof(struct elpa_index_struct));
#define ALLOCATE(TYPE, PRINTF_SPEC, ...) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment