Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:redwil:15.4
trlan
trlan.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File trlan.spec of Package trlan
# # spec file for package trlan # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global flavor @BUILD_FLAVOR@%{nil} %define so_ver 0 %if 0%{?sle_version} >= 150200 %define DisOMPI1 ExclusiveArch: do_not_build %endif %if !0%{?is_opensuse} && 0%{?sle_version:1} && 0%{?sle_version} < 150200 %define DisOMPI3 ExclusiveArch: do_not_build %endif %if "%flavor" == "" ExclusiveArch: do_not_build %endif %if "%flavor" == "serial" %{bcond_with hpc} %endif %if "%flavor" == "openmpi1" %{?DisOMPI1} %define mpi_family openmpi %define mpi_ver 1 %{bcond_with hpc} %endif %if "%flavor" == "openmpi2" %{?DisOMPI2} %define mpi_family openmpi %define mpi_ver 2 %{bcond_with hpc} %endif %if "%flavor" == "openmpi3" %{?DisOMPI3} %define mpi_family openmpi %define mpi_ver 3 %{bcond_with hpc} %endif %if "%flavor" == "openmpi4" %{?DisOMPI3} %define mpi_family openmpi %define mpi_ver 4 %{bcond_with hpc} %endif # openmpi 1 was called just "openmpi" in Leap 15.x/SLE15 %if 0%{?suse_version} >= 1550 || "%{mpi_family}" != "openmpi" || "%{mpi_ver}" != "1" %define mpi_ext %{?mpi_ver} %endif %if 0%{?mpi_family:1} %{bcond_without mpi} %define pkgname trlan-%{mpi_family}%{?mpi_ext} %define libprefix libtrlan_mpi %define libname() libtrlan_mpi%{so_ver}-%{mpi_family}%{?mpi_ext} %global my_prefix %{_libdir}/mpi/gcc/%{mpi_family}%{?mpi_ext} %global my_libdir %{my_prefix}/%{_lib} %global my_incdir %{my_prefix}/include %else %{bcond_with mpi} %define pkgname trlan %define libprefix libtrlan %define libname() libtrlan%{so_ver} %global my_prefix %{_prefix} %global my_libdir %{_libdir} %global my_incdir %{_includedir} %endif Name: %{pkgname} Version: 201009 Release: 0 Summary: A Dynamic Thick Restart Lanczos solver License: BSD-2-Clause Group: Development/Libraries/C and C++ URL: https://sdm.lbl.gov/~kewu/trlan.html Source0: trlan-%{version}.tar.bz2 BuildRequires: fdupes BuildRequires: gcc-fortran BuildRequires: lapack-devel %if %{with mpi} BuildRequires: %{mpi_family}%{?mpi_ext}-devel BuildRequires: %{mpi_family}%{?mpi_ext}-macros-devel # mmap failures in MPI communication ExcludeArch: %{ix86} %endif %description This software package implements the thick-restart Lanczos method. It can be used on either a single address space machine or a distributed parallel machine. The user can choose to implement or use a matrix-vector multiplication routine in any form convenient. Most of the arithmetic computations in the software are done through calls to BLAS and LAPACK. %package -n %{libname} Summary: A Dynamic Thick Restart Lanczos solver Group: System/Libraries %if %{with mpi} Requires: %{mpi_family}%{?mpi_ext}-libs %endif %description -n %{libname} This software package implements the thick-restart Lanczos method. It can be used on either a single address space machine or a distributed parallel machine. The user can choose to implement or use a matrix-vector multiplication routine in any form convenient. Most of the arithmetic computations in the software are done through calls to BLAS and LAPACK. %package devel Summary: Development and header files for %{name} Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} %if %{with mpi} Requires: %{mpi_family}%{?mpi_ext}-devel %endif %description devel This package contains the development and header files for %{name}. %prep %setup -q -n trlan-%{version} %build %if %{with mpi} %setup_openmpi export CC=%{my_prefix}/bin/mpicc export FC=%{my_prefix}/bin/mpif77 export F90=%{my_prefix}/bin/mpif90 # GCC 10+ does not like MPI_Allreduce being called with changing types for the send/recv buffers %if 0%{?suse_version} >= 1550 make plib FC=${FC} F90=${F90} CFLAGS="%{optflags} -fPIC" FFLAGS="%{optflags} -fallow-argument-mismatch -fPIC" %else make plib FC=${FC} F90=${F90} CFLAGS="%{optflags} -fPIC" FFLAGS="%{optflags} -fPIC" %endif %else export F90=%{my_prefix}/bin/gfortran make lib CFLAGS="%{optflags} -fPIC" FFLAGS="%{optflags} -fPIC" %endif gfortran -shared -Wl,-soname=%{libprefix}.so.0 -o %{libprefix}.so.0.0 -Wl,-whole-archive %{libprefix}.a -Wl,-no-whole-archive # Build test binary %if %{with mpi} mpifort -o simplef -I ./SRC/ ./examples/T3E/simple.f90 -ltrlan_mpi -llapack -lblas -lm -L . %else gfortran -o simplec ./examples/SUN/simplec.c -ltrlan -llapack -lblas -lm -L . %endif %install install -m 755 -Dpt %{buildroot}%{my_libdir} %{libprefix}.so.0.0 ln -s %{libprefix}.so.0.0 %{buildroot}%{my_libdir}/%{libprefix}.so.0 ln -s %{libprefix}.so.0.0 %{buildroot}%{my_libdir}/%{libprefix}.so install -m 644 -Dpt %{buildroot}%{my_incdir} SRC/*.mod %fdupes -s %{buildroot}%{my_incdir} %check %if %{with mpi} %setup_openmpi mpirun --np 2 --mca btl vader,self ./simplef %else ./simplec %endif %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files -n %{libname} %{my_libdir}/%{libprefix}.so.* %files devel %doc README doc/*.html %{my_incdir}/* %{my_libdir}/%{libprefix}.so %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor