GithubHelp home page GithubHelp logo

Comments (3)

antonmks avatar antonmks commented on July 28, 2024

Check if you have any records in customer file, looks like it is reading 0 records.

from alenka.

wanahmadzainie avatar wanahmadzainie commented on July 28, 2024

Hi.

I had created a patch file which solve my problem here. Hope you will find it useful. I had tested it against the same machine.

Thank you.

diff -Naur Alenka-master.orig/bison.cu Alenka-master/bison.cu
--- Alenka-master.orig/bison.cu 2013-07-04 19:58:26.000000000 +0800
+++ Alenka-master/bison.cu  2013-07-18 11:49:05.330949304 +0800
@@ -3168,11 +3168,13 @@
                    op_join.pop();
                }
                else {
-                   if(!op_join.empty())
-                       j = op_join.front();    
+                   if(!op_join.empty()) {
+                       j = op_join.front();
+                       op_join.pop();
+                   }
                    else
                        j = j1;           
-                   op_join.pop();
+                   //op_join.pop();
                    j2 = s + to_string1((long long int)i-1);
                };
                emit_multijoin(tab_name, j, j2, i, s);
@@ -3198,7 +3200,7 @@
         varNames.erase(j1);
     };

-    if(stat[op_join.front()] == statement_count && op_join.front().compare(j1) != 0) {
+    if(!op_join.empty() && stat[op_join.front()] == statement_count && op_join.front().compare(j1) != 0) {
         varNames[op_join.front()]->free();
         varNames.erase(op_join.front());
     };
diff -Naur Alenka-master.orig/cm.cu Alenka-master/cm.cu
--- Alenka-master.orig/cm.cu    2013-07-04 19:58:26.000000000 +0800
+++ Alenka-master/cm.cu 2013-07-18 11:47:50.146947587 +0800
@@ -20,7 +20,7 @@
 #include "atof.h"
 #include "compress.cu"
 #include "sorts.cu"
-
+#include <algorithm>


 #ifdef _WIN64
@@ -738,6 +738,7 @@
     }
     else {
         decompress_char(f, colIndex, segNum);
+   return 0;
     };

     fclose(f);
@@ -2182,7 +2183,7 @@
         else if ((typeRef.front()).compare("float") == 0) {
             type[i] = 1;
             decimal[i] = 0;
-            h_columns_float.push_back(thrust::host_vector<float_type, pinned_allocator<float_type>>());
+            h_columns_float.push_back(thrust::host_vector<float_type, pinned_allocator<float_type> >());
             d_columns_float.push_back(thrust::device_vector<float_type>());
             type_index[i] = h_columns_float.size()-1;
         }
@@ -2272,7 +2273,7 @@
         }
         else if ((a->type)[index] == 1) {
             d_columns_float.push_back(thrust::device_vector<float_type>());
-            h_columns_float.push_back(thrust::host_vector<float_type, pinned_allocator<float_type>>());
+            h_columns_float.push_back(thrust::host_vector<float_type, pinned_allocator<float_type> >());
             type[i] = 1;
             type_index[i] = h_columns_float.size()-1;
         }
diff -Naur Alenka-master.orig/Makefile Alenka-master/Makefile
--- Alenka-master.orig/Makefile 2013-07-04 19:58:26.000000000 +0800
+++ Alenka-master/Makefile  2013-07-18 11:47:50.146947587 +0800
@@ -1,16 +1,16 @@
 alenka : bison.o merge.o \
          MurmurHash2_64.o filter.o \
-        strings_filter.o strings_join.o strings_sort_host.o strings_sort_device.o \
-        select.o zone_map.o itoa.o \
-        atof.o cm.o mgpucontext.o format.o
-   /usr/local/cuda/bin/nvcc -O3 -arch=sm_20 -lcuda -lcudpp64 -lcudpp_hash64 -o alenka bison.o merge.o \
-         MurmurHash2_64.o filter.o \
-        strings_filter.o strings_join.o strings_sort_host.o strings_sort_device.o \
-        select.o zone_map.o itoa.o \
-        atof.o cm.o mgpucontext.o format.o
+    strings_filter.o strings_join.o strings_sort_host.o strings_sort_device.o \
+    select.o zone_map.o itoa.o \
+    atof.o cm.o mgpucontext.o format.o
+   /usr/local/cuda/bin/nvcc -O3 -arch=sm_20 -lcuda -Lcudpp_src_2.0/lib -lcudpp64 -lcudpp_hash64 -o alenka bison.o merge.o \
+   MurmurHash2_64.o filter.o \
+   strings_filter.o strings_join.o strings_sort_host.o strings_sort_device.o \
+   select.o zone_map.o itoa.o \
+   atof.o cm.o mgpucontext.o format.o


