Package: pycutest
PyCUTEst is a Python interface toCUTEst, a Fortran package for testing optimization software. It is based on theinterface originally developed for CUTErbyProf. Arpad Buermen.Full details on how to use PyCUTEst are available in thedocumentation, and a brief summary of the package’s goals is available in thePyCUTEst journal article.RequirementsPyCUTEst 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 theWindows Subsystem for Linux, following the Linux installation instructions.Installing CUTEst on LinuxThese 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:$mkdircutest$cdcutest$gitclonehttps://github.com/ralna/ARCHDefs./archdefs$gitclonehttps://github.com/ralna/SIFDecode./sifdecode$gitclonehttps://github.com/ralna/CUTEst./cutest$gitclonehttps://bitbucket.org/optrove/sif./mastsifNote thatmastsifcontains all the test problem definitions and
is therefore quite large. If you’re short on space you may want to copy
only the*.SIFfiles for the problems you wish to test on.Next set the following environment variables in your~/.bashrcto point to the installation directories used above:# CUTEstexportARCHDEFS=/path/to/cutest/archdefs/exportSIFDECODE=/path/to/cutest/sifdecode/exportMASTSIF=/path/to/cutest/mastsif/exportCUTEST=/path/to/cutest/cutest/exportMYARCH="pc64.lnx.gfo"Now we are ready to install CUTEst in double precision (requiresgfortranandgcc):$source~/.bashrc# load above environment variables$/bin/bash-c"$(curl-fsSLhttps://raw.githubusercontent.com/jfowkes/pycutest/master/.install_cutest.sh)"And CUTEst should run from here. To test that the installation works, issue the commands:$cd$SIFDECODE/src;make-f$SIFDECODE/makefiles/$MYARCHtest$cd$CUTEST/src;make-f$CUTEST/makefiles/$MYARCHtestPlease Note:currently PyCUTEst only supports gfortran and uses the default version on your path (as returned bygfortran -v). Please ensure this is the same version that you install CUTEst with above otherwise you may experience segmentation faults.Installing CUTEst on MacInstall 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 followingthis guide. Now install the Homebrew package manager:$/bin/bash-c"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Then you can easily install CUTEst:$brewtapoptimizers/cutest$brewinstallcutest--without-single--with-matlab# if using Matlab interface$brewinstallmastsif# if you want all the test problems$forfin"archdefs""mastsif""sifdecode""cutest";do\$echo".$(brew--prefix$f)/$f.bashrc">>~/.bashrc;\$doneAnaconda Users:please ensure that~/.bashrcis sourced in your conda environment (you can do this with the commandsource ~/.bashrc) otherwise you may encounter errors using PyCUTEst.Please Note:you may see warnings such asld: 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 variableMACOSX_DEPLOYMENT_TARGETto your current macOS version (e.g.export MACOSX_DEPLOYMENT_TARGET=11.5in this example, you can make this permanent by adding it to your~/.bashrcfile).Installing PyCUTEstFor easy installation, usepip:$pipinstallpycutestNote that if an older install of PyCUTEst is present on your system you can use:$pipinstall--upgradepycutestto upgrade PyCUTEst to the latest version.You will then need to create a folder which will store all your compiled problems:$mkdirpycutest_cacheAnd set an environment variable to tell PyCUTEst about this directory, by adding to your~/.bashrcfile:exportPYCUTEST_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:$pipuninstallpycutestSupportPlease ask any questions or report problems using GitHub’s issue tracker.BugsPlease report any bugs using GitHub’s issue tracker.CitingTo 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.04377In BibTeX, the citation is:@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}
}ContributingWe welcome contributions to PyCUTEst, please seeCONTRIBUTING.md.LicenseThis package is released under the GNU GPL license.