pycutest


Namepycutest JSON
Version 1.6.2 PyPI version JSON
download
home_pageNone
SummaryA Python wrapper to the CUTEst optimization test environment
upload_time2024-04-09 07:31:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseGPL-3.0-or-later
keywords mathematics optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====================================================================================================================================
PyCUTEst: A Python interface to the CUTEst Optimization Test Environment |License| |Build Status| |PyPI Version| |Downloads| |Paper|
====================================================================================================================================

PyCUTEst is a Python interface to `CUTEst <https://github.com/ralna/CUTEst>`_, a Fortran package for testing optimization software. It is based on the `interface originally developed for CUTEr <http://fides.fe.uni-lj.si/~arpadb/software-pycuter.html>`_ by `Prof. Arpad Buermen <http://www.fe.uni-lj.si/en/the_faculty/staff/alphabetically/55/>`_.

Full details on how to use PyCUTEst are available in the `documentation <https://jfowkes.github.io/pycutest/>`_, and a brief summary of the package's goals is available in the `PyCUTEst journal article <https://doi.org/10.21105/joss.04377>`_.

Requirements
------------
PyCUTEst requires the following software to be installed:

* Python 3 (http://www.python.org/)
* CUTEst (see below)

**Please Note:** Currently PyCUTEst only supports Mac and Linux. For Windows 10 (or later), PyCUTEst can be used through the `Windows Subsystem for Linux <https://docs.microsoft.com/en-us/windows/wsl/>`_, following the Linux installation instructions.

Installing CUTEst on Linux
--------------------------
These instructions do not include installation of the MATLAB interface. You will need to install four packages: archdefs, SIFDecode, CUTEst and MASTSIF. To keep things simple, install all four packages in the same directory:

 .. code-block:: bash

    $ mkdir cutest
    $ cd cutest
    $ git clone https://github.com/ralna/ARCHDefs ./archdefs
    $ git clone https://github.com/ralna/SIFDecode ./sifdecode
    $ git clone https://github.com/ralna/CUTEst ./cutest
    $ git clone https://bitbucket.org/optrove/sif ./mastsif

Note that :code:`mastsif` contains all the test problem definitions and
is therefore quite large. If you're short on space you may want to copy
only the ``*.SIF`` files for the problems you wish to test on.

Next set the following environment variables in your :code:`~/.bashrc` to point to the installation directories used above:

 .. code-block:: bash

    # CUTEst
    export ARCHDEFS=/path/to/cutest/archdefs/
    export SIFDECODE=/path/to/cutest/sifdecode/
    export MASTSIF=/path/to/cutest/mastsif/
    export CUTEST=/path/to/cutest/cutest/
    export MYARCH="pc64.lnx.gfo"

Now we are ready to install CUTEst in double precision (requires :code:`gfortran` and :code:`gcc`):

 .. code-block:: bash

    $ source ~/.bashrc # load above environment variables
    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/jfowkes/pycutest/master/.install_cutest.sh)"

And CUTEst should run from here. To test that the installation works, issue the commands:

 .. code-block:: bash

    $ cd $SIFDECODE/src ; make -f $SIFDECODE/makefiles/$MYARCH test
    $ cd $CUTEST/src ; make -f $CUTEST/makefiles/$MYARCH test

**Please Note:** *currently PyCUTEst only supports gfortran and uses the default version on your path (as returned by* :code:`gfortran -v` *). Please ensure this is the same version that you install CUTEst with above otherwise you may experience segmentation faults.*

Installing CUTEst on Mac
------------------------
Install CUTEst using Homebrew as detailed below (installing CUTEst manually on Mac is not supported). First it is important to ensure that you have the latest version of Xcode Command Line Tools installed (or the latest version of Xcode), please ensure this is the case by following `this guide <https://mac.install.guide/commandlinetools/index.html>`_. Now install the Homebrew package manager:

 .. code-block:: bash

    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then you can easily install CUTEst:

 .. code-block:: bash

    $ brew tap optimizers/cutest
    $ brew install cutest --without-single --with-matlab # if using Matlab interface
    $ brew install mastsif  # if you want all the test problems
    $ for f in "archdefs" "mastsif" "sifdecode" "cutest"; do \
    $   echo ". $(brew --prefix $f)/$f.bashrc" >> ~/.bashrc; \
    $ done

**Anaconda Users:** *please ensure that* :code:`~/.bashrc` *is sourced in your conda environment (you can do this with the command* :code:`source ~/.bashrc` *) otherwise you may encounter errors using PyCUTEst.*

**Please Note:** *you may see warnings such as* :code:`ld: warning: object file (RANGE.o) was built for newer macOS version (11.5) than being linked (10.15)` *. To suppress these warnings please set the environment variable* :code:`MACOSX_DEPLOYMENT_TARGET` *to your current macOS version (e.g.* :code:`export MACOSX_DEPLOYMENT_TARGET=11.5` *in this example, you can make this permanent by adding it to your* :code:`~/.bashrc` *file).*

