once I'm done with current testing I will ship you the changes I made. Thank 
you 
for responding.




________________________________
From: Doug Baskins <[email protected]>
To: "Bisht, Pradeep" <[email protected]>
Cc: [email protected]
Sent: Sat, February 5, 2011 6:46:15 AM
Subject: Re: Judy on 64-bit windows;


Pradeep:

Thank you for your persistence on finding this problem.  I do not have the 
resources
(money to support Microsoft compilers) to get you support in a timely manner.  I
depend on the Open Source Community -- such as yourself.  I retired in 2002.   
However,
I am still very active on improved versions of Judy in my spare time.

I did not sleep very well last night because I was thinking on how to help you 
and prevent
a re-occurrence of this problem in the future.  I am the author of most of 
Judy. 
 As you (painfully)
found out, C does not define the number of bits of its variables and constants 
precisely.
I used my own typedef's in Judy to specify exactly how many bits were in the 
variables, but
the constants (I believe) are still problematic.  When Judy was written, 
Microsoft seemed to
pick a "suspect" solution for 64 bit programs.  Judy used:  uint8_t, uint16_t, 
uint32_t, and uint64_t
to specify the required variables with specific bit lengths.  Later, the Unix 
and Linux community
specified header files that did the same thing (and the same names).   For 
variables where the bit 
sizes did not matter, I let the compilers decide and used "int" hoping the 
compiler would use the 
fastest size for the processor used.

Today, processors are good about not caring about the size of variables 
affecting speed, so
I suppose, we programmers should specify everything to be safer avoiding bugs 
and compile
errors.

If you know of a portable way to specify the bit length of constants, I would 
be 
very appreciated in learning
how.  I was very disappointed with many of the C compilers requiring the use of 
1ULL and such
without a way of specifying the number of bits in the constant or not needing 
to 
-- and they
were DIFFERENT.  I suspect that Microsoft changed their method, because Judy 
use 
to work.
I tried very hard to get Judy to work on all OSes of either 32 or 64 Bit.  I 
still do not know
how to make the Build tools Compile and Install the 32 and 64 sizes on 64 Bit 
machines.
I personally use 64 Bit Linux  to test 32 and 64 Bit versions of Judy.  I wish 
I 
could use
64 Bit Windows too.  I believe 32 bit machines are a thing of the past because 
the price
of memory has dropped to a point that makes 32 bit OS support a nuisance.

Please send me your changes that you made to Judy to compile on 64 bit Windows. 
 I would
also very much appreciate a "tutorial" on how to compile Judy with Microsoft 
compilers that
I could forward to people who are trying the same.  I get a surprising number 
of 
emails
requesting that information and I just have nothing worth while to suggest.

I will take a look at your changes and test them on a 32/64 Bit Linux and a 64 
Bit Mac
machine with my regression tests.  Sorry, I can afford Windows capability.

Thank you for your Interest,

Doug

PS.  I took me a lot of time to get Judy to compile and work on machines 
of Little and Big 
Endianness  without #ifdef's -- something Microsoft does not do for Windows.

Doug Baskins <[email protected]>




________________________________
From: "Bisht, Pradeep" <[email protected]>
To: [email protected]
Sent: Sat, February 5, 2011 1:21:23 AM
Subject: Re: Judy on 64-bit windows;


finally i get to make my program work. there were some more 1L in JudyPrivate.h 
which needed to be changed to 1LL (the proper word size on 64-bit windows). Is 
there any regression suite that I can run make sure I have not broken anything? 
Also I would like to give back to community this code which now works on 
windows 
64-bit - is there way I can do it. Thanks.

 



________________________________
From: "Bisht, Pradeep" <[email protected]>
To: [email protected]
Sent: Fri, February 4, 2011 5:18:37 PM
Subject: Re: Judy on 64-bit windows;


oky so I have the fixed the crash it was due to (I think) use of things like 
<n>UL. It should have been the word size which on 64-bit windows is ULL. Now I 
can run my example but the number of indexes are very less than expected.

I inserted 1000 unique indexes and that's what I see in 32-bit program but in 
64-bit windows I see only 531 indexes.

Can anybody please confirm if win-64 bit is supported? Thanks.



________________________________
From: "Bisht, Pradeep" <[email protected]>
To: [email protected]
Sent: Fri, February 4, 2011 2:01:53 PM
Subject: Re: Judy on 64-bit windows;


I just noticed that Judy sourforge page says "operating systems: All 32-bit MS 
Windows (95/98/NT/2000/XP),". Looks like 64-bit is not supported. Is it 
correct? 
Thanks.




________________________________
From: "Bisht, Pradeep" <[email protected]>
To: [email protected]
Sent: Fri, February 4, 2011 10:09:37 AM
Subject: Judy on 64-bit windows;

Hello, has any one been successful in compiling and using Judy on 64-bit 
windows. First I think there is a bug in Judy.h -

typedef unsigned long    Word_t, * PWord_t;  // expect 32-bit or 64-bit words.

should have been

#ifdef JU_WIN
#ifdef JU_64BIT
typedef uint64_t Word_t, * PWord_t;  // expect 32-bit or 64-bit words.
#else
typedef uint32_t Word_t, * PWord_t;  // expect 32-bit or 64-bit words.
#endif
#else  // JU_WIN
typedef unsigned long    Word_t, * PWord_t;  // expect 32-bit or 64-bit words.
#endif

Am I correct? Before making this change Judy1/LTaleGen.exe was failing in 
generating the tables and printing error ""BUG, in %sPopToWords, sizes not big 
enough for object\n".


Now that I'm able to compile, it is crashing. my sample code is:

void BuildJA ()
{
    Pvoid_t Parray = (Pvoid_t)NULL; // empty JudyL array
    Word_t lba, *Pvalue; // value for one index
    unsigned int i;
    
    for (i = 0; i < 1000; i++) {
        lba = i;
        // it crashes here for i = 1 
       JLI (Pvalue, Parray, lba);
        *Pvalue = 1;
    }
 }
/* the main program
 */
int __cdecl main (int argc, char *argv[])
{
  BuildJA ();
  return (0);
}

crash happens at :
static __inline int j__udySearchLeafW(Pjlw_t Pjlw, Word_t LeafPop1, Word_t 
Index)
{ SEARCHLEAFNATIVE(Word_t, Pjlw, LeafPop1, Index); }

called from JudyLIns ().

Am I doing something wrong here? Kindly note that on 32-bit windows I have done 
extensive testing several hours and several million entries without any problem.

Thanks.


      
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to