Changeset: be87d12afb98 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=be87d12afb98
Modified Files:
        gdk/gdk_bat.c
        gdk/gdk_tracer.h
        monetdb5/scheduler/run_memo.c
        sql/backends/monet5/vaults/bam/bam_db_interface.h
        sql/backends/monet5/vaults/bam/bam_loader.c
        sql/backends/monet5/vaults/bam/bam_wrapper.c
        sql/backends/monet5/vaults/lidar/lidar.c
Branch: gdk_tracer
Log Message:

Compilation issues


diffs (truncated from 301 to 300 lines):

diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -2114,7 +2114,7 @@ BATmode(BAT *b, bool transient)
 #ifdef NDEBUG
 /* assertions are disabled, turn failing tests into a message */
 #undef assert
-#define assert(test)   ((void) ((test) || WARNING(BAT_, "Assertion `%s' 
failed\n", #test)))
+#define assert(test)   ((void) ((test) || ERROR(BAT_, "Assertion `%s' 
failed\n", #test)))
 #endif
 
 /* Assert that properties are set correctly.
diff --git a/gdk/gdk_tracer.h b/gdk/gdk_tracer.h
--- a/gdk/gdk_tracer.h
+++ b/gdk/gdk_tracer.h
@@ -89,11 +89,11 @@ typedef enum {
         COMP( ACCEL )                 \
         COMP( TRACE )                 \
         COMP( CHECK_ )                \
-        COMP( THRD )               \
+        COMP( THRD )                  \
                                       \
         COMP( GEOM )                  \
         COMP( LIDAR )                 \
-        COMP( BAM )                   \
+        COMP( BAM_ )                  \
         COMP( FITS )                  \
         COMP( SHP )                   \
                                       \
@@ -225,7 +225,10 @@ extern LOG_LEVEL LVL_PER_COMPONENT[COMPO
 #define ERROR(COMP, MSG, ...)                                            \
     GDK_TRACER_LOG(M_ERROR, COMP, MSG, ## __VA_ARGS__)                   \
 
-#define WARNING(COMP, MSG, ...)                                          \
+/* CHECK */
+// This was WARNING but this macro is defined in another file
+// also, included by GDK - Temp fix
+#define MDB_WARNING(COMP, MSG, ...)                                      \
     GDK_TRACER_LOG(M_WARNING, COMP, MSG, ## __VA_ARGS__)                 \
 
 #define INFO(COMP, MSG, ...)                                             \
diff --git a/monetdb5/scheduler/run_memo.c b/monetdb5/scheduler/run_memo.c
--- a/monetdb5/scheduler/run_memo.c
+++ b/monetdb5/scheduler/run_memo.c
@@ -177,7 +177,7 @@ RUNchoice(Client cntxt, MalBlkPtr mb, Ma
                }
        }
 
-       DEBUG(MAL_MEMO, "Function target '%s' cost: %lld\n", getVarName(mb, 
target), mincost);
+       DEBUG(MAL_MEMO, "Function target '%s' cost: %ld\n", getVarName(mb, 
target), mincost);
        (void) cntxt;
 
        /* remove non-qualifying variables */
@@ -189,7 +189,7 @@ RUNchoice(Client cntxt, MalBlkPtr mb, Ma
 
        propagateNonTarget(mb, pc + 1);
 
-       DEBUG(MAL_MEMO, "Cost choice selected: %s %lld\n", getVarName(mb, 
target), mincost);
+       DEBUG(MAL_MEMO, "Cost choice selected: %s %ld\n", getVarName(mb, 
target), mincost);
        debugFunction(MAL_MEMO, mb, stk, 1);
 
 
diff --git a/sql/backends/monet5/vaults/bam/bam_db_interface.h 
b/sql/backends/monet5/vaults/bam/bam_db_interface.h
--- a/sql/backends/monet5/vaults/bam/bam_db_interface.h
+++ b/sql/backends/monet5/vaults/bam/bam_db_interface.h
@@ -38,7 +38,6 @@
 }
 #endif */
 #define RUN_SQL(cntxt, sql, descr, msg) {                           \
-       DEBUG(BAM, "%s\n", sql);                                    \
        msg = SQLstatementIntern(cntxt, sql, descr, TRUE, FALSE, NULL); \
 }
 
diff --git a/sql/backends/monet5/vaults/bam/bam_loader.c 
b/sql/backends/monet5/vaults/bam/bam_loader.c
--- a/sql/backends/monet5/vaults/bam/bam_loader.c
+++ b/sql/backends/monet5/vaults/bam/bam_loader.c
@@ -119,14 +119,14 @@ run_process_bam_alignments(void *d)
        bam_wrapper *bw;
 
        for (;;) {
-               DEBUG(BAM, "<Thread %d> Starting on next file\n", 
data->thread_id);
+               DEBUG(BAM_, "<Thread %d> Starting on next file\n", 
data->thread_id);
                /* First, find out on which bam wrapper we have to work */
                MT_lock_set(data->reader_lock);
                if (*data->cur_file == data->nr_files - 1) {
                        /* The last file is already (being) processed, this
                         * thread is done */
                        MT_lock_unset(data->reader_lock);
-                       DEBUG(BAM, 
+                       DEBUG(BAM_, 
                                "<Thread %d> No files left to work on; thread 
done\n",
                                data->thread_id);
                        return;
@@ -134,13 +134,13 @@ run_process_bam_alignments(void *d)
                (*data->cur_file) += 1;
                bw = &data->bws[*data->cur_file];
                MT_lock_unset(data->reader_lock);
-               DEBUG(BAM, 
+               DEBUG(BAM_, 
                        "<Thread %d> Processing alignments of file '%s' (file 
id " LLFMT ")\n", 
                        data->thread_id, bw->file_location, bw->file_id);
 
                if ((data->msg =
                        process_alignments(bw, data->failure)) != MAL_SUCCEED) {
-                       ERROR(BAM, "<Thread %d> Error while processing 
alignments of file '%s' "
+                       ERROR(BAM_, "<Thread %d> Error while processing 
alignments of file '%s' "
                                                "(file id " LLFMT ") (%s)\n",
                                                data->thread_id, 
bw->file_location, bw->file_id, data->msg);
                        REUSE_EXCEPTION(data->msg, MAL, 
"run_process_bam_alignments",
@@ -152,11 +152,11 @@ run_process_bam_alignments(void *d)
                if (*data->failure) {
                        /* process_bam_alignments returned because another
                         * thread failed and not because this thread failed */
-                       ERROR(BAM, "<Thread %d> Exit due to failure in other 
thread\n", data->thread_id);
+                       ERROR(BAM_, "<Thread %d> Exit due to failure in other 
thread\n", data->thread_id);
                        return;
                }
 
-               DEBUG(BAM, 
+               DEBUG(BAM_, 
                        "<Thread %d> All alignments in file '%s' (file id " 
LLFMT ") processed!\n", 
                        data->thread_id, bw->file_location, bw->file_id);
        }
@@ -190,7 +190,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
        int i, errnr;
        str msg = MAL_SUCCEED;
 
-       DEBUG(BAM, "Loader started for %d BAM file%s\n", nr_files, (nr_files != 
1 ? "s" : ""));
+       DEBUG(BAM_, "Loader started for %d BAM file%s\n", nr_files, (nr_files 
!= 1 ? "s" : ""));
 
        /* Check sanity of input */
        if (dbschema != 0 && dbschema != 1) {
@@ -225,7 +225,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
                goto cleanup;
 
        /* Get next file id from files table */
-       DEBUG(BAM, "Retrieving next file id\n");
+       DEBUG(BAM_, "Retrieving next file id\n");
        if ((msg = next_file_id(m, files_table, &cur_file_id)) != MAL_SUCCEED) {
                goto cleanup;
        }
@@ -243,7 +243,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
 
        for (i = 0; i < nr_files; ++i) {
                int fln = strlen(filenames[i]);
-               DEBUG(BAM, "Initializing BAM wrapper for file '%s'\n", 
filenames[i]);
+               DEBUG(BAM_, "Initializing BAM wrapper for file '%s'\n", 
filenames[i]);
                if ((msg =
                         init_bam_wrapper(bws + i, (IS_BAM(filenames[i], fln) ? 
BAM : SAM),
                                          filenames[i], cur_file_id++, 
dbschema)) != MAL_SUCCEED) {
@@ -253,7 +253,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
 
        /* Parse all headers */
        for (i = 0; i < nr_files; ++i) {
-               DEBUG(BAM, "Parsing header for file '%s'\n",
+               DEBUG(BAM_, "Parsing header for file '%s'\n",
                           filenames[i]);
                if ((msg = process_header(bws + i)) != MAL_SUCCEED) {
                        goto cleanup;
@@ -265,7 +265,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
         * QNAME */
        if (dbschema == 1) {
                for (i = 0; i < nr_files; ++i) {
-                       DEBUG(BAM, "Checking sortedness for BAM file '%s'\n", 
filenames[i]);
+                       DEBUG(BAM_, "Checking sortedness for BAM file '%s'\n", 
filenames[i]);
                        if (bws[i].ord != ORDERING_QUERYNAME) {
                                msg = createException(MAL, "bam_loader",
                                                          SQLSTATE(BA000) "Only 
BAM files that are sorted on queryname can be inserted into the pairwise 
storage schema; "
@@ -280,7 +280,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
 
        /* Create alignment storage */
        for (i = 0; i < nr_files; ++i) {
-               DEBUG(BAM, "Creating alignment tables for file '%s'\n", 
filenames[i]);
+               DEBUG(BAM_, "Creating alignment tables for file '%s'\n", 
filenames[i]);
                if ((dbschema == 0
                         && (msg = create_alignment_storage_0(cntxt,
                                                                  
"bam.create_storage_0",
@@ -295,7 +295,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
 
 
        /* Now create threads to read alignment data of different files */
-       DEBUG(BAM, "Creating reader threads\n");
+       DEBUG(BAM_, "Creating reader threads\n");
        if ((reader_threads =
                 (MT_Id *) GDKmalloc(nr_threads * sizeof(MT_Id))) == NULL) {
                msg = createException(MAL, "bam_loader", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
@@ -322,7 +322,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
                }
        }
 
-       DEBUG(BAM, "Waiting for reader threads to finish\n");
+       DEBUG(BAM_, "Waiting for reader threads to finish\n");
        /* Wait until all threads finish and collect their
         * messages. Though it is not very likely, it could be the
         * case that more than 1 thread generates an error message (not
@@ -368,7 +368,7 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
                goto cleanup;
        }
 
-       DEBUG(BAM, "Copying data into DB\n");
+       DEBUG(BAM_, "Copying data into DB\n");
        /* All threads finished succesfully, copy all data into DB */
        for (i = 0; i < nr_files; ++i) {
                if ((msg = copy_into_db(cntxt, bws + i)) != MAL_SUCCEED) {
@@ -390,10 +390,10 @@ bam_loader(Client cntxt, MalBlkPtr mb, s
                destroy_reader_thread_data(r_thread_data);
 
        if (msg != MAL_SUCCEED) {
-               ERROR(BAM, "Error on processing BAM files: %s\n", msg);
+               ERROR(BAM_, "Error on processing BAM files: %s\n", msg);
        }
 
-       DEBUG(BAM, "Loader finished processing %d BAM file%s\n", nr_files, 
(nr_files != 1 ? "s" : ""));
+       DEBUG(BAM_, "Loader finished processing %d BAM file%s\n", nr_files, 
(nr_files != 1 ? "s" : ""));
        return msg;
 }
 
diff --git a/sql/backends/monet5/vaults/bam/bam_wrapper.c 
b/sql/backends/monet5/vaults/bam/bam_wrapper.c
--- a/sql/backends/monet5/vaults/bam/bam_wrapper.c
+++ b/sql/backends/monet5/vaults/bam/bam_wrapper.c
@@ -1327,11 +1327,11 @@ check_alignment_buffers(bam_wrapper *bw,
        }
 
        if (resized[0])
-               DEBUG(BAM, "Increased size of qname buffer to: %d 
characters\n", alig->qname_size);
+               DEBUG(BAM_, "Increased size of qname buffer to: %d 
characters\n", alig->qname_size);
        if (resized[1])
-               DEBUG(BAM, "Increased size of cigar buffer to: %d 
characters\n", alig->cigar_size);
+               DEBUG(BAM_, "Increased size of cigar buffer to: %d 
characters\n", alig->cigar_size);
        if (resized[2])
-               DEBUG(BAM, "Increased size of seq and qual buffers to: %d 
characters\n", alig->seq_size);
+               DEBUG(BAM_, "Increased size of seq and qual buffers to: %d 
characters\n", alig->seq_size);
 
        return (alig->cigar != NULL && alig->seq != NULL
                && alig->qual != NULL);
@@ -1356,7 +1356,7 @@ check_qname_buffer(alignment * alig, int
                if (tmp == NULL)
                        return 0;
                alig->qname = tmp;
-               DEBUG(BAM, "Increased size of qname buffer to: %d 
characters\n", alig->qname_size);
+               DEBUG(BAM_, "Increased size of qname buffer to: %d 
characters\n", alig->qname_size);
        }
        return alig->qname != NULL;
 }
@@ -1378,7 +1378,7 @@ check_rname_rnext_buffers(alignment * al
                if (tmp == NULL)
                        return 0;
                alig->rnext = tmp;
-               DEBUG(BAM, "Increased size of cigar buffer to: %d 
characters\n", alig->rname_size);
+               DEBUG(BAM_, "Increased size of cigar buffer to: %d 
characters\n", alig->rname_size);
        }
        return alig->rname != NULL && alig->rnext != NULL;
 }
@@ -1396,7 +1396,7 @@ check_cigar_buffer(alignment * alig, int
                if (tmp == NULL)
                        return 0;
                alig->cigar = tmp;
-               DEBUG(BAM, "Increased size of cigar buffer to: %d 
characters\n", alig->cigar_size);
+               DEBUG(BAM_, "Increased size of cigar buffer to: %d 
characters\n", alig->cigar_size);
        }
        return alig->cigar != NULL;
 }
@@ -1417,7 +1417,7 @@ check_seq_qual_buffers(alignment * alig,
                if (tmp == NULL)
                        return 0;
                alig->qual = tmp;
-               DEBUG(BAM, "Increased size of seq and qual buffers to: %d 
characters\n", alig->seq_size);
+               DEBUG(BAM_, "Increased size of seq and qual buffers to: %d 
characters\n", alig->seq_size);
        }
        return alig->seq != NULL && alig->qual != NULL;
 }
@@ -1434,7 +1434,7 @@ check_aux_buffer(alignment * alig, int c
                if (tmp == NULL)
                        return 0;
                alig->aux = tmp;
-               DEBUG(BAM, "Increased size of aux buffer to: %d characters\n", 
alig->aux_size);
+               DEBUG(BAM_, "Increased size of aux buffer to: %d characters\n", 
alig->aux_size);
        }
        return alig->aux != NULL;
 }
@@ -2317,7 +2317,7 @@ process_alignments(bam_wrapper * bw, bit
                                                }
                                        }
                                        nr_aligs = new_nr_aligs;
-                                       DEBUG(BAM, "<bam_loader> Increased size 
of alignment buffer to: %d alignments\n", nr_aligs);
+                                       DEBUG(BAM_, "<bam_loader> Increased 
size of alignment buffer to: %d alignments\n", nr_aligs);
                                }
                        }
                }
diff --git a/sql/backends/monet5/vaults/lidar/lidar.c 
b/sql/backends/monet5/vaults/lidar/lidar.c
--- a/sql/backends/monet5/vaults/lidar/lidar.c
+++ b/sql/backends/monet5/vaults/lidar/lidar.c
@@ -175,7 +175,7 @@ void print_lidar_header(LASHeaderH heade
             DEBUG(LIDAR, "   User          : '%s'\n", pszVLRUser);
                        DEBUG(LIDAR, "   Description   : '%s'\n", 
pszVLRDescription);
                        DEBUG(LIDAR, "   ID            : '%hu'\n", 
nVLRRecordId);
-            DEBUG(LIDAR, "   Length        : %hu\n", , nVLRLength);
+            DEBUG(LIDAR, "   Length        : %hu\n", nVLRLength);
            
             MT_lock_set(&mt_lidar_lock); 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to