Skip to content

Commit

Permalink
Merge pull request #87 from edoapra/hotfix/5.6.2
Browse files Browse the repository at this point in the history
fix for case for large matrices when nprocs0/(2**I) is always larger than 1 provided by Huub van Dam
  • Loading branch information
Jeff Daily committed Sep 13, 2017
2 parents 04f1bc7 + 2b1cd84 commit 6e420d8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion comex/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ AC_CHECK_SIZEOF([double])
# Checks for C library functions.
AC_FUNC_MMAP
COMEX_SEARCH_LIBS([sqrt], [m])
COMEX_SEARCH_LIBS([sem_open], [rt])
COMEX_SEARCH_LIBS([sem_open], [pthread])
COMEX_SEARCH_LIBS([shm_open], [rt])
COMEX_SEARCH_LIBS([shm_unlink], [rt])
COMEX_CHECK_FUNCS([bzero])
Expand Down
4 changes: 2 additions & 2 deletions global/src/scalapack.F
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ INTGR4 function slgetmxproc(n,nnodes)
INTGR4 nmax,nprocs,twoi
double precision nprocs0
double precision otto
parameter(nmax=11,fact=((7108d0*7108d0)/1024d0),otto=8d0)
parameter(nmax=19,fact=((7108d0*7108d0)/1024d0),otto=8d0)
cnew parameter(nmax=11,fact=((7108d0*7108d0)/512d0),otto=8d0)
c lower bound of 8 procs
nprocs0=max((n*n)/fact,otto)
c
c try to get powers of two
c
do i = nmax, 0, -1
if(nint(nprocs0/(2d0**i)).eq.1) goto 1
if(nint(nprocs0/(2d0**i)).ge.1) goto 1
enddo
i=4
1 twoi=2**i
Expand Down
2 changes: 1 addition & 1 deletion m4/ga_lapack.m4
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ AS_IF([test $ga_lapack_ok = no],
# Generic LAPACK library?
for lib in lapack lapack_rs6k; do
AS_IF([test $ga_lapack_ok = no],
[ga_save_LIBS="$LIBS"; LIBS="-l$lib $BLAS_LIBS $LIBS"
[ga_save_LIBS="$LIBS"; LIBS="-l$lib $BLAS_LIBS $LIBS"; LAPACK_LIBS="-l$lib"
AS_IF([test "x$enable_f77" = xno],
[AC_MSG_CHECKING([for C LAPACK using -l$lib])
AC_LANG_PUSH([C])
Expand Down
15 changes: 15 additions & 0 deletions travis/install-mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ case "$os" in
wget --no-check-certificate http://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz
tar -xzf mpich-3.2.tar.gz
cd mpich-3.2
cat > mpiimpl.h.patch <<EOF
--- src/include/mpiimpl.h 2017-09-12 11:31:22.104653843 -0700
+++ src/include/mpiimpl.h.new 2017-09-12 11:30:29.696274605 -0700
@@ -1528,7 +1528,8 @@
#ifdef MPID_DEV_REQUEST_DECL
MPID_DEV_REQUEST_DECL
#endif
-} MPID_Request ATTRIBUTE((__aligned__(32)));
+} ATTRIBUTE((__aligned__(32))) MPID_Request;
+/*} MPID_Request ATTRIBUTE((__aligned__(32)));*/
extern MPIU_Object_alloc_t MPID_Request_mem;
/* Preallocated request objects */
EOF
patch -p0 < mpiimpl.h.patch
mkdir build && cd build
../configure CFLAGS="-w" --prefix=$TRAVIS_ROOT/mpich
make -j ${MAKE_JNUM}
Expand Down

0 comments on commit 6e420d8

Please sign in to comment.