Installing PyCUTEst
-------------------
For easy installation, use `pip <http://www.pip-installer.org/>`_:

 .. code-block:: bash

    $ pip install pycutest

Note that if an older install of PyCUTEst is present on your system you can use:

 .. code-block:: bash

    $ pip install --upgrade pycutest

to upgrade PyCUTEst to the latest version.

You will then need to create a folder which will store all your compiled problems:

 .. code-block:: bash

    $ mkdir pycutest_cache

And set an environment variable to tell PyCUTEst about this directory, by adding to your :code:`~/.bashrc` file:

 .. code-block:: bash

    export PYCUTEST_CACHE="/path/to/pycutest_cache"

If you do not set this environment variable, then PyCUTEst will create a cache folder of compiled problems inside your current working directory.

Note that you can uninstall PyCUTEst as follows:

 .. code-block:: bash

    $ pip uninstall pycutest

Support
-------
Please ask any questions or report problems using GitHub's issue tracker.

Bugs
----
Please report any bugs using GitHub's issue tracker.

Citing
------
To cite PyCUTEst, please use the following reference:

`J. Fowkes, L. Roberts, and Á. Bűrmen, (2022). PyCUTEst: an open source Python package of optimization test problems. Journal of Open Source Software, 7(78), 4377, https://doi.org/10.21105/joss.04377`

In BibTeX, the citation is:

