MAGMA 2.0.1: make install => no rules to make install.

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

MAGMA 2.0.1: make install => no rules to make install.

Postby olahaye74 » Tue Apr 26, 2016 11:37 am

Hi,

I'm trying to create a rhel7 rpm package to deploy MAGMA 2.0.1 on my cluster, unfortunately, the install rule is not generated.
Furthermore, if I do a cmake -P cmake_install.cmake
I get a:
-- Install configuration: "RELEASE"
and nothing is installed.

Looking at the CMakeList.txt, no FILE(INSTALL ....) command.

Is there a trick I missed? (the build works flawlessly)

here is how I did proceed:
Code: Select all
tar xvfz magma-2.0.1.tar.gz
cd magma-2.0.1.tar.gz
cmake -E make_directory build
cd build
  CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic}" ; export CFLAGS ;
  CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic}" ; export CXXFLAGS ;
  FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -I/usr/lib/gcc/x86_64-redhat-linux6E/4.4.4/finclude}" ; export FFLAGS ;
  FCFLAGS="${FCFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -I/usr/lib/gcc/x86_64-redhat-linux6E/4.4.4/finclude}" ; export FCFLAGS ;
  LDFLAGS="${LDFLAGS:--Wl,-z,relro }" ; export LDFLAGS ;
  /usr/bin/cmake \
        -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \
        -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \
        -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
        -DCMAKE_INSTALL_PREFIX:PATH=/usr \
        -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
        -DLIB_INSTALL_DIR:PATH=/usr/lib64 \
        -DSYSCONF_INSTALL_DIR:PATH=/etc \
        -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
%if "lib64" == "lib64"
        -DLIB_SUFFIX=64 \
%endif
        -DBUILD_SHARED_LIBS:BOOL=ON
# This is the expansion of the rpm %cmake macro

make -j16
# build completes without trouble

