schochastics / graphlayouts

new layout algorithms for network visualizations in R
https://schochastics.github.io/graphlayouts/
Other
274 stars 16 forks source link

ARMA_64BIT_WORD should be used conditionally, apparently #49

Closed barracuda156 closed 10 months ago

barracuda156 commented 1 year ago

Source code forces ARMA_64BIT_WORD=1, a define which seems to be specific to 64-bit platforms. If so, it should be used conditionally.

schochastics commented 1 year ago

I believe this has nothing to do with 32-bit/64-bit platforms. It just allows RcppArmadillo to work with very large matrices. But happy to be corrected here. I just followed stackoverflow

barracuda156 commented 1 year ago

@schochastics I made a conclusion based on the following statement, however it is not decisive:

Use 64 bit integers. Automatically enabled when using a 64-bit platform, except when using Armadillo in the R environment (via RcppArmadillo).

https://arma.sourceforge.net/docs.html I guess I should just try running examples with 64bit_word defined and see if it works on 32-bit arch or breaks down.

schochastics commented 1 year ago

Please do and let me know if something breaks. If so, I will add a fix

barracuda156 commented 1 year ago

Please do and let me know if something breaks. If so, I will add a fix

@schochastics I think you are right: compilation works on 32-bit with ARMA_64BIT_WORD being left in place, and tests pass. (Though tests pass without it too.)

Is there a specific test to run with your package which would use very large matrices?

schochastics commented 1 year ago

The only case where this becomes necessary is for very large graphs when using layout_with_sparse_stress() . You can try graphs from here: https://sparse.tamu.edu/