.. code-block::

    @article{PyCUTEst2022,
        doi = {10.21105/joss.04377},
        url = {https://doi.org/10.21105/joss.04377},
        year = {2022},
        publisher = {The Open Journal},
        volume = {7},
        number = {78},
        pages = {4377},
        author = {Jaroslav Fowkes and Lindon Roberts and Árpád Bűrmen},
        title = {PyCUTEst: an open source Python package of optimization test problems},
        journal = {Journal of Open Source Software}
    }

Contributing
------------
We welcome contributions to PyCUTEst, please see :code:`CONTRIBUTING.md`.

License
-------
This package is released under the GNU GPL license.

.. |License| image::  https://img.shields.io/badge/License-GPL%20v3-blue.svg
             :target: https://www.gnu.org/licenses/gpl-3.0
             :alt: GNU GPL v3 License
.. |Build Status| image::  https://img.shields.io/github/actions/workflow/status/jfowkes/pycutest/test.yml?branch=master
                  :target: https://github.com/jfowkes/pycutest/actions/workflows/test.yml
                  :alt: Build status
.. |PyPI Version| image:: https://img.shields.io/pypi/v/pycutest.svg
                  :target: https://pypi.python.org/pypi/pycutest
                  :alt: PyPI version
.. |Downloads| image:: https://static.pepy.tech/personalized-badge/pycutest?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads
               :target: https://pepy.tech/project/pycutest
               :alt: Total downloads
.. |Paper| image:: https://joss.theoj.org/papers/10.21105/joss.04377/status.svg
           :target: https://doi.org/10.21105/joss.04377
           :alt: JOSS Paper

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pycutest",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Jaroslav Fowkes <jaroslav.fowkes@maths.ox.ac.uk>, Lindon Roberts <lindon.roberts@sydney.edu.au>",
    "keywords": "mathematics, optimization",
    "author": null,
    "author_email": "Jaroslav Fowkes <jaroslav.fowkes@maths.ox.ac.uk>, Lindon Roberts <lindon.roberts@sydney.edu.au>",
    "download_url": "https://files.pythonhosted.org/packages/9b/b4/de4f147801676240c5240ebaa8c15e7318eeacfe1eee21bc5735867dcbc4/pycutest-1.6.2.tar.gz",
    "platform": null,
    "description": "====================================================================================================================================\nPyCUTEst: A Python interface to the CUTEst Optimization Test Environment |License| |Build Status| |PyPI Version| |Downloads| |Paper|\n====================================================================================================================================\n\nPyCUTEst is a Python interface to `CUTEst <https://github.com/ralna/CUTEst>`_, a Fortran package for testing optimization software. It is based on the `interface originally developed for CUTEr <http://fides.fe.uni-lj.si/~arpadb/software-pycuter.html>`_ by `Prof. Arpad Buermen <http://www.fe.uni-lj.si/en/the_faculty/staff/alphabetically/55/>`_.\n\nFull details on how to use PyCUTEst are available in the `documentation <https://jfowkes.github.io/pycutest/>`_, and a brief summary of the package's goals is available in the `PyCUTEst journal article <https://doi.org/10.21105/joss.04377>`_.\n\nRequirements\n------------\nPyCUTEst requires the following software to be installed:\n\n* Python 3 (http://www.python.org/)\n* CUTEst (see below)\n\n**Please Note:** Currently PyCUTEst only supports Mac and Linux. For Windows 10 (or later), PyCUTEst can be used through the `Windows Subsystem for Linux <https://docs.microsoft.com/en-us/windows/wsl/>`_, following the Linux installation instructions.\n\nInstalling CUTEst on Linux\n--------------------------\nThese instructions do not include installation of the MATLAB interface. You will need to install four packages: archdefs, SIFDecode, CUTEst and MASTSIF. To keep things simple, install all four packages in the same directory:\n\n .. code-block:: bash\n\n    $ mkdir cutest\n    $ cd cutest\n    $ git clone https://github.com/ralna/ARCHDefs ./archdefs\n    $ git clone https://github.com/ralna/SIFDecode ./sifdecode\n    $ git clone https://github.com/ralna/CUTEst ./cutest\n    $ git clone https://bitbucket.org/optrove/sif ./mastsif\n\nNote that :code:`mastsif` contains all the test problem definitions and\nis therefore quite large. If you're short on space you may want to copy\nonly the ``*.SIF`` files for the problems you wish to test on.\n\nNext set the following environment variables in your :code:`~/.bashrc` to point to the installation directories used above:\n\n .. code-block:: bash\n\n    # CUTEst\n    export ARCHDEFS=/path/to/cutest/archdefs/\n    export SIFDECODE=/path/to/cutest/sifdecode/\n    export MASTSIF=/path/to/cutest/mastsif/\n    export CUTEST=/path/to/cutest/cutest/\n    export MYARCH=\"pc64.lnx.gfo\"\n\nNow we are ready to install CUTEst in double precision (requires :code:`gfortran` and :code:`gcc`):\n\n .. code-block:: bash\n\n    $ source ~/.bashrc # load above environment variables\n    $ /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/jfowkes/pycutest/master/.install_cutest.sh)\"\n\nAnd CUTEst should run from here. To test that the installation works, issue the commands:\n\n .. code-block:: bash\n\n    $ cd $SIFDECODE/src ; make -f $SIFDECODE/makefiles/$MYARCH test\n    $ cd $CUTEST/src ; make -f $CUTEST/makefiles/$MYARCH test\n\n**Please Note:** *currently PyCUTEst only supports gfortran and uses the default version on your path (as returned by* :code:`gfortran -v` *). Please ensure this is the same version that you install CUTEst with above otherwise you may experience segmentation faults.*\n\nInstalling CUTEst on Mac\n------------------------\nInstall CUTEst using Homebrew as detailed below (installing CUTEst manually on Mac is not supported). First it is important to ensure that you have the latest version of Xcode Command Line Tools installed (or the latest version of Xcode), please ensure this is the case by following `this guide <https://mac.install.guide/commandlinetools/index.html>`_. Now install the Homebrew package manager:\n\n .. code-block:: bash\n\n    $ /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n\nThen you can easily install CUTEst:\n\n .. code-block:: bash\n\n    $ brew tap optimizers/cutest\n    $ brew install cutest --without-single --with-matlab # if using Matlab interface\n    $ brew install mastsif  # if you want all the test problems\n    $ for f in \"archdefs\" \"mastsif\" \"sifdecode\" \"cutest\"; do \\\n    $   echo \". $(brew --prefix $f)/$f.bashrc\" >> ~/.bashrc; \\\n    $ done\n\n**Anaconda Users:** *please ensure that* :code:`~/.bashrc` *is sourced in your conda environment (you can do this with the command* :code:`source ~/.bashrc` *) otherwise you may encounter errors using PyCUTEst.*\n\n**Please Note:** *you may see warnings such as* :code:`ld: warning: object file (RANGE.o) was built for newer macOS version (11.5) than being linked (10.15)` *. To suppress these warnings please set the environment variable* :code:`MACOSX_DEPLOYMENT_TARGET` *to your current macOS version (e.g.* :code:`export MACOSX_DEPLOYMENT_TARGET=11.5` *in this example, you can make this permanent by adding it to your* :code:`~/.bashrc` *file).*\n\nInstalling PyCUTEst\n-------------------\nFor easy installation, use `pip <http://www.pip-installer.org/>`_:\n\n .. code-block:: bash\n\n    $ pip install pycutest\n\nNote that if an older install of PyCUTEst is present on your system you can use:\n\n .. code-block:: bash\n\n    $ pip install --upgrade pycutest\n\nto upgrade PyCUTEst to the latest version.\n\nYou will then need to create a folder which will store all your compiled problems:\n\n .. code-block:: bash\n\n    $ mkdir pycutest_cache\n\nAnd set an environment variable to tell PyCUTEst about this directory, by adding to your :code:`~/.bashrc` file:\n\n .. code-block:: bash\n\n    export PYCUTEST_CACHE=\"/path/to/pycutest_cache\"\n\nIf you do not set this environment variable, then PyCUTEst will create a cache folder of compiled problems inside your current working directory.\n\nNote that you can uninstall PyCUTEst as follows:\n\n .. code-block:: bash\n\n    $ pip uninstall pycutest\n\nSupport\n-------\nPlease ask any questions or report problems using GitHub's issue tracker.\n\nBugs\n----\nPlease report any bugs using GitHub's issue tracker.\n\nCiting\n------\nTo cite PyCUTEst, please use the following reference:\n\n`J. Fowkes, L. Roberts, and \u00c1. B\u0171rmen, (2022). PyCUTEst: an open source Python package of optimization test problems. Journal of Open Source Software, 7(78), 4377, https://doi.org/10.21105/joss.04377`\n\nIn BibTeX, the citation is:\n\n.. code-block::\n\n    @article{PyCUTEst2022,\n        doi = {10.21105/joss.04377},\n        url = {https://doi.org/10.21105/joss.04377},\n        year = {2022},\n        publisher = {The Open Journal},\n        volume = {7},\n        number = {78},\n        pages = {4377},\n        author = {Jaroslav Fowkes and Lindon Roberts and \u00c1rp\u00e1d B\u0171rmen},\n        title = {PyCUTEst: an open source Python package of optimization test problems},\n        journal = {Journal of Open Source Software}\n    }\n\nContributing\n------------\nWe welcome contributions to PyCUTEst, please see :code:`CONTRIBUTING.md`.\n\nLicense\n-------\nThis package is released under the GNU GPL license.\n\n.. |License| image::  https://img.shields.io/badge/License-GPL%20v3-blue.svg\n             :target: https://www.gnu.org/licenses/gpl-3.0\n             :alt: GNU GPL v3 License\n.. |Build Status| image::  https://img.shields.io/github/actions/workflow/status/jfowkes/pycutest/test.yml?branch=master\n                  :target: https://github.com/jfowkes/pycutest/actions/workflows/test.yml\n                  :alt: Build status\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/pycutest.svg\n                  :target: https://pypi.python.org/pypi/pycutest\n                  :alt: PyPI version\n.. |Downloads| image:: https://static.pepy.tech/personalized-badge/pycutest?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads\n               :target: https://pepy.tech/project/pycutest\n               :alt: Total downloads\n.. |Paper| image:: https://joss.theoj.org/papers/10.21105/joss.04377/status.svg\n           :target: https://doi.org/10.21105/joss.04377\n           :alt: JOSS Paper\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "A Python wrapper to the CUTEst optimization test environment",
    "version": "1.6.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/jfowkes/pycutest/issues/",
        "Documentation": "https://jfowkes.github.io/pycutest/",
        "Download": "https://github.com/jfowkes/pycutest/releases/",
        "Homepage": "https://github.com/jfowkes/pycutest/",
        "Source Code": "https://github.com/jfowkes/pycutest/"
    },
    "split_keywords": [
        "mathematics",
        " optimization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "527ede3d596232c5fab96426f442f2017d0612ac0a5abfff459b81b30a2efcca",
                "md5": "3d471c07ebce6c0883e9467ac6babaed",
                "sha256": "00d8ae812ed12b38527269423e4b576f7391f11c50429172eea36d6a79019a5c"
            },
            "downloads": -1,
            "filename": "pycutest-1.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d471c07ebce6c0883e9467ac6babaed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 47892,
            "upload_time": "2024-04-09T07:31:10",
            "upload_time_iso_8601": "2024-04-09T07:31:10.633414Z",
            "url": "https://files.pythonhosted.org/packages/52/7e/de3d596232c5fab96426f442f2017d0612ac0a5abfff459b81b30a2efcca/pycutest-1.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9bb4de4f147801676240c5240ebaa8c15e7318eeacfe1eee21bc5735867dcbc4",
                "md5": "e52bb590972f4b0dccd9a054ed1b2227",
                "sha256": "e29f9d57f29fb45dca114cca29560f4704dcefe02e6e9f6f401c341637ae0471"
            },
            "downloads": -1,
            "filename": "pycutest-1.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e52bb590972f4b0dccd9a054ed1b2227",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 49031,
            "upload_time": "2024-04-09T07:31:12",
            "upload_time_iso_8601": "2024-04-09T07:31:12.584635Z",
            "url": "https://files.pythonhosted.org/packages/9b/b4/de4f147801676240c5240ebaa8c15e7318eeacfe1eee21bc5735867dcbc4/pycutest-1.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-09 07:31:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jfowkes",
    "github_project": "pycutest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pycutest"
}
        
Elapsed time: 0.22505s