-nvcc = /usr/local/cuda/bin/nvcc --machine 64 -O3 -arch=sm_20 -c
+nvcc = /usr/local/cuda/bin/nvcc --machine 64 -O3 -arch=sm_20 -c -Iinclude

 bison.o : bison.cu cm.h sorts.cu
    $(nvcc) bison.cu
@@ -38,13 +38,14 @@
    $(nvcc) atof.cu 
 cm.o : cm.cu cm.h  
    $(nvcc) cm.cu
-mgpucontext.obj : moderngpu-master/src/mgpucontext.cpp     
-   $(nvcc) moderngpu-master/src/mgpucontext.cpp
-format.obj : moderngpu-master/src/format.cpp   
-   $(nvcc) moderngpu-master/src/format.cpp 
+mgpucontext.o : moderngpu-master/src/mgpucontext.cpp   
+   $(nvcc) -Imoderngpu-master/include moderngpu-master/src/mgpucontext.cpp
+format.o : moderngpu-master/src/format.cpp     
+   $(nvcc) -Imoderngpu-master/include moderngpu-master/src/format.cpp  

-clean : del bison.o merge.o \
-         MurmurHash2_64.o filter.o \
-        strings_filter.o strings_join.o strings_sort_host.o strings_sort_device.o \
-        select.o zone_map.o itoa.o \
-        atof.o cm.o mgpucontext.o format.o
\ No newline at end of file
+clean : 
+   rm -rf alenka bison.o merge.o \
+   MurmurHash2_64.o filter.o \
+   strings_filter.o strings_join.o strings_sort_host.o strings_sort_device.o \
+   select.o zone_map.o itoa.o \
+   atof.o cm.o mgpucontext.o format.o
diff -Naur Alenka-master.orig/merge.cu Alenka-master/merge.cu
--- Alenka-master.orig/merge.cu 2013-07-04 19:58:26.000000000 +0800
+++ Alenka-master/merge.cu  2013-07-18 11:47:50.146947587 +0800
@@ -57,13 +57,13 @@

        switch(*len & 7)
        {
-           case 7: h ^= unsigned long long(data2[6]) << 48;
-           case 6: h ^= unsigned long long(data2[5]) << 40;
-           case 5: h ^= unsigned long long(data2[4]) << 32;
-           case 4: h ^= unsigned long long(data2[3]) << 24;
-           case 3: h ^= unsigned long long(data2[2]) << 16;
-           case 2: h ^= unsigned long long(data2[1]) << 8;
-           case 1: h ^= unsigned long long(data2[0]);
+           case 7: h ^= (unsigned long long)(data2[6]) << 48;
+           case 6: h ^= (unsigned long long)(data2[5]) << 40;
+           case 5: h ^= (unsigned long long)(data2[4]) << 32;
+           case 4: h ^= (unsigned long long)(data2[3]) << 24;
+           case 3: h ^= (unsigned long long)(data2[2]) << 16;
+           case 2: h ^= (unsigned long long)(data2[1]) << 8;
+           case 1: h ^= (unsigned long long)(data2[0]);
            h *= m;
        };

@@ -116,13 +116,13 @@

        switch(*len & 7)
        {
-           case 7: h ^= unsigned long long(data2[6]) << 48;
-           case 6: h ^= unsigned long long(data2[5]) << 40;
-           case 5: h ^= unsigned long long(data2[4]) << 32;
-           case 4: h ^= unsigned long long(data2[3]) << 24;
-           case 3: h ^= unsigned long long(data2[2]) << 16;
-           case 2: h ^= unsigned long long(data2[1]) << 8;
-           case 1: h ^= unsigned long long(data2[0]);
+           case 7: h ^= (unsigned long long)(data2[6]) << 48;
+           case 6: h ^= (unsigned long long)(data2[5]) << 40;
+           case 5: h ^= (unsigned long long)(data2[4]) << 32;
+           case 4: h ^= (unsigned long long)(data2[3]) << 24;
+           case 3: h ^= (unsigned long long)(data2[2]) << 16;
+           case 2: h ^= (unsigned long long)(data2[1]) << 8;
+           case 1: h ^= (unsigned long long)(data2[0]);
            h *= m;
        };

diff -Naur Alenka-master.orig/strings_sort_device.cu Alenka-master/strings_sort_device.cu
--- Alenka-master.orig/strings_sort_device.cu   2013-07-04 19:58:26.000000000 +0800
+++ Alenka-master/strings_sort_device.cu    2013-07-18 11:47:50.146947587 +0800
@@ -88,7 +88,7 @@
 template<>
 struct T_str_sort<8> {
    inline void operator()(char* tmp, const size_t RecCount, thrust::device_ptr<unsigned int> &dev_per, const bool desc_order) {
-       static_assert(sizeof(unsigned long long) == 8, "The size of unsigned long long is not equal to 8 bytes. Comment out this functor!");
+       //static_assert(sizeof(unsigned long long) == 8, "The size of unsigned long long is not equal to 8 bytes. Comment out this functor!");
        optimized_str_sort<unsigned long long>(tmp, RecCount, dev_per, desc_order, T_swap_le_be_64());
    }
 };
@@ -97,7 +97,7 @@
 template<>
 struct T_str_sort<4> {
    inline void operator()(char* tmp, const size_t RecCount, thrust::device_ptr<unsigned int> &dev_per, const bool desc_order) {
-       static_assert(sizeof(unsigned int) == 4, "The size of unsigned int is not equal to 4 bytes. Comment out this functor!");
+       //static_assert(sizeof(unsigned int) == 4, "The size of unsigned int is not equal to 4 bytes. Comment out this functor!");
        optimized_str_sort<unsigned int>(tmp, RecCount, dev_per, desc_order, T_swap_le_be_32());
    }
 };
@@ -106,7 +106,7 @@
 template<>
 struct T_str_sort<2> {
    inline void operator()(char* tmp, const size_t RecCount, thrust::device_ptr<unsigned int> &dev_per, const bool desc_order) {
-       static_assert(sizeof(unsigned short int) == 2, "The size of unsigned short int is not equal to 2 bytes. Comment out this functor!");
+       //static_assert(sizeof(unsigned short int) == 2, "The size of unsigned short int is not equal to 2 bytes. Comment out this functor!");
        optimized_str_sort<unsigned short int>(tmp, RecCount, dev_per, desc_order, T_swap_le_be_16());
    }
 };
@@ -115,7 +115,7 @@
 template<>
 struct T_str_sort<1> {
    inline void operator()(char* tmp, const size_t RecCount, thrust::device_ptr<unsigned int> &dev_per, const bool desc_order) {
-       static_assert(sizeof(unsigned char) == 1, "The size of unsigned char is not equal to 1 bytes. Comment out this functor!");
+       //static_assert(sizeof(unsigned char) == 1, "The size of unsigned char is not equal to 1 bytes. Comment out this functor!");
        optimized_str_sort<unsigned char>(tmp, RecCount, dev_per, desc_order, T_swap_le_be_8());
    }
 };
diff -Naur Alenka-master.orig/strings_type.h Alenka-master/strings_type.h
--- Alenka-master.orig/strings_type.h   2013-07-04 19:58:26.000000000 +0800
+++ Alenka-master/strings_type.h    2013-07-18 11:47:50.150947588 +0800
@@ -49,7 +49,7 @@
    unsigned char comparison(const Str& other) const {
            if(size % 4 == 0) {
            /// Speedup in 3 - 3.5 times (compare aligned data by 4 bytes)
-           static_assert(sizeof(unsigned int) == 4, "You can't use this optimized class, because it can't compare data by 4 bytes!");
+           //static_assert(sizeof(unsigned int) == 4, "You can't use this optimized class, because it can't compare data by 4 bytes!");
            unsigned int const* data4_first = reinterpret_cast<unsigned int const*>(data);
            unsigned int const* data4_second = reinterpret_cast<unsigned int const *>(other.data);
            /// Unrolls loops is especially important for CUDA-pipelines
@@ -206,4 +206,4 @@
 // -----------------------------------------------------------------------

 //---------------------------------------------------------------------------
-#endif /// STRINGS_TYPE_H
\ No newline at end of file
+#endif /// STRINGS_TYPE_H

from alenka.

antonmks avatar antonmks commented on July 28, 2024

Thank you !
A few issues already been fixed, the others I have merged with the current source.

from alenka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.