You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a piece of software based on CHOLMOD with the Homebrew SuiteSparse package, I realized that the timer function was not enabled (no SuiteSparse_tic). After digging into it a bit, I believe that this is the result of the SUITESPARSE_TIMER_ENABLED macro not being enabled in SuiteSparse_config.h:
This is because brew on Mac uses clang which does not define _POSIX_C_SOURCE. Also, the brew package version does not link to OpenMP. I filed a bug with Homebrew but their understanding is that this is something that should be resolved in the SuiteSparse code, not in Homebrew. I wish I could be more helpful but I do not fully understand how options are selected at compilation time
The text was updated successfully, but these errors were encountered:
I can see what I can do to enable the timer, but disabling OpenMP for SuiteSparse is a mistake. One of my recent packages (GraphBLAS) makes significant use of OpenMP, and disabling will slow GraphBLAS down by 20x or more on some systems. Homebrew should use OpenMP with SuiteSparse. SuiteSparse is using OpenMP for more than the timer.
The other packages (CHOLMOD, UMFPACK, SPQR) use a parallel BLAS, which normally also requires OpenMP.
/* SuiteSparse_tic: return current wall clock time */
.
Getting a timer to work in a portable manner is non-trivial (linux, mac, windows, different compilers, etc), which is why the default is to use the OpenMP timer if available, or the POSIX timer otherwise.
Getting the timer to work well and in a portable manner has been a nightmare so I don't intend to change it. The timer requires either OpenMP or POSIX, or it is disabled. I can't change that.
When running a piece of software based on CHOLMOD with the Homebrew SuiteSparse package, I realized that the timer function was not enabled (no SuiteSparse_tic). After digging into it a bit, I believe that this is the result of the
SUITESPARSE_TIMER_ENABLED
macro not being enabled in SuiteSparse_config.h:This is because
brew
on Mac usesclang
which does not define_POSIX_C_SOURCE
. Also, thebrew
package version does not link to OpenMP. I filed a bug with Homebrew but their understanding is that this is something that should be resolved in the SuiteSparse code, not in Homebrew. I wish I could be more helpful but I do not fully understand how options are selected at compilation timeThe text was updated successfully, but these errors were encountered: