Peter Langfelder wrote:
Hi all,
I'm hoping someone more knowledgeable in Fortran than I can chime in
with opinion.
I'm the maintainer of the flashClust package that implements fast
hierarchical clustering. The fortran code fails when the number of
clustered objects is larger than about 46300. My guess is that this is
because the code uses the following construct:
2-byte (16 bit) signed integers would have a range from -32768 to
+37267. So, it looks like you may be using 2-byte integers and 46,300
would definitely cause an overflow with 16-bit integers.
I haven't used Fortran for a long time, but there could be a compiler
switch that forces all 2-byte integers, or a specific declaration that
says I, J, N, IOFFSET are only 2-byte (16-bit) integers.
I'm guess, but you might try a specification like
INTEGER*4 I, J, N, IOFFSET
assuming INTEGER*4 is legal with your Fortran compiler:
http://gcc.gnu.org/onlinedocs/gfortran/Old_002dstyle-kind-specifications.html#Old_002dstyle-kind-specifications
efg
Earl F Glynn
Overland Park, KS
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.