Re: DifferentialEvolution: custom mutation and recombination functions?

Ralf Gommers <[email protected]> Mon, 28 Aug 2023 21:38:30 +0200
Newsgroups gmane.comp.python.scientific.devel
Message-ID <CABL7CQgK8vdSg59-fxTiR+6Lww6c9CC=VQy0WFwCkrVO6fhjBQ@mail.gmail.com>
On Mon, Aug 28, 2023 at 1:37 PM Karen Róbertsdóttir <
[email protected]> wrote:

> Just following up on this  :)
>

Hi Karen, I just tried this on latest `main`:

  $ git clean -xdf
  $ python dev.py build -C-Dblas=blas -C-Dlapack=lapack
  $ python dev.py test

That works as advertised for me, and starts running the tests straight
away. I don't quite see why you got the initial error you saw. If the above
still doesn't work for you in a clean repo, can you please open an issue
with the full logs and Cc me (@rgommers)? It's easier to help with build
issues on an issue than on the mailing list.

Cheers,
Ralf



>
> þri., 22. ágú. 2023 kl. 23:27 skrifaði Karen Róbertsdóttir <
> [email protected]>:
>
>>
>>> The scipy webpage has some information on how to build,
>>> https://docs.scipy.org/doc/scipy-1.10.1/dev/dev_quickstart.html.
>>>
>>
>> Yeah, I've been using that, as well as build guides on the site.
>>
>> You shouldn't have to rebuild time after time, you should just be able to
>>> run `python dev.py test`
>>>
>>
>> That gives the error I posted before.
>>
>> In this circumstance I might suggest removing the build and build-install
>>> directories and just running `python dev.py test` multiple times.
>>>
>>
>>  scipy]$ python dev.py test
>> 💻  meson setup /path/to/scipy/build --prefix /path/to/scipy/build-install
>> The Meson build system
>> Version: 1.2.1
>> Source dir: /path/to/scipy
>> Build dir: /path/to/scipy/build
>> Build type: native build
>> Project name: SciPy
>> Project version: 1.12.0.dev0
>> C compiler for the host machine: cc (gcc 11.3.0 "cc (Homebrew GCC 11.3.0)
>> 11.3.0")
>> C linker for the host machine: cc ld.bfd 2.37-38
>> C++ compiler for the host machine: c++ (gcc 11.3.0 "c++ (Homebrew GCC
>> 11.3.0) 11.3.0")
>> C++ linker for the host machine: c++ ld.bfd 2.37-38
>> Cython compiler for the host machine: cython (cython 3.0.0)
>> Host machine cpu family: x86_64
>> Host machine cpu: x86_64
>> Program python3 found: YES (/usr/bin/python)
>> Found pkg-config: /usr/bin/pkg-config (1.8.0)
>> Run-time dependency python found: YES 3.10
>> Program cython found: YES (/usr/local/bin/cython)
>> Compiler for C supports arguments -Wno-unused-but-set-variable: YES
>> Compiler for C supports arguments -Wno-unused-function: YES
>> Compiler for C supports arguments -Wno-conversion: YES
>> Compiler for C supports arguments -Wno-misleading-indentation: YES
>> Library m found: YES
>> Fortran compiler for the host machine: gfortran (gcc 12.2.1 "GNU Fortran
>> (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)")
>> Fortran linker for the host machine: gfortran ld.bfd 2.37-38
>> Compiler for Fortran supports arguments -Wno-conversion: YES
>> Checking if "-Wl,--version-script" : links: YES
>> Program pythran found: YES (/path/to/.local/bin/pythran)
>> Found CMake: /usr/local/bin/cmake (3.24.1)
>> WARNING: CMake Toolchain: Failed to determine CMake compilers state
>> Run-time dependency xsimd found: NO (tried pkgconfig and cmake)
>> Run-time dependency threads found: YES
>> Library npymath found: YES
>> Library npyrandom found: YES
>> pybind11-config found: YES (/path/to/.local/bin/pybind11-config) 2.11.1
>> Run-time dependency pybind11 found: YES 2.11.1
>> Run-time dependency openblas found: NO (tried pkgconfig and cmake)
>> Run-time dependency openblas found: NO (tried pkgconfig and cmake)
>>
>> scipy/meson.build:159:9: ERROR: Dependency "OpenBLAS" not found, tried
>> pkgconfig and cmake
>>
>> A full log can be found at /path/to/scipy/build/meson-logs/meson-log.txt
>> Meson build setup failed!
>>
>> ---
>> Hence I used the -C arguments, as suggested by one of the build guides.
>>
>>
>>> Unless you want to specify specific BLAS libraries you shouldn't have to
>>> use any flags
>>>
>>
>> As you can see, I do.
>>
>>
>>> If you're on Linux, you can just install system BLAS.
>>>
>>
>> scipy]$ rpm -qa | grep -i blas | sort
>> blas-3.10.1-1.fc36.x86_64
>> blas64-3.10.1-1.fc36.x86_64
>> blas64_-3.10.1-1.fc36.x86_64
>> blas-devel-3.10.1-1.fc36.x86_64
>> flexiblas-3.3.0-1.fc36.x86_64
>> flexiblas-netlib-3.3.0-1.fc36.x86_64
>> flexiblas-netlib64-3.3.0-1.fc36.x86_64
>> flexiblas-openblas-openmp-3.3.0-1.fc36.x86_64
>> flexiblas-openblas-openmp64-3.3.0-1.fc36.x86_64
>> libcublas-12-0-12.0.1.189-1.x86_64
>> libcublas-devel-12-0-12.0.1.189-1.x86_64
>> liblas-1.8.1-19.gitd76a061.fc36.x86_64
>> liblas-devel-1.8.1-19.gitd76a061.fc36.x86_64
>> openblas-0.3.19-3.fc36.x86_64
>> openblas-devel-0.3.19-3.fc36.x86_64
>> openblas-openmp-0.3.19-3.fc36.x86_64
>> openblas-openmp64-0.3.19-3.fc36.x86_64
>> openblas-openmp64_-0.3.19-3.fc36.x86_64
>> openblas-serial-0.3.19-3.fc36.x86_64
>> openblas-serial64-0.3.19-3.fc36.x86_64
>> openblas-serial64_-0.3.19-3.fc36.x86_64
>> openblas-srpm-macros-2-11.fc36.noarch
>> openblas-threads-0.3.19-3.fc36.x86_64
>> openblas-threads64-0.3.19-3.fc36.x86_64
>> openblas-threads64_-0.3.19-3.fc36.x86
>>
>>  - kv, Karen
>>
>>
>>
>>>
>>>
>>>
>>>
>>>> scipy]$ python dev.py test -v
>>>> 💻  ninja -C /path/to/scipy/build -j6
>>>> ninja: Entering directory `/path/to/scipy/build'
>>>> [4/4] Generating scipy/generate-version with a custom command
>>>> Build OK
>>>> Task Error - build => PythonAction Error
>>>> ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>>>> build
>>>> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
>>>> │ Traceback (most recent call last):
>>>>
>>>>
>>>>              │
>>>> │   File "/path/to/.local/lib/python3.10/site-packages/doit/action.py",
>>>> line 461, in execute
>>>>
>>>>            │
>>>> │     returned_value = self.py_callable(*self.args, **kwargs)
>>>>
>>>>
>>>>             │
>>>> │   File "/path/to/scipy/dev.py", line 668, in run
>>>>
>>>>
>>>>            │
>>>> │     cls.install_project(dirs, args)
>>>>
>>>>
>>>>             │
>>>> │   File "/path/to/scipy/dev.py", line 533, in install_project
>>>>
>>>>
>>>>            │
>>>> │     raise RuntimeError("Can't install in non-empty directory: "
>>>>
>>>>
>>>>             │
>>>> │ RuntimeError: Can't install in non-empty directory:
>>>> '/path/to/scipy/build-install'
>>>>
>>>>                              │
>>>> │
>>>>
>>>>
>>>>             │
>>>> ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────
>>>> PythonAction Error
>>>> ────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
>>>>
>>>>
>>>> Does it expect me to manually delete the build directory every time, or
>>>> what?  If so, that may raise a problem, because I had to build with "*python
>>>> dev.py build -C-Dblas=blas -C-Dlapack=lapack"*, but it refuses to take
>>>> those -C options with "python dev.py test -v".  Honestly, it's strange that
>>>> "test" would insist on the build directory being nonexistent in the first
>>>> place. Perhaps I'm misunderstanding something.
>>>>
>>>>  - kv, Karen
>>>>
>>>> _______________________________________________
>>>>> SciPy-Dev mailing list -- [email protected]
>>>>> To unsubscribe send an email to [email protected]
>>>>> https://mail.python.org/mailman3/lists/scipy-dev.python.org/
>>>>> Member address: [email protected]
>>>>>
>>>> _______________________________________________
>>>> SciPy-Dev mailing list -- [email protected]
>>>> To unsubscribe send an email to [email protected]
>>>> https://mail.python.org/mailman3/lists/scipy-dev.python.org/
>>>> Member address: [email protected]
>>>>
>>>
>>>
>>> --
>>> _____________________________________
>>> Dr. Andrew Nelson
>>>
>>>
>>> _____________________________________
>>> _______________________________________________
>>> SciPy-Dev mailing list -- [email protected]
>>> To unsubscribe send an email to [email protected]
>>> https://mail.python.org/mailman3/lists/scipy-dev.python.org/
>>> Member address: [email protected]
>>>
>> _______________________________________________
> SciPy-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/scipy-dev.python.org/
> Member address: [email protected]
>

_______________________________________________
SciPy-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: [email protected]