В Mon, 20 Nov 2023 21:34:55 -0500 Andrew Robbins via R-package-devel <r-package-devel@r-project.org> пишет:
> In my (pending) package, I currently have a compile-time check for > POSIX-threaded OpenBLAS which calls openblas_set_num_threads before > and after OpenMP blocks to stop this behavior from occurring. This may be not enough. In distributions like Debian, it's possible (if not common) to install multiple BLAS implementations and switch them between program runs using update-alternatives, so it's possible to compile and link a package using one BLAS then run it using another BLAS. May I suggest using dlsym() to check whether openblas_get_parallel() is present in the current process and perform the check during run-time? (Sorry about not returning to this topic earlier. I do think that a semaphore is the right choice and I do intend to implement this interface using semaphores within a few weeks if not a few days.) -- Best regards, Ivan ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel