[med-svn] [Git][med-team/pplacer][master] 3 commits: Increasing tolerance for file sizes in autopkgtest

Pierre Gruet (@pgt) gitlab at salsa.debian.org
Sun Feb 23 07:57:37 GMT 2025



Pierre Gruet pushed to branch master at Debian Med / pplacer


Commits:
f51a56fa by Pierre Gruet at 2025-02-22T10:00:58+01:00
Increasing tolerance for file sizes in autopkgtest

- - - - -
0e4c4ca7 by Pierre Gruet at 2025-02-22T10:01:29+01:00
Raising Standards version to 4.7.1 (no change)

- - - - -
219a43e4 by Pierre Gruet at 2025-02-23T08:57:20+01:00
Fixing other Caml Bigarray syntax issues

- - - - -


3 changed files:

- debian/control
- debian/patches/caml_bigarray.patch
- debian/tests/run-unit-test


Changes:

=====================================
debian/control
=====================================
@@ -16,7 +16,7 @@ Build-Depends: debhelper-compat (= 13),
                libsqlite3-ocaml-dev,
                libzip-ocaml-dev,
                libounit-ocaml-dev
-Standards-Version: 4.7.0
+Standards-Version: 4.7.1
 Vcs-Browser: https://salsa.debian.org/med-team/pplacer
 Vcs-Git: https://salsa.debian.org/med-team/pplacer.git
 Homepage: https://github.com/matsen/pplacer


=====================================
debian/patches/caml_bigarray.patch
=====================================
@@ -5,7 +5,7 @@ Last-Update: 2024-12-13
 
 --- a/cdd_src/caml_cdd.c
 +++ b/cdd_src/caml_cdd.c
-@@ -25,17 +25,18 @@ double *extreme_vertices(const double *,
+@@ -25,17 +25,18 @@
  CAMLprim value caml_extreme_vertices(value vertices, value lower_bound, value upper_bound)
  {
    CAMLparam3(vertices, lower_bound, upper_bound);
@@ -31,7 +31,7 @@ Last-Update: 2024-12-13
    }
 --- a/pam_src/caml_pam.c
 +++ b/pam_src/caml_pam.c
-@@ -16,7 +16,7 @@ CAMLprim value caml_pam(value k_value, v
+@@ -16,7 +16,7 @@
  {
    CAMLparam3(k_value, keep_value, dist_value);
    char *keep = String_val(keep_value);
@@ -40,7 +40,7 @@ Last-Update: 2024-12-13
    gsl_matrix_view m;
    gsl_vector_char_view v;
    double work;
-@@ -26,15 +26,16 @@ CAMLprim value caml_pam(value k_value, v
+@@ -26,15 +26,16 @@
    intnat *res_ptr;
    int i, k;
  
@@ -100,7 +100,7 @@ Last-Update: 2024-12-13
    if(n_states == 4) {
      for(site=0; site < n_sites; site++) {
        // start back at the top of the matrix
-@@ -92,10 +100,10 @@ CAMLprim value gemmish_c(value dst_value
+@@ -92,12 +100,13 @@
  CAMLprim value dediagonalize (value dst_value, value u_value, value lambda_value, value uit_value)
  {
    CAMLparam4(dst_value, u_value, lambda_value, uit_value);
@@ -113,18 +113,27 @@ Last-Update: 2024-12-13
 +  double *lambda = Caml_ba_array_val(lambda_value);
 +  double *uit = Caml_ba_array_val(uit_value);
    double *uit_p;
-   int n = Bigarray_val(lambda_value)->dim[0];
+-  int n = Bigarray_val(lambda_value)->dim[0];
++  struct caml_ba_array *ba = Caml_ba_array_val(lambda_value);
++  int n = ba->dim[0];
    int i, j, k;
-@@ -152,7 +160,7 @@ CAMLprim value dediagonalize (value dst_
+   /* dst.{i,j} <- dst.{i,j} +. (lambda.{k} *. u.{i,k} *. uit.{j,k}) */
+   if(n == 4) {
+@@ -152,9 +161,10 @@
  CAMLprim value mat_print_c(value x_value)
  {
    CAMLparam1(x_value);
 -  double *x = Data_bigarray_val(x_value);
+-  int n_sites = (Bigarray_val(x_value)->dim[0]);
+-  int n_states = (Bigarray_val(x_value)->dim[1]);
 +  double *x = Caml_ba_array_val(x_value);
-   int n_sites = (Bigarray_val(x_value)->dim[0]);
-   int n_states = (Bigarray_val(x_value)->dim[1]);
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  int n_sites = ba->dim[0];
++  int n_states = ba->dim[1];
    double *loc = x;
-@@ -171,10 +179,10 @@ CAMLprim value mat_log_like3_c(value sta
+   int site, state;
+   for(site=0; site < n_sites; site++) {
+@@ -171,12 +181,13 @@
  {
    CAMLparam4(statd_value, x_value, y_value, z_value);
    CAMLlocal1(ml_ll_tot);
@@ -132,27 +141,35 @@ Last-Update: 2024-12-13
 -  double *x = Data_bigarray_val(x_value);
 -  double *y = Data_bigarray_val(y_value);
 -  double *z = Data_bigarray_val(z_value);
+-  int n_sites = Bigarray_val(x_value)->dim[0];
+-  int n_states = Bigarray_val(x_value)->dim[1];
 +  double *statd = Caml_ba_array_val(statd_value);
 +  double *x = Caml_ba_array_val(x_value);
 +  double *y = Caml_ba_array_val(y_value);
 +  double *z = Caml_ba_array_val(z_value);
-   int n_sites = Bigarray_val(x_value)->dim[0];
-   int n_states = Bigarray_val(x_value)->dim[1];
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  int n_sites = ba->dim[0];
++  int n_states = ba->dim[1];
    int site, state;
-@@ -218,9 +226,9 @@ CAMLprim value mat_log_like3_c(value sta
+   double util, ll_tot=0;
+   // here we hard code in the limits for some popular choices
+@@ -218,10 +229,11 @@
  CAMLprim value mat_pairwise_prod_c(value dst_value, value x_value, value y_value)
  {
    CAMLparam3(dst_value, x_value, y_value);
 -  double *dst = Data_bigarray_val(dst_value);
 -  double *x = Data_bigarray_val(x_value);
 -  double *y = Data_bigarray_val(y_value);
+-  int size = (Bigarray_val(x_value)->dim[0]) * (Bigarray_val(x_value)->dim[1]);
 +  double *dst = Caml_ba_array_val(dst_value);
 +  double *x = Caml_ba_array_val(x_value);
 +  double *y = Caml_ba_array_val(y_value);
-   int size = (Bigarray_val(x_value)->dim[0]) * (Bigarray_val(x_value)->dim[1]);
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  int size = (ba->dim[0]) * (ba->dim[1]);
    int i;
    for(i=0; i < size; i++) {
-@@ -232,10 +240,10 @@ CAMLprim value mat_pairwise_prod_c(value
+     dst[i] = x[i] * y[i];
+@@ -232,12 +244,13 @@
  CAMLprim value mat_statd_pairwise_prod_c(value statd_value, value dst_value, value a_value, value b_value)
  {
    CAMLparam4(statd_value, dst_value, a_value, b_value);
@@ -160,27 +177,40 @@ Last-Update: 2024-12-13
 -  double *dst = Data_bigarray_val(dst_value);
 -  double *a = Data_bigarray_val(a_value);
 -  double *b = Data_bigarray_val(b_value);
+-  int n_sites = Bigarray_val(a_value)->dim[0];
+-  int n_states = Bigarray_val(a_value)->dim[1];
 +  double *statd = Caml_ba_array_val(statd_value);
 +  double *dst = Caml_ba_array_val(dst_value);
 +  double *a = Caml_ba_array_val(a_value);
 +  double *b = Caml_ba_array_val(b_value);
-   int n_sites = Bigarray_val(a_value)->dim[0];
-   int n_states = Bigarray_val(a_value)->dim[1];
++  struct caml_ba_array *ba = Caml_ba_array_val(a_value);
++  int n_sites = ba->dim[0];
++  int n_states = ba->dim[1];
    int site, state;
-@@ -252,9 +260,9 @@ CAMLprim value mat_masked_logdot_c(value
+   for(site=0; site < n_sites; site++) {
+     for(state=0; state < n_states; state++) {
+@@ -252,12 +265,14 @@
  {
    CAMLparam3(x_value, y_value, mask_value);
    CAMLlocal1(ml_ll_tot);
 -  double *x = Data_bigarray_val(x_value);
 -  double *y = Data_bigarray_val(y_value);
 -  uint16_t *mask = Data_bigarray_val(mask_value);
+-  int n_sites = (Bigarray_val(x_value)->dim[0]);
+-  int n_states = (Bigarray_val(x_value)->dim[1]);
+-  if(n_sites != Bigarray_val(mask_value)->dim[0])
 +  double *x = Caml_ba_array_val(x_value);
 +  double *y = Caml_ba_array_val(y_value);
 +  uint16_t *mask = Caml_ba_array_val(mask_value);
-   int n_sites = (Bigarray_val(x_value)->dim[0]);
-   int n_states = (Bigarray_val(x_value)->dim[1]);
-   if(n_sites != Bigarray_val(mask_value)->dim[0])
-@@ -299,8 +307,8 @@ CAMLprim value mat_bounded_logdot_c(valu
++  struct caml_ba_array *bax = Caml_ba_array_val(x_value);
++  struct caml_ba_array *bam = Caml_ba_array_val(mask_value);
++  int n_sites = bax->dim[0];
++  int n_states = bax->dim[1];
++  if(n_sites != bam->dim[0])
+     { printf("mat_masked_logdot_c: Mask length doesn't match!"); };
+   int site, state;
+   double util, ll_tot=0;
+@@ -299,12 +314,13 @@
  {
    CAMLparam4(x_value, y_value, first_value, last_value);
    CAMLlocal1(ml_ll_tot);
@@ -191,16 +221,29 @@ Last-Update: 2024-12-13
    int first = Int_val(first_value);
    int last = Int_val(last_value);
    int n_used = 1 + last - first;
-@@ -345,7 +353,7 @@ CAMLprim value mat_bounded_logdot_c(valu
+-  int n_states = Bigarray_val(x_value)->dim[1];
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  int n_states = ba->dim[1];
+   int site, state;
+   double util, ll_tot=0;
+   // start at the beginning
+@@ -345,10 +361,11 @@
  CAMLprim value ten_print_c(value x_value)
  {
    CAMLparam1(x_value);
 -  double *x = Data_bigarray_val(x_value);
+-  int n_rates = (Bigarray_val(x_value)->dim[0]);
+-  int n_sites = (Bigarray_val(x_value)->dim[1]);
+-  int n_states = (Bigarray_val(x_value)->dim[2]);
 +  double *x = Caml_ba_array_val(x_value);
-   int n_rates = (Bigarray_val(x_value)->dim[0]);
-   int n_sites = (Bigarray_val(x_value)->dim[1]);
-   int n_states = (Bigarray_val(x_value)->dim[2]);
-@@ -368,11 +376,11 @@ CAMLprim value ten_log_like3_c(value sta
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  int n_rates = ba->dim[0];
++  int n_sites = ba->dim[1];
++  int n_states = ba->dim[2];
+   double *loc = x;
+   int rate, site, state;
+   for(rate=0; rate < n_rates; rate++) {
+@@ -368,14 +385,15 @@
  {
    CAMLparam5(statd_value, x_value, y_value, z_value, util_value);
    CAMLlocal1(ml_ll_tot);
@@ -209,15 +252,22 @@ Last-Update: 2024-12-13
 -  double *y = Data_bigarray_val(y_value);
 -  double *z = Data_bigarray_val(z_value);
 -  double *util = Data_bigarray_val(util_value);
+-  int n_rates = Bigarray_val(x_value)->dim[0];
+-  int n_sites = Bigarray_val(x_value)->dim[1];
+-  int n_states = Bigarray_val(x_value)->dim[2];
 +  double *statd = Caml_ba_array_val(statd_value);
 +  double *x = Caml_ba_array_val(x_value);
 +  double *y = Caml_ba_array_val(y_value);
 +  double *z = Caml_ba_array_val(z_value);
 +  double *util = Caml_ba_array_val(util_value);
-   int n_rates = Bigarray_val(x_value)->dim[0];
-   int n_sites = Bigarray_val(x_value)->dim[1];
-   int n_states = Bigarray_val(x_value)->dim[2];
-@@ -426,9 +434,9 @@ CAMLprim value ten_log_like3_c(value sta
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  int n_rates = ba->dim[0];
++  int n_sites = ba->dim[1];
++  int n_states = ba->dim[2];
+   int rate, site, state;
+   double *util_v;
+   for(site=0; site < n_sites; site++) { util[site] = 0.0; }
+@@ -426,13 +444,14 @@
  CAMLprim value ten_pairwise_prod_c(value dst_value, value x_value, value y_value)
  {
    CAMLparam3(dst_value, x_value, y_value);
@@ -227,10 +277,18 @@ Last-Update: 2024-12-13
 +  double *dst = Caml_ba_array_val(dst_value);
 +  double *x = Caml_ba_array_val(x_value);
 +  double *y = Caml_ba_array_val(y_value);
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
    int size =
-     (Bigarray_val(x_value)->dim[0])
-     * (Bigarray_val(x_value)->dim[1])
-@@ -443,10 +451,10 @@ CAMLprim value ten_pairwise_prod_c(value
+-    (Bigarray_val(x_value)->dim[0])
+-    * (Bigarray_val(x_value)->dim[1])
+-    * (Bigarray_val(x_value)->dim[2]);
++    ba->dim[0]
++    * ba->dim[1]
++    * ba->dim[2];
+   int i;
+   for(i=0; i < size; i++) {
+     dst[i] = x[i] * y[i];
+@@ -443,13 +462,14 @@
  CAMLprim value ten_statd_pairwise_prod_c(value statd_value, value dst_value, value a_value, value b_value)
  {
    CAMLparam4(statd_value, dst_value, a_value, b_value);
@@ -238,14 +296,21 @@ Last-Update: 2024-12-13
 -  double *dst = Data_bigarray_val(dst_value);
 -  double *a = Data_bigarray_val(a_value);
 -  double *b = Data_bigarray_val(b_value);
+-  int n_rates = Bigarray_val(a_value)->dim[0];
+-  int n_sites = Bigarray_val(a_value)->dim[1];
+-  int n_states = Bigarray_val(a_value)->dim[2];
 +  double *statd = Caml_ba_array_val(statd_value);
 +  double *dst = Caml_ba_array_val(dst_value);
 +  double *a = Caml_ba_array_val(a_value);
 +  double *b = Caml_ba_array_val(b_value);
-   int n_rates = Bigarray_val(a_value)->dim[0];
-   int n_sites = Bigarray_val(a_value)->dim[1];
-   int n_states = Bigarray_val(a_value)->dim[2];
-@@ -466,10 +474,10 @@ CAMLprim value ten_masked_logdot_c(value
++  struct caml_ba_array *ba = Caml_ba_array_val(a_value);
++  int n_rates = ba->dim[0];
++  int n_sites = ba->dim[1];
++  int n_states = ba->dim[2];
+   int rate, site, state;
+   for(rate=0; rate < n_rates; rate++) {
+     for(site=0; site < n_sites; site++) {
+@@ -466,16 +486,19 @@
  {
    CAMLparam4(x_value, y_value, mask_value, util_value);
    CAMLlocal1(ml_ll_tot);
@@ -253,14 +318,28 @@ Last-Update: 2024-12-13
 -  double *y = Data_bigarray_val(y_value);
 -  uint16_t *mask = Data_bigarray_val(mask_value);
 -  double *util = Data_bigarray_val(util_value);
+-  int n_rates = Bigarray_val(x_value)->dim[0];
+-  int n_sites = Bigarray_val(x_value)->dim[1];
+-  int n_states = Bigarray_val(x_value)->dim[2];
+-  if(n_sites != Bigarray_val(mask_value)->dim[0])
 +  double *x = Caml_ba_array_val(x_value);
 +  double *y = Caml_ba_array_val(y_value);
 +  uint16_t *mask = Caml_ba_array_val(mask_value);
 +  double *util = Caml_ba_array_val(util_value);
-   int n_rates = Bigarray_val(x_value)->dim[0];
-   int n_sites = Bigarray_val(x_value)->dim[1];
-   int n_states = Bigarray_val(x_value)->dim[2];
-@@ -542,11 +550,11 @@ CAMLprim value ten_bounded_logdot_c(valu
++  struct caml_ba_array *bax = Caml_ba_array_val(x_value);
++  struct caml_ba_array *bam = Caml_ba_array_val(mask_value);
++  int n_rates = bax->dim[0];
++  int n_sites = bax->dim[1];
++  int n_states = bax->dim[2];
++  if(n_sites != bam->dim[0])
+     { printf("ten_masked_logdot_c: Mask length doesn't match!"); };
+-  if(n_sites != Bigarray_val(util_value)->dim[0])
++  struct caml_ba_array *bau = Caml_ba_array_val(util_value);
++  if(n_sites != bau->dim[0])
+     { printf("ten_masked_logdot_c: Util length doesn't match!"); };
+   int rate, site, state;
+   double *x_p, *y_p, *util_v;
+@@ -542,14 +565,15 @@
  {
    CAMLparam5(x_value, y_value, first_value, last_value, util_value);
    CAMLlocal1(ml_ll_tot);
@@ -271,11 +350,18 @@ Last-Update: 2024-12-13
    int first = Int_val(first_value);
    int last = Int_val(last_value);
 -  double *util = Data_bigarray_val(util_value);
+-  int n_rates = Bigarray_val(x_value)->dim[0];
+-  int n_sites = Bigarray_val(x_value)->dim[1];
+-  int n_states = Bigarray_val(x_value)->dim[2];
 +  double *util = Caml_ba_array_val(util_value);
-   int n_rates = Bigarray_val(x_value)->dim[0];
-   int n_sites = Bigarray_val(x_value)->dim[1];
-   int n_states = Bigarray_val(x_value)->dim[2];
-@@ -607,9 +615,9 @@ CAMLprim value ten_bounded_logdot_c(valu
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  int n_rates = ba->dim[0];
++  int n_sites = ba->dim[1];
++  int n_states = ba->dim[2];
+   int rate, site, state;
+   int n_used = 1 + last - first;
+   /* we make pointers to x, y, and util so that we can do pointer arithmetic
+@@ -607,11 +631,12 @@
  CAMLprim value vec_pairwise_prod_c(value dst_value, value x_value, value y_value)
  {
    CAMLparam3(dst_value, x_value, y_value);
@@ -286,9 +372,13 @@ Last-Update: 2024-12-13
 +  double *x = Caml_ba_array_val(x_value);
 +  double *y = Caml_ba_array_val(y_value);
    int i;
-   for(i=0; i < Bigarray_val(x_value)->dim[0]; i++) {
+-  for(i=0; i < Bigarray_val(x_value)->dim[0]; i++) {
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  for(i=0; i < ba->dim[0]; i++) {
      dst[i] = x[i] * y[i];
-@@ -620,7 +628,7 @@ CAMLprim value vec_pairwise_prod_c(value
+   }
+   CAMLreturn(Val_unit);
+@@ -620,10 +645,11 @@
  CAMLprim value int_vec_tot_c(value x_value)
  {
    CAMLparam1(x_value);
@@ -296,21 +386,29 @@ Last-Update: 2024-12-13
 +  uint16_t *x = Caml_ba_array_val(x_value);
    CAMLlocal1(ml_tot);
    int i, tot = 0;
-   for(i=0; i < Bigarray_val(x_value)->dim[0]; i++)
-@@ -632,9 +640,9 @@ CAMLprim value int_vec_tot_c(value x_val
+-  for(i=0; i < Bigarray_val(x_value)->dim[0]; i++)
++  struct caml_ba_array *ba = Caml_ba_array_val(x_value);
++  for(i=0; i < ba->dim[0]; i++)
+     tot += *x++;
+   ml_tot = Val_int(tot);
+   CAMLreturn(ml_tot);
+@@ -632,10 +658,11 @@
  CAMLprim value int_vec_pairwise_prod_c(value dst_value, value x_value, value y_value)
  {
    CAMLparam3(dst_value, x_value, y_value);
 -  uint16_t *dst = Data_bigarray_val(dst_value);
 -  uint16_t *x = Data_bigarray_val(x_value);
 -  uint16_t *y = Data_bigarray_val(y_value);
+-  uint16_t *dst_end = dst + Bigarray_val(dst_value)->dim[0];
 +  uint16_t *dst = Caml_ba_array_val(dst_value);
 +  uint16_t *x = Caml_ba_array_val(x_value);
 +  uint16_t *y = Caml_ba_array_val(y_value);
-   uint16_t *dst_end = dst + Bigarray_val(dst_value)->dim[0];
++  struct caml_ba_array *ba = Caml_ba_array_val(dst_value);
++  uint16_t *dst_end = dst + ba->dim[0];
    while (dst < dst_end)
      *dst++ = *x++ * *y++;
-@@ -644,9 +652,9 @@ CAMLprim value int_vec_pairwise_prod_c(v
+   CAMLreturn(Val_unit);
+@@ -644,16 +671,19 @@
  CAMLprim value float_mat_int_vec_mul_c(value dst_value, value mat_value, value vec_value)
  {
    CAMLparam3(dst_value, mat_value, vec_value);
@@ -321,5 +419,18 @@ Last-Update: 2024-12-13
 +  double *mat = Caml_ba_array_val(mat_value);
 +  uint16_t vec_j, *vec = Caml_ba_array_val(vec_value);
    int j;
-   int n = Bigarray_val(mat_value)->dim[0], k = Bigarray_val(mat_value)->dim[1];
+-  int n = Bigarray_val(mat_value)->dim[0], k = Bigarray_val(mat_value)->dim[1];
++  struct caml_ba_array *bam = Caml_ba_array_val(mat_value);
++  int n = bam->dim[0], k = bam->dim[1];
    double *dst_start = dst, *dst_end = dst + k;
+ 
+-  if (Bigarray_val(vec_value)->dim[0] != n)
++  struct caml_ba_array *bav = Caml_ba_array_val(vec_value);
++  if (bav->dim[0] != n)
+     caml_failwith("dim_0 vec != dim_0 mat");
+-  if (Bigarray_val(dst_value)->dim[0] != k)
++  struct caml_ba_array *bad = Caml_ba_array_val(dst_value);
++  if (bad->dim[0] != k)
+     caml_failwith("dim_0 dst != dim_1 mat");
+ 
+   for (j = 0; j < n; ++j) {


=====================================
debian/tests/run-unit-test
=====================================
@@ -52,9 +52,9 @@ else
 	file "pca_out.xml" | grep 'XML 1.0 document'
 	readonly p4z1r36_size="$(du p4z1r36.xml | cut -f1)" # expect 176 k
 	readonly pca_out_size="$(du pca_out.xml | cut -f1)" # expect 588 k
-	test "$p4z1r36_size" -ge 168
-	test "$p4z1r36_size" -le 184
-	test "$pca_out_size" -ge 580
-	test "$pca_out_size" -le 596
+	test "$p4z1r36_size" -ge 128
+	test "$p4z1r36_size" -le 224
+	test "$pca_out_size" -ge 540
+	test "$pca_out_size" -le 636
 fi
 echo -e "\e[92m\e[1mPASS\e[0m"



View it on GitLab: https://salsa.debian.org/med-team/pplacer/-/compare/afbcd0ea9d6cc8296f76417e06a943f484970163...219a43e48523ff25c3b0e12c59c8ea62c128ff3d

-- 
View it on GitLab: https://salsa.debian.org/med-team/pplacer/-/compare/afbcd0ea9d6cc8296f76417e06a943f484970163...219a43e48523ff25c3b0e12c59c8ea62c128ff3d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250223/56a3c480/attachment-0001.htm>


More information about the debian-med-commit mailing list