Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37787411
en ru br
Репозитории ALT

Группа :: Науки/Математика
Пакет: pswarm

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define mpiimpl openmpi
%define mpidir %_libexecdir/%mpiimpl

Name: pswarm
%define pyname %{name}_py
Version: 1.5
Release: alt1
Summary: Global optimization solver for bound and linear constrained problems
License: LGPL v2.1
Group: Sciences/Mathematics
Url: http://www.norg.uminho.pt/aivaz/pswarm/
Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org>

Source: http://www.norg.uminho.pt/aivaz/pswarm/software/PPSwarm_v1_5.zip

BuildPreReq: unzip libatlas-devel liblapack-devel R-devel python-devel
BuildPreReq: %mpiimpl-devel gcc-fortran python-module-numpy libmpe2-devel

%description
PSwarm is a global optimization solver for bound and linear constrained
problems (for which the derivatives of the objective function are
unavailable, inaccurate or expensive).

The algorithm combines pattern search and particle swarm. Basically, it
applies a directional direct search in the poll step (coordinate search
in the pure simple bounds case) and particle swarm in the search step.

PSwarm makes no use of derivative information of the objective
function. It has been shown to be efficient and robust for smooth and
nonsmooth problems, both in serial and in parallel.

The code provides an interface with Python and R. The C code includes a
parallel version using MPI. PSwarm can also be run through the NEOS
server (under the Global Optimization category). You can use PSwarm with
Python problems using the OpenOpt framework.

%package -n lib%name-devel
Summary: Static development files of PSwarm
Group: Development/C
Requires: python-module-%pyname = %version-%release
Requires: R-%name = %version-%release

%description -n lib%name-devel
PSwarm is a global optimization solver for bound and linear constrained
problems (for which the derivatives of the objective function are
unavailable, inaccurate or expensive).

The algorithm combines pattern search and particle swarm. Basically, it
applies a directional direct search in the poll step (coordinate search
in the pure simple bounds case) and particle swarm in the search step.

This package contains static development files of PSwarm.

%package -n python-module-%pyname
Summary: Python interface of PSwarm
Group: Development/Python
%setup_python_module %pyname

%description -n python-module-%pyname
PSwarm is a global optimization solver for bound and linear constrained
problems (for which the derivatives of the objective function are
unavailable, inaccurate or expensive).

The algorithm combines pattern search and particle swarm. Basically, it
applies a directional direct search in the poll step (coordinate search
in the pure simple bounds case) and particle swarm in the search step.

This package contains Python interface of PSwarm.

%package -n python-module-%{name}_test
Summary: Test for Python interface of PSwarm
Group: Development/Python
Requires: python-module-%pyname = %version-%release
%setup_python_module %{name}_test

%description -n python-module-%{name}_test
PSwarm is a global optimization solver for bound and linear constrained
problems (for which the derivatives of the objective function are
unavailable, inaccurate or expensive).

The algorithm combines pattern search and particle swarm. Basically, it
applies a directional direct search in the poll step (coordinate search
in the pure simple bounds case) and particle swarm in the search step.

This package contains test for Python interface of PSwarm.

%package -n R-%name
Summary: R interface of PSwarm
Group: Sciences/Mathematics

%description -n R-%name
PSwarm is a global optimization solver for bound and linear constrained
problems (for which the derivatives of the objective function are
unavailable, inaccurate or expensive).

The algorithm combines pattern search and particle swarm. Basically, it
applies a directional direct search in the poll step (coordinate search
in the pure simple bounds case) and particle swarm in the search step.

This package contains R interface of PSwarm.

%prep
%setup
rm -f ampl *.dll libs/*
%if "%__python_version" != "2.5"
sed -i 's|2\.5|%__python_version|g' makefile
%endif
sed -i 's| at MPIDIR at |%mpidir|' makefile

%build
mpi-selector --set %mpiimpl
source %mpidir/bin/mpivars.sh

for i in parallel_linear parallel \
serial_linear serial \
r_linear r \
py_linear py
do
%make_build $i
done

%install
install -d %buildroot%_bindir
install -m755 %name.parallel* %name.serial* \
%buildroot%_bindir
ln -s %name.parallel_linear %buildroot%_bindir/%name

install -d %buildroot%_libdir
install -m644 *.a %buildroot%_libdir
install -d %buildroot%_includedir/%name
install -p -m644 *.h %buildroot%_includedir
install -p -m644 include/* %buildroot%_includedir/%name

RLIBDIR=$(pkg-config libR --variable=rlibdir)
install -d %buildroot$RLIBDIR
install -m644 pswarm_r*.so %buildroot$RLIBDIR
pushd %buildroot
find ./$RLIBDIR -type f |sed 's|.\(.*\)|\1|' > \
$OLDPWD/R-files
popd

install -d %buildroot%python_sitelibdir/pswarm_test
install -m644 pswarm_py*.so %buildroot%python_sitelibdir
touch __init__.py
install -p -m644 *.py %buildroot%python_sitelibdir/pswarm_test

%files
%doc lgpl.txt README.txt
%_bindir/*

%files -n lib%name-devel
%_libdir/*.a
%_includedir/*

%files -n python-module-%pyname
%python_sitelibdir/%{pyname}*

%files -n python-module-%{name}_test
%python_sitelibdir/%{name}_test

%files -n R-%name -f R-files
%doc *.r

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin