Skip to content

Commit

Permalink
Merge pull request #13 from nakatamaho/v2.0
Browse files Browse the repository at this point in the history
v2.0 alpha
  • Loading branch information
nakatamaho authored Jun 14, 2022
2 parents 070348e + c3d922d commit 157676b
Show file tree
Hide file tree
Showing 255 changed files with 8,672 additions and 1,284 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2022/05/25 Nakata Maho <[email protected]> 2.0 branch
* 2.0.0 alpha.

2022/05/16 Nakata Maho <[email protected]> 2.0 branch
* Disable Rgejsv, Cgejsv, Rgesvj and Cgesvj by dd/qd, since we cannot
gurantee the precisions.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_fable
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN echo "${TZ}" > /etc/timezone \
&& ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata

RUN apt install -y build-essential gfortran-9 python3
RUN apt install -y build-essential gfortran python3
RUN apt install -y autotools-dev automake libtool
RUN apt install -y gdb valgrind libtool-bin
RUN apt install -y git wget ccache time pkg-config expect clangd clang-format unifdef octave
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_ubuntu20.04
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN echo "${TZ}" > /etc/timezone \
&& ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata

RUN apt install -y build-essential gfortran-9 python3
RUN apt install -y build-essential gfortran python3
RUN apt install -y autotools-dev automake libtool
RUN apt install -y git wget ccache time
RUN apt install -y ng-common ng-cjk emacs-nox
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_ubuntu20.04_intel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN echo "${TZ}" > /etc/timezone \
&& ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata

RUN apt install -y build-essential gfortran-9 python3
RUN apt install -y build-essential gfortran python3
RUN apt install -y autotools-dev automake libtool
RUN apt install -y git wget ccache time
RUN apt install -y ng-common ng-cjk emacs-nox
Expand Down
37 changes: 18 additions & 19 deletions Dockerfile_ubuntu20.04_mingw64
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM ubuntu:20.04
ARG GIT_EMAIL="[email protected]"
ARG GIT_NAME="NAKATA Maho"

RUN apt update
RUN apt -y update
RUN apt -y upgrade
RUN apt install -y sudo
RUN apt install -y tzdata
Expand All @@ -21,19 +21,13 @@ RUN apt install -y git wget ccache time
RUN apt install -y ng-common ng-cjk emacs-nox
RUN sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1

RUN dpkg --add-architecture i386 && apt update -y
RUN apt-get install -y software-properties-common gnupg2
RUN dpkg --add-architecture i386
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key
RUN apt-key add winehq.key
RUN apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
RUN apt-get install -y --install-recommends winehq-stable winbind
ENV WINEDEBUG=fixme-all
ENV WINEARCH=win64
RUN winecfg
RUN apt-get install -y cabextract
RUN wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
RUN chmod +x winetricks
RUN cp winetricks /usr/local/bin
RUN mv winehq.key /usr/share/keyrings/winehq-archive.key
RUN wget -nc https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
RUN mv winehq-focal.sources /etc/apt/sources.list.d/
RUN apt update -y
RUN apt install -y --install-recommends winehq-stable

ARG DOCKER_UID=1000
ARG DOCKER_USER=docker
Expand All @@ -47,10 +41,15 @@ RUN echo "\n\
" > /home/$DOCKER_USER/.gitconfig

RUN cd /home/$DOCKER_USER && echo "cd /home/$DOCKER_USER" >> .bashrc
RUN cd /home/$DOCKER_USER && echo "export WINEPATH=\"/usr/x86_64-w64-mingw32/lib/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix;/home/docker/MPLAPACK/bin;/home/docker/MPLAPACK/lib\"" >> .bashrc
RUN cd /home/$DOCKER_USER && echo "export WINEPATH=\"/usr/x86_64-w64-mingw32/lib/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix\"" >> .bashrc