make install
make: *** No rule to make target `install'.  Stop.
# Looking at the makefile, there is only a preinstall: rule. Nothing else about install.

cmake -DDESTDIR=/tmp/temp_root/ -P cmake_install.cmake
-- Install configuration: "RELEASE"
# Nothing done
# install_manifest.txt is empty


Now I'm stuck as my cmake knowledge is limited
As a workaround, can I just copy files in the following way?:
./build/lib/* => /tmp/temp_root/usr/lib64/
./include => /tmp/temp_root/include
./doc, ./examples, ./README, ... => /usr/share/doc/magma-2.0.1

I'm using the following packages:
cmake-2.8.11-5.el7.x86_64
cuda-documentation-7-5-7.5-18.x86_64
cuda-license-7-5-7.5-18.x86_64
cuda-runtime-7-5-7.5-18.x86_64
cuda-nvrtc-7-5-7.5-18.x86_64
cuda-cufft-dev-7-5-7.5-18.x86_64
cuda-cusolver-7-5-7.5-18.x86_64
cuda-toolkit-7-5-7.5-18.x86_64
cuda-core-7-5-7.5-18.x86_64
cuda-command-line-tools-7-5-7.5-18.x86_64
cuda-cublas-7-5-7.5-18.x86_64
cuda-cufft-7-5-7.5-18.x86_64
cuda-npp-dev-7-5-7.5-18.x86_64
cuda-cusparse-dev-7-5-7.5-18.x86_64
cuda-visual-tools-7-5-7.5-18.x86_64
cuda-misc-headers-7-5-7.5-18.x86_64
cuda-driver-dev-7-5-7.5-18.x86_64
cuda-cudart-dev-7-5-7.5-18.x86_64
cuda-7-5-7.5-18.x86_64
cuda-curand-dev-7-5-7.5-18.x86_64
cuda-nvrtc-dev-7-5-7.5-18.x86_64
cuda-npp-7-5-7.5-18.x86_64
cuda-cusparse-7-5-7.5-18.x86_64
cuda-cusolver-dev-7-5-7.5-18.x86_64
cuda-cudart-7-5-7.5-18.x86_64
cuda-curand-7-5-7.5-18.x86_64
cuda-cublas-dev-7-5-7.5-18.x86_64
cuda-samples-7-5-7.5-18.x86_64
openblas-devel-0.2.15-5.el7.x86_64
openblas-openmp-0.2.15-5.el7.x86_64
openblas-serial64_-0.2.15-5.el7.x86_64
openblas-threads64-0.2.15-5.el7.x86_64
openblas-threads64_-0.2.15-5.el7.x86_64
openblas-openmp64-0.2.15-5.el7.x86_64
openblas-serial64-0.2.15-5.el7.x86_64
openblas-openmp64_-0.2.15-5.el7.x86_64
openblas-0.2.15-5.el7.x86_64
openblas-threads-0.2.15-5.el7.x86_64
olahaye74
 
Posts: 4
Joined: Tue Apr 26, 2016 11:18 am

Re: MAGMA 2.0.1: make install => no rules to make install.

Postby mgates3 » Wed Apr 27, 2016 4:20 pm

Support in MAGMA for CMake is very limited. Mostly we have it there for Windows builds. What gets installed normally using the Makefiles is

lib/*.a
lib/*.so
include/*.h
sparse-iter/include/*.h

The Makefile will also configure lib/pkgconfig/magma.pc

I hope that helps. We'll look at adding installation to the CMake build at some point.

-mark
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm

Re: MAGMA 2.0.1: make install => no rules to make install.

Postby olahaye74 » Mon May 02, 2016 2:58 am

Hi,

Thanks for help, I didn't notice that there was a stadard Makefile. I've used it and it worked with the following patch which is needed to differentiate prefix and DESTDIR (mandatory for packaging)
I've also added LIB_SUFFIX to support linux distributions that are not debian based (RedhHat, CentOS, fedora, OpenMandriva, ...)
If you're interested, I4ve created a spec file for RPM build.

Code: Select all
--- Makefile.orig       2016-04-27 14:33:59.154334712 +0200
+++ Makefile    2016-04-27 14:37:43.848898181 +0200
@@ -648,23 +648,23 @@
 INSTALL_LDFLAGS := $(filter-out -fPIC -Wall, $(LDFLAGS))
 
 install_dirs:
-       mkdir -p $(prefix)
-       mkdir -p $(prefix)/include
-       mkdir -p $(prefix)/lib
-       mkdir -p $(prefix)/lib/pkgconfig
+       mkdir -p $(DESTDIR)$(prefix)
+       mkdir -p $(DESTDIR)$(prefix)/include
+       mkdir -p $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)
+       mkdir -p $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)/pkgconfig
 
 install: lib sparse-lib install_dirs
        # MAGMA
-       cp include/*.h              $(prefix)/include
-       cp sparse-iter/include/*.h  $(prefix)/include
-       cp $(libs)                  $(prefix)/lib
+       cp include/*.h              $(DESTDIR)$(prefix)/include
+       cp sparse-iter/include/*.h  $(DESTDIR)$(prefix)/include
+       cp $(libs)                  $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)
        # pkgconfig
        cat lib/pkgconfig/magma.pc.in                   | \
        sed -e s:@INSTALL_PREFIX@:"$(prefix)":          | \
        sed -e s:@CFLAGS@:"$(INSTALL_FLAGS) $(INC)":    | \
        sed -e s:@LIBS@:"$(INSTALL_LDFLAGS) $(LIBEXT)": | \
        sed -e s:@MAGMA_REQUIRED@::                       \
-           > $(prefix)/lib/pkgconfig/magma.pc
+           > $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)/pkgconfig/magma.pc
 
 
 # ----------------------------------------
--- make.inc.openblas.orig      2016-04-27 14:39:47.089916114 +0200
+++ make.inc.openblas   2016-04-27 14:40:15.941217976 +0200
@@ -67,6 +67,6 @@
 -include make.check-cuda
 
 LIBDIR    = -L$(CUDADIR)/lib64 \
-            -L$(OPENBLASDIR)/lib
+            -L$(OPENBLASDIR)/lib$(LIB_SUFFIX)
 
 INC       = -I$(CUDADIR)/include
olahaye74
 
Posts: 4
Joined: Tue Apr 26, 2016 11:18 am

Re: MAGMA 2.0.1: make install => no rules to make install.

Postby olahaye74 » Wed May 18, 2016 9:24 am

The magma spec file that let generate the redhat/fedora/centos rpm package.
Attachments
magma.spec.txt
magma spec file (remove .txt extension)
(2.28 KiB) Downloaded 45 times
olahaye74
 
Posts: 4
Joined: Tue Apr 26, 2016 11:18 am

Re: MAGMA 2.0.1: make install => no rules to make install.

Postby olahaye74 » Wed May 18, 2016 9:26 am

The needed patch for packaging. Allow to differentiate $PREFIX (where files are used) and $DESTDIR (where files are copied before being packaged)
Attachments
magma_Makefile.patch.txt
Magma Makefile patch (remove the .txt extension)
(1.58 KiB) Downloaded 40 times
olahaye74
 
Posts: 4
Joined: Tue Apr 26, 2016 11:18 am

Re: MAGMA 2.0.1: make install => no rules to make install.

Postby mgates3 » Wed Aug 31, 2016 3:50 pm

MAGMA 2.1 was just released. I included several of your suggestions about DESTDIR and LIB_SUFFIX in Makefile, and also added an install rule to CMake. Thanks.

-mark
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron