Package Details: superlu 5.2.1-9

Git Clone URL: https://aur.archlinux.org/superlu.git (read-only)
Package Base: superlu
Description: Set of subroutines to solve a sparse linear system
Upstream URL: https://github.com/xiaoyeli/superlu/
Licenses: custom
Submitter: gborzi
Maintainer: valandil
Last Packager: valandil
Votes: 39
Popularity: 0.058498
First Submitted: 2009-05-13 18:28
Last Updated: 2019-07-27 03:01

Latest Comments

1 2 3 4 5 Next › Last »

valandil commented on 2019-07-27 03:01

Oops, sorry about that.

Fixed.

stefanpaquay commented on 2019-07-26 22:32

If you replace "openblas-lapack-openmp" with "blas" in the PKGBUILD it should build even though you have openblas instead of blas. At least for me it works and I have openblas-lapack I think...

stefanpaquay commented on 2019-07-26 22:30

That must be a mistake that slipped in due to the recent modifications. The package should depend on something that provides blas, lapack and cblas. That does not have to be openblas-lapack-openmp but could also be openblas. I am not exactly sure how to configure that in a PKGBUILD.

alfredo.ardito commented on 2019-07-26 22:11

Hi, I got this error when building:

loading packages...
resolving dependencies...
looking for conflicting packages...
:: openblas-lapack-openmp and openblas are in conflict. Remove openblas? [y/N]
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: openblas-lapack-openmp and openblas are in conflict
==> Restart building superlu ? [y/N]

valandil commented on 2019-07-26 16:00

I've pushed the new CMake-based package.

I haven't had time to verify that cmake performed all the same tests, but everything built fine even in a chroot for me.

Let me know of any issues.

stefanpaquay commented on 2019-07-24 12:37

No problem, let me know if there is anything else I can help with!

valandil commented on 2019-07-24 12:32

The crash would affect armadillo as well, as armadillo calls BLAS through SuperLU. It's a good thing then!

Yeah, I did switch to building with CMake using your PKGBUILD as a template. I'll investigate the tests later tonight.

Thanks for the help!

stefanpaquay commented on 2019-07-24 11:47

To be honest I just install superlu as a dependency of Armadillo and use the armadillo sparse matrix which I think just wraps around superlu. I have not gone into extensively using its sparse routines yet so I cannot say how crash-prone it is.

If you want to make sure the tests that CMake runs are equivalent, you will have to edit the CMakeLists.txt in the TESTING dir. The value of NRHS is 2 in CMakeLists.txt but 5 in the C-shell scripts. Even though the calls seem similar I do think the C-shell scripts run more tests so that will require some digging. The following PKGBUILD should help you get started on using CMake to build though:

# Maintainer: Joey Dumont <joey.dumont@gmail.com>
# Contributor: Giuseppe Borzi <gborzi@ieee.org>
# Modifications to use Cmake by Stefan Paquay <stefanpaquay@gmail.com>
pkgname=superlu
pkgver=5.2.1
pkgrel=7
pkgdesc="Set of subroutines to solve a sparse linear system"
arch=('i686' 'x86_64')
url="https://github.com/xiaoyeli/superlu/"
license=('custom')
depends=('gcc-libs' 'blas')
makedepends=('gcc-fortran' 'tcsh' 'cmake')
install=${pkgname}.install
source=("${url}/archive/v${pkgver}.tar.gz")
sha512sums=('c5f9ca6055b6861dcc89e31c446c9f57a4e16333f9f24f109e8f375eded878005fa520ab39d2c1dd0ce12f289f9e251aef47da58c975bf5b1f09ca7539194e90')
options=('staticlibs')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  mkdir -p build-shared
  msg "Building shared library..."
  cd build-shared
  cmake ../ -DCMAKE_BUILD_TYPE=Release -Denable_blaslib=Off \
      -DBUILD_SHARED_LIBS=True -DCMAKE_C_FLAGS="-fPIC" \
      -DCMAKE_FORTRAN_FLAGS="-fPIC" -DCMAKE_EXE_LINKER_FLAGS="-shared"
  make

  mkdir -p ../build-static
  cd ../build-static
  msg "Building static library..."
  cmake ../ -DCMAKE_BUILD_TYPE=Release -Denable_blaslib=OFF \
      -DBUILD_SHARED_LIBS=False -DCMAKE_C_FLAGS="-fPIC" \
      -DCMAKE_FORTRAN_FLAGS="-fPIC"
  make

}

check() {
  cd "$srcdir/$pkgname-$pkgver"

  msg "Testing library..."
  cd build-shared/TESTING
  make && make test
  cd ../../build-static/TESTING
  make && make test

  # TODO: Get the equivalent of the following to run:
  # if [ "x`grep failed *.out`" != "x" ]; then
  #   msg 'Testing failed'
  #   return 1
  # fi
  # for TEST_SCRIPT in ../TESTING/*test.csh; do
  #   tcsh $TEST_SCRIPT
  # done
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  mkdir -p $pkgdir/usr/lib $pkgdir/usr/include/$pkgname \
           $pkgdir/usr/share/doc/$pkgname \
           $pkgdir/usr/share/licenses/$pkgname
  install -p -m644 $srcdir/$pkgname-$pkgver/build-static/SRC/lib$pkgname.a $pkgdir/usr/lib
  install -p -m755 $srcdir/$pkgname-$pkgver/build-shared/SRC/lib$pkgname.so.$pkgver $pkgdir/usr/lib
  cd $pkgdir/usr/lib
  ln -s lib$pkgname.so.$pkgver lib$pkgname.so.4
  ln -s lib$pkgname.so.4 lib$pkgname.so
  install -m644 $srcdir/$pkgname-$pkgver/SRC/*.h $pkgdir/usr/include/$pkgname
  install -m644 $srcdir/$pkgname-$pkgver/README $pkgdir/usr/share/doc/$pkgname
  install -m644 $srcdir/$pkgname-$pkgver/License.txt $pkgdir/usr/share/licenses/$pkgname
  install -m644 $srcdir/$pkgname-$pkgver/DOC/ug.pdf $pkgdir/usr/share/doc/$pkgname/ug.pdf
}

valandil commented on 2019-07-24 02:41

On a side note, did you experience crashes with SuperLU recently? I'm wondering if https://github.com/xiaoyeli/superlu/issues/31 could be an issue.

valandil commented on 2019-07-24 02:25

I must admit that I haven't kept up to date with SuperLU all that much. Have you seen this reported elsewhere? I don't see mentions of tests failing in the GitHub issues. Maybve it's worth raising an issue there and see if it's SuperLU issue or a openblas-lapack-openmp issue.

On the packaging side, I don't mind switching to the CMake build. upstream seem to favour CMake themselves. I'll make sure that the tests are equivalent on both sides though.