ARG WINEPATH="/usr/x86_64-w64-mingw32/lib/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix"
RUN cd /home/$DOCKER_USER && git clone https://github.com/nakatamaho/mplapack.git
RUN cd /home/$DOCKER_USER/mplapack && git checkout v1.0.1 && git log -1
RUN cd /home/$DOCKER_USER/mplapack && bash -x misc/reconfig.ubuntu20.04.mingw64.sh
RUN cd /home/$DOCKER_USER/mplapack && make -j`getconf _NPROCESSORS_ONLN`
RUN cd /home/$DOCKER_USER/mplapack && make install
ARG WINEDEBUG="-all"

ARG WORK=/home/$DOCKER_USER
RUN cd ${WORK} && git clone https://github.com/nakatamaho/mplapack.git
RUN cd ${WORK}/mplapack && git fetch origin v2.0
RUN cd ${WORK}/mplapack && git checkout v2.0
RUN cd ${WORK}/mplapack && git remote set-url origin [email protected]:nakatamaho/mplapack.git
RUN cd ${WORK}/mplapack && git log -1
RUN cd /home/$DOCKER_USER/mplapack && bash -x misc/disttest_mingw.sh
96 changes: 69 additions & 27 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,31 @@ endif
if ENABLE_DOUBLE
mplapack_include_HEADERS += \
include/mpblas_double.h \
include/mplapack_double.h \
include/mplapack_utils_double.h
include/mplapack_utils_double.h \
include/mplapack_double.h
endif

if ENABLE__FLOAT64X
mplapack_include_HEADERS += \
include/mpblas__Float64x.h \
include/mplapack__Float64x.h \
include/mplapack_utils__Float64x.h
include/mpblas__Float64x.h \
include/mplapack__Float64x.h
endif

if ENABLE__FLOAT128
mplapack_include_HEADERS += \
include/mpblas__Float128.h \
include/mplapack__Float128.h \
include/mplapack_utils__Float128.h
include/mplapack__Float128.h
endif

noinst_HEADERS = include/mplapack_debug.h include/mplapack_utils.h include/mpblas.h include/mplapack.h include/mplapack_generic.h include/mplapack_benchmark.h include/mplapack_benchmark__Float128.h include/mplapack_benchmark_dd.h include/mplapack_benchmark_double.h include/mplapack_benchmark_gmp.h include/mplapack_benchmark_mpfr.h include/mplapack_benchmark_qd.h
nodist_mplapack_include_HEADERS =
if ENABLE__FLOAT64X
nodist_mplapack_include_HEADERS += include/mplapack_utils__Float64x.h
endif
if ENABLE__FLOAT128
nodist_mplapack_include_HEADERS += include/mplapack_utils__Float128.h
endif

noinst_HEADERS = include/mplapack_utils__Float128.h.in include/mplapack_utils__Float64x.h.in include/mplapack_debug.h include/mplapack_utils.h include/mpblas.h include/mplapack.h include/mplapack_generic.h include/mplapack_benchmark.h include/mplapack_benchmark__Float128.h include/mplapack_benchmark_dd.h include/mplapack_benchmark_double.h include/mplapack_benchmark_gmp.h include/mplapack_benchmark_mpfr.h include/mplapack_benchmark_qd.h include/mplapack_compare_debug.h include/mplapack_print_double.h include/mplapack_print.h include/mplapack_matgen.h include/mplapack_matgen__Float128.h include/mplapack_matgen__Float64x.h include/mplapack_matgen_dd.h include/mplapack_matgen_double.h include/mplapack_matgen_gmp.h include/mplapack_matgen_mpfr.h include/mplapack_matgen_qd.h include/mplapack_lin.h include/mplapack_lin__Float128.h include/mplapack_lin__Float64x.h include/mplapack_lin_dd.h include/mplapack_lin_double.h include/mplapack_lin_gmp.h include/mplapack_lin_mpfr.h include/mplapack_lin_qd.h include/mplapack_eig.h include/mplapack_eig__Float128.h include/mplapack_eig__Float64x.h include/mplapack_eig_dd.h include/mplapack_eig_double.h include/mplapack_eig_gmp.h include/mplapack_eig_mpfr.h include/mplapack_eig_qd.h mplapack/test/fable/fem/do.hpp mplapack/test/fable/fem/intrinsics.hpp mplapack/test/fable/fem/arr_size.hpp mplapack/test/fable/fem/main.hpp mplapack/test/fable/fem/arr_and_str_indices.hpp mplapack/test/fable/fem/open_chain.hpp mplapack/test/fable/fem/format.hpp mplapack/test/fable/fem/arr.hpp mplapack/test/fable/fem/major_types.hpp mplapack/test/fable/fem/data.hpp mplapack/test/fable/fem/utils mplapack/test/fable/fem/utils/string_to_double_fmt.hpp mplapack/test/fable/fem/utils/int_types.hpp mplapack/test/fable/fem/utils/char.hpp mplapack/test/fable/fem/utils/double_to_string.hpp mplapack/test/fable/fem/utils/string.hpp mplapack/test/fable/fem/utils/simple_streams.hpp mplapack/test/fable/fem/utils/string_to_double.hpp mplapack/test/fable/fem/utils/path.hpp mplapack/test/fable/fem/utils/misc.hpp mplapack/test/fable/fem/utils/real_as_string.hpp mplapack/test/fable/fem/utils/random.hpp mplapack/test/fable/fem/utils/token.hpp mplapack/test/fable/fem/utils/equivalence.hpp mplapack/test/fable/fem/str_arr_ref.hpp mplapack/test/fable/fem/size_t.hpp mplapack/test/fable/fem/read.hpp mplapack/test/fable/fem/error_utils.hpp mplapack/test/fable/fem/str_ref.hpp mplapack/test/fable/fem/file_positioning_chain.hpp mplapack/test/fable/fem/zero.hpp mplapack/test/fable/fem/io_exceptions.hpp mplapack/test/fable/fem/variant.hpp mplapack/test/fable/fem/intrinsics_extra.hpp mplapack/test/fable/fem/inquire_chain.hpp mplapack/test/fable/fem/common.hpp mplapack/test/fable/fem/arr_ref.hpp mplapack/test/fable/fem/data_of_type.hpp mplapack/test/fable/fem/str.hpp mplapack/test/fable/fem/data_type_star.hpp mplapack/test/fable/fem/star.hpp mplapack/test/fable/fem/dimension.hpp mplapack/test/fable/fem/close_chain.hpp mplapack/test/fable/fem/stop.hpp mplapack/test/fable/fem/io.hpp mplapack/test/fable/fem/write.hpp mplapack/test/fable/tbxx/time_accu.hpp mplapack/test/fable/tbxx/optional_copy.hpp mplapack/test/fable/tbxx/error_utils.hpp mplapack/test/fable/tbxx/pretty_type_name.hpp mplapack/test/fable/tbxx/libc_backtrace.hpp mplapack/test/fable/noexcept_false.hpp mplapack/test/fable/fem.hpp mplapack/test/fable/LICENSE.txt include/mplapack_common_sslct.h include/mplapack_common_mn.h include/mplapack_benchmark.h include/mplapack_benchmark__Float128.h include/mplapack_benchmark__Float64x.h include/mplapack_benchmark_dd.h include/mplapack_benchmark_double.h include/mplapack_benchmark_gmp.h include/mplapack_benchmark_mpfr.h include/mplapack_benchmark_qd.h

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = mplapack.pc
Expand All @@ -78,6 +84,7 @@ EXTRA_DIST = \
misc/cudalt.py \
misc/build_mplapack_for_mic.sh \
misc/prepare_mplapacklibs_for_mic.sh \
misc/fix_dylib_macOS.sh \
mpblas/optimized/dd/cuda/dd_real_cuda.h \
external/gmp/download/*.tar.bz2 \
external/gmp/Makefile.am \
Expand All @@ -91,27 +98,62 @@ external/mpc/Makefile.in \
external/qd/download/*.tar.gz \
external/qd/Makefile.am \
external/qd/Makefile.in \
external/qd/patches/patch-mingw \
external/qd/patches/patch-noopt \
external/qd/patches/patch-* \
external/qd/patches/config* \
external/lapack/Makefile.am \
external/lapack/Makefile.in \
external/lapack/download/*.tgz \
external/lapack/patches/patch-mingw \
external/lapack/patches/patch-mic \
external/lapack/download/*.tar.gz \
external/lapack/patches/patch-* \
external/lapack/patches/print.c \
mpfrc++/copying.lib mpfrc++/copying mpfrc++/makefile.org \
mpfrc++/org/copying mpfrc++/org/copying.lib mpfrc++/org/example.cpp \
mpfrc++/org/makefile mpfrc++/org/mpfrc++.tar.gz \
mpfrc++/org/mpreal.cpp mpfrc++/org/mpreal.h

if !DISABLE_EXAMPLES
EXTRA_DIST += \
examples/mpblas/Makefile.mingw \
examples/mpblas/Makefile.freebsd \
examples/mpblas/Makefile.linux \
examples/mpblas/Makefile.macosx \
examples/mplapack/Makefile.mingw \
examples/mplapack/Makefile.freebsd \
examples/mplapack/Makefile.linux \
examples/mplapack/Makefile.macosx
endif

mpfrc++/org/makefile mpfrc++/org/mpfrc++.tar.gz \
mpfrc++/org/mpreal.cpp mpfrc++/org/mpreal.h \
examples/mpblas/Makefile.freebsd.in \
examples/mpblas/Makefile.linux.in \
examples/mpblas/Makefile.macos.in \
examples/mpblas/Makefile.mingw.in \
examples/mplapack/*/Makefile.freebsd.in \
examples/mplapack/*/Makefile.linux.in \
examples/mplapack/*/Makefile.macos.in \
examples/mplapack/*/Makefile.mingw.in \
examples/mplapack/04_NonsymmetricEigenproblems/Matrix_*.txt \
examples/mplapack/05_SingularValueDecomposition/Matrix_*.txt \
mplapack/test/eig/Cbak.in \
mplapack/test/eig/Cbal.in \
mplapack/test/eig/Cbal_double.in \
mplapack/test/eig/Cbb.in \
mplapack/test/eig/Cec.in \
mplapack/test/eig/Ced.in \
mplapack/test/eig/Cgbak.in \
mplapack/test/eig/Cgbal.in \
mplapack/test/eig/Cgd.in \
mplapack/test/eig/Cgg.in \
mplapack/test/eig/Csb.in \
mplapack/test/eig/Csg.in \
mplapack/test/eig/Rbak.in \
mplapack/test/eig/Rbal.in \
mplapack/test/eig/Rbal_double.in \
mplapack/test/eig/Rbb.in \
mplapack/test/eig/Rec.in \
mplapack/test/eig/Red.in \
mplapack/test/eig/Rgbak.in \
mplapack/test/eig/Rgbal.in \
mplapack/test/eig/Rgd.in \
mplapack/test/eig/Rgg.in \
mplapack/test/eig/Rsb.in \
mplapack/test/eig/Rsg.in \
mplapack/test/eig/csd.in \
mplapack/test/eig/glm.in \
mplapack/test/eig/gqr.in \
mplapack/test/eig/gsv.in \
mplapack/test/eig/lse.in \
mplapack/test/eig/nep.in \
mplapack/test/eig/se2.in \
mplapack/test/eig/sep.in \
mplapack/test/eig/svd.in \
mplapack/test/lin/Ctest.in \
mplapack/test/lin/Ctest_rfp.in \
mplapack/test/lin/Rtest.in \
mplapack/test/lin/Rtest_rfp.in
7 changes: 5 additions & 2 deletions benchmark/mpblas/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bench_PROGRAMS =
benchdir=$(prefix)/share/mplapack/bench
benchdir=$(prefix)/lib/$(target)/mplapack/benchmark

if !IS_MINGW

Expand Down Expand Up @@ -35,6 +35,9 @@ if DO_BLASBENCH
include Makefile.blas.am
endif

install-data-hook:
if IS_MACOS
bash $(top_builddir)/misc/fix_dylib_macOS.sh $(benchdir) $(prefix)
endif


endif
8 changes: 7 additions & 1 deletion benchmark/mplapack/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bench_PROGRAMS =
benchdir=$(prefix)/share/mplapack/bench
benchdir=$(prefix)/lib/$(target)/mplapack/benchmark

if !IS_MINGW

Expand Down Expand Up @@ -35,4 +35,10 @@ if DO_LAPACKBENCH
include Makefile.lapack.am
endif

install-data-hook:
if IS_MACOS
bash $(top_builddir)/misc/fix_dylib_macOS.sh $(benchdir) $(prefix)
endif

endif

33 changes: 27 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ case "$host" in
*)
esac
AM_CONDITIONAL(IS_MINGW, test x$IS_MINGW = x1)
IS_MACOSX=0
IS_MACOS=0
case "$host" in
*apple-darwin*)
IS_MACOSX=1
IS_MACOS=1
;;
*)
esac
AM_CONDITIONAL(IS_MACOSX, test x$IS_MACOSX = x1)
AM_CONDITIONAL(IS_MACOS, test x$IS_MACOS = x1)

IS_LINUX=0
case "$host" in
Expand Down Expand Up @@ -356,6 +356,28 @@ AM_CONDITIONAL(WANT_QUADMATH, test x$want_libquadmath = xyes)
AM_CONDITIONAL(IS__FLOAT128_LONGDOUBLE, test x$_Float128islongdouble = xyes)
AM_CONDITIONAL(IS_LONGDOUBLE_BINARY128, test x$longdoubleisbinary128 = xyes)

if test "$enable_examples" != "no" ; then
# always requires libquadmath
_FILES=`ls examples/mpblas/Makefile.macos.in examples/mpblas/Makefile.mingw.in examples/mplapack/*/Makefile.macos.in examples/mplapack/*/Makefile.mingw.in`
for _file in $_FILES; do
__file=`echo $_file | sed 's/\.in//g'`
sed -e "s|%%MPLAPACKDIR%%|$prefix|g" -e "s|%%LIBQUADMATH%%| -lquadmath|g" $_file > $__file
done
# see FreeBSD ABI: https://www.freebsd.org/cgi/man.cgi?query=arch&sektion=7&format=html
_FILES=`ls examples/mpblas/Makefile.linux.in examples/mpblas/Makefile.freebsd.in examples/mplapack/*/Makefile.linux.in examples/mplapack/*/Makefile.freebsd.in`
if test "$want_libquadmath" = "yes" ; then
for _file in $_FILES; do
__file=`echo $_file | sed 's/\.in//g'`
sed -e "s|%%MPLAPACKDIR%%|$prefix|g" -e "s|%%LIBQUADMATH%%| -lquadmath|g" $_file > $__file
done
else
for _file in $_FILES; do
__file=`echo $_file | sed 's/\.in//g'`
sed -e "s|%%MPLAPACKDIR%%|$prefix|g" -e "s|%%LIBQUADMATH%%||g" $_file > $__file
done
fi
fi

CXXFLAGS="$SAVE_CXXFLAGS"

AC_ARG_ENABLE(_Float64x,
Expand Down Expand Up @@ -774,9 +796,9 @@ fi

dnl For benchmarking, we can set explicitly BLAS and LAPACK
dnl libraries, like Intel MKL, GotoBLAS2, etc.
dnl very specific case: veclib is shipped for MacOSX. it should be used without fortran compiler
dnl very specific case: veclib is shipped for macOS. it should be used without fortran compiler
dnl this library should be the default for benchmarking (actually it is ATLAS).
dnl TODO: MacOSX support.
dnl TODO: macOS support.
if test x"$with_external_blas" != x""; then
HAVE_EXTERNAL_BLAS=""
BLAS=$with_external_blas;
Expand Down Expand Up @@ -914,7 +936,6 @@ AC_SUBST([PACKAGE_CREATED_LIBS])

########################################################################


AC_CONFIG_FILES([
mpblas/optimized/Makefile
mpblas/optimized/gmp/Makefile
Expand Down
14 changes: 14 additions & 0 deletions examples/gen_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
TOP=`pwd`

cd $TOP
cd mpblas/generic ; bash -x generate.sh

cd $TOP
cd mplapack
DIRS=`ls -d */ | sed 's|generic/||g'`
echo $DIRS

for _dir in $DIRS; do
cd $TOP
cd mplapack/$_dir/generic ; bash -x ../../generic/generate.sh
done
Loading

0 comments on commit 157676b

Please sign in to comment.