Re: Parallel package suggestion

Olaf Till <[email protected]> Wed, 10 Feb 2021 19:53:36 +0100
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <20210210185336.GB24587@till>
On Sat, Feb 06, 2021 at 12:46:40PM -0600, vrozos wrote:
> Regarding Parallel package [1], I have a suggestion.  On my understanding
> (from applications on a single machine), Parallel starts Octave sub-engines.
> When the whole job is finished, the sub-engines do not die. This can create
> problems in cases where a kind of re-initialization is needed.
> 
> Consider this case. I am using Parallel along with the expansion of the
> Genetic Algorithm package for GNU Octave that supports parallelization and
> bounds [2]. After finishing the first optimization, I want to change the
> loss-function. In this case, it seems that the sub-engines are not informed
> about the change. They keep using the version of the loss-function they
> first encountered.
> 
> I would suggest adding a function to Parallel package that would perform
> some kind of re-initialization of the created sub-engines, or at least kill
> them.

But there is such a function:

https://octave.sourceforge.io/parallel/package_doc/parcellfun_005fset_005fnproc.html#XREFparcellfun_005fset_005fnproc

Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEPFKvIAg6x7IzHVgawOS+xer+BZEFAmAkK6sACgkQwOS+xer+
BZHcBRAAh6Snqkv8/rfvuDFqECo0Z70na5kxQ1HrGeaLh+kw4cKTKdpTu2K3F+a0
9alrZXeEXDyxj0k0GaCy205LU+O9DgSwo6qzQzCXccB+X3viNu4u2uMHGt14pM2d
x6yhGoMnCvTAL6mEjEsUUxtre5Co+quiUiKYzZkdHlNv0TpOHLssnzwcca+j7J22
3OXch3ObtjRVpzcDTcBOr/wn5QbttrW3C7z3vWbsDreEN2gg+XZ9XkACJTqP/cZh
BWvSrs4DzY9MHG7bZe5I0j6ynmUsCSeNCjOZ93xDX//cqENEZvLMVOvt+wLFzSKC
sG1cg9zzrIaFRg/WZuUu3LUlOptjQ9uSaSuNET+ODqmOJfwF9QNvO+pvJs+fpSAZ
IwqE3zPAGFtcVerQrBNBL0d/Y3iBIjYHMQXorrHwDk7UQrpRWIpDFy4L1xzZ7WFF
7W6IoVeZ/6R+00zGc4hcQYozBetwOZxEy0vsqDBSJbkwleGS76+XU/HxV6M9Y7Ch
p5kI1KXY4izm5F6KNRy5oZC+gM7VVh0RtP1G3AFrjNZG9D2e+dP5+7JgqPoriPLw
h6Lt8SxUgID2Ji/az3tuoj1r96KhUfDLb5ylf6gSe/dKRrect69Xr8b7mK9CG4WL
P7QJttvr29sNK17HYtoPGmT2vUHWcqNuf+KfKrD+pzqx9ze55+k=
=+W3R
-----END PGP SIGNATURE-----