public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-biology/tree-puzzle/files/, sci-biology/tree-puzzle/
@ 2022-01-29  0:00 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2022-01-29  0:00 UTC (permalink / raw
  To: gentoo-commits

commit:     8fe21c3fd5b5e7be60a75a09ba4b3ec4bad417bd
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 29 00:00:14 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jan 29 00:00:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fe21c3f

sci-biology/tree-puzzle: fix build system and MPI

Closes: https://bugs.gentoo.org/690900
Closes: https://bugs.gentoo.org/810502
Closes: https://bugs.gentoo.org/814185
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/tree-puzzle-5.2-MPI-3.0.patch            | 362 +++++++++++++++++++++
 sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild     |  25 +-
 2 files changed, 375 insertions(+), 12 deletions(-)

diff --git a/sci-biology/tree-puzzle/files/tree-puzzle-5.2-MPI-3.0.patch b/sci-biology/tree-puzzle/files/tree-puzzle-5.2-MPI-3.0.patch
new file mode 100644
index 000000000000..66e3e6482338
--- /dev/null
+++ b/sci-biology/tree-puzzle/files/tree-puzzle-5.2-MPI-3.0.patch
@@ -0,0 +1,362 @@
+https://bugs.gentoo.org/690900
+rename MPI 1.0 to 3.0+ functions:
+- MPI_Address -> MPI_Get_address
+- MPI_Type_struct -> MPI_Type_create_struct
+
+--- a/src/ppuzzle.c
++++ b/src/ppuzzle.c
+@@ -297,13 +297,13 @@
+ 	else	MPI_Recv(&dummy, 0, MPI_INT, PP_MyMaster, PP_UPDATEEEI, PP_Comm, &stat);
+ 
+ 	Dtypes[0] = MPI_DOUBLE; Dtypelens[0] = tpmradix;
+-	MPI_Address(&(Eval[0]), &(Dtypeaddr[0]));
++	MPI_Get_address(&(Eval[0]), &(Dtypeaddr[0]));
+ 	Dtypes[1] = MPI_DOUBLE; Dtypelens[1] = tpmradix * tpmradix;
+-	MPI_Address(&(Evec[0][0]), &(Dtypeaddr[1]));
++	MPI_Get_address(&(Evec[0][0]), &(Dtypeaddr[1]));
+ 	Dtypes[2] = MPI_DOUBLE; Dtypelens[2] = tpmradix * tpmradix;
+-	MPI_Address(&(Ievc[0][0]), &(Dtypeaddr[2]));
++	MPI_Get_address(&(Ievc[0][0]), &(Dtypeaddr[2]));
+ 
+-	MPI_Type_struct(3, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
++	MPI_Type_create_struct(3, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
+ 	MPI_Type_commit(&PP_Data);
+ 
+ 	MPI_Bcast (MPI_BOTTOM, 1, PP_Data, PP_MyMaster, PP_Comm);
+@@ -341,19 +341,19 @@
+ 	double*      DMVector = new_dvector(jobs);
+ 
+ 	Dtypes[0] = MPI_DOUBLE; Dtypelens[0] = jobs;
+-	MPI_Address(&(DMVector[0]), &(Dtypeaddr[0]));
++	MPI_Get_address(&(DMVector[0]), &(Dtypeaddr[0]));
+ 	Dtypes[1] = MPI_DOUBLE; Dtypelens[1] = numcats;
+-	MPI_Address(&(Rates[0]), &(Dtypeaddr[1]));
++	MPI_Get_address(&(Rates[0]), &(Dtypeaddr[1]));
+ 	Dtypes[2] = MPI_DOUBLE; Dtypelens[2] = 1;
+-	MPI_Address(&(fracinv), &(Dtypeaddr[2]));
++	MPI_Get_address(&(fracinv), &(Dtypeaddr[2]));
+ 	Dtypes[3] = MPI_DOUBLE; Dtypelens[3] = tpmradix;
+-	MPI_Address(&(Eval[0]), &(Dtypeaddr[3]));
++	MPI_Get_address(&(Eval[0]), &(Dtypeaddr[3]));
+ 	Dtypes[4] = MPI_DOUBLE; Dtypelens[4] = tpmradix * tpmradix;
+-	MPI_Address(&(Evec[0][0]), &(Dtypeaddr[4]));
++	MPI_Get_address(&(Evec[0][0]), &(Dtypeaddr[4]));
+ 	Dtypes[5] = MPI_DOUBLE; Dtypelens[5] = tpmradix * tpmradix;
+-	MPI_Address(&(Ievc[0][0]), &(Dtypeaddr[5]));
++	MPI_Get_address(&(Ievc[0][0]), &(Dtypeaddr[5]));
+ 
+-	MPI_Type_struct(6, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
++	MPI_Type_create_struct(6, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
+ 	MPI_Type_commit(&PP_Data);
+ 
+ 	if (PP_IamMaster) {
+@@ -719,10 +719,10 @@
+ #endif
+   doubles[0] = frconst;
+ 
+-  MPI_Address(ints,     Dtypeaddr);
+-  MPI_Address(doubles, (Dtypeaddr+1));
++  MPI_Get_address(ints,     Dtypeaddr);
++  MPI_Get_address(doubles, (Dtypeaddr+1));
+   
+-  MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Sizes);
++  MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Sizes);
+   MPI_Type_commit(&PP_Sizes);
+ 
+   for (dest=1; dest<PP_NumProcs; dest++) {
+@@ -797,10 +797,10 @@
+     fprintf(STDOUT, "(%2d) Receiving Sizes ...\n", PP_Myid);
+ # endif /* PVERBOSE3 */
+ 
+-  MPI_Address(ints,     Dtypeaddr);
+-  MPI_Address(doubles, (Dtypeaddr+1));
++  MPI_Get_address(ints,     Dtypeaddr);
++  MPI_Get_address(doubles, (Dtypeaddr+1));
+ 
+-  MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Sizes);
++  MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Sizes);
+   MPI_Type_commit(&PP_Sizes);
+  
+   error = MPI_Probe(PP_MyMaster, MPI_ANY_TAG, PP_Comm, &stat);
+@@ -889,31 +889,31 @@
+ # endif /* PVERBOSE2 */
+ 
+   Dtypes  [0] = MPI_CHAR; Dtypelens [0] = Maxspc * Numptrn;
+-  MPI_Address(&(Seqpat[0][0]), &(Dtypeaddr[0]));
++  MPI_Get_address(&(Seqpat[0][0]), &(Dtypeaddr[0]));
+   Dtypes  [1] = MPI_INT; Dtypelens  [1] = Maxsite ;
+-  MPI_Address(&(Alias[0]), &(Dtypeaddr[1]));
++  MPI_Get_address(&(Alias[0]), &(Dtypeaddr[1]));
+   Dtypes  [2] = MPI_INT; Dtypelens  [2] = Numptrn ;
+-  MPI_Address(&(Weight[0]), &(Dtypeaddr[2]));
++  MPI_Get_address(&(Weight[0]), &(Dtypeaddr[2]));
+   Dtypes  [3] = MPI_INT; Dtypelens  [3] = Numptrn ;
+-  MPI_Address(&(constpat[0]), &(Dtypeaddr[3]));
++  MPI_Get_address(&(constpat[0]), &(Dtypeaddr[3]));
+   Dtypes  [4] = MPI_DOUBLE; Dtypelens  [4] = numcats ;
+-  MPI_Address(&(Rates[0]), &(Dtypeaddr[4]));
++  MPI_Get_address(&(Rates[0]), &(Dtypeaddr[4]));
+   Dtypes  [5] = MPI_DOUBLE; Dtypelens  [5] = tpmradix ;
+-  MPI_Address(&(Eval[0]), &(Dtypeaddr[5]));
++  MPI_Get_address(&(Eval[0]), &(Dtypeaddr[5]));
+   Dtypes  [6] = MPI_DOUBLE; Dtypelens  [6] = tpmradix ;
+-  MPI_Address(&(Freqtpm[0]), &(Dtypeaddr[6]));
++  MPI_Get_address(&(Freqtpm[0]), &(Dtypeaddr[6]));
+   Dtypes  [7] = MPI_DOUBLE; Dtypelens  [7] = tpmradix * tpmradix ;
+-  MPI_Address(&(Evec[0][0]), &(Dtypeaddr[7]));
++  MPI_Get_address(&(Evec[0][0]), &(Dtypeaddr[7]));
+   Dtypes  [8] = MPI_DOUBLE; Dtypelens  [8] = tpmradix * tpmradix ;
+-  MPI_Address(&(Ievc[0][0]), &(Dtypeaddr[8]));
++  MPI_Get_address(&(Ievc[0][0]), &(Dtypeaddr[8]));
+   Dtypes  [9] = MPI_DOUBLE; Dtypelens [9] = tpmradix * tpmradix ;
+-  MPI_Address(&(iexp[0][0]), &(Dtypeaddr[9]));
++  MPI_Get_address(&(iexp[0][0]), &(Dtypeaddr[9]));
+   Dtypes [10] = MPI_DOUBLE; Dtypelens [10] = Maxspc * Maxspc ;
+-  MPI_Address(&(Distanmat[0][0]), &(Dtypeaddr[10]));
++  MPI_Get_address(&(Distanmat[0][0]), &(Dtypeaddr[10]));
+   Dtypes [11] = MPI_DOUBLE; Dtypelens [11] = numcats * tpmradix * tpmradix ;
+-  MPI_Address(&(ltprobr[0][0][0]), &(Dtypeaddr[11]));
++  MPI_Get_address(&(ltprobr[0][0][0]), &(Dtypeaddr[11]));
+  
+-  MPI_Type_struct(12, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
++  MPI_Type_create_struct(12, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
+   MPI_Type_commit(&PP_Data);
+  
+ 
+@@ -984,31 +984,31 @@
+ # endif /* PVERBOSE2 */
+  
+   Dtypes  [0] = MPI_CHAR; Dtypelens [0] = Maxspc * Numptrn;
+-  MPI_Address(&(Seqpat[0][0]), &(Dtypeaddr[0]));
++  MPI_Get_address(&(Seqpat[0][0]), &(Dtypeaddr[0]));
+   Dtypes  [1] = MPI_INT; Dtypelens  [1] = Maxsite ;
+-  MPI_Address(&(Alias[0]), &(Dtypeaddr[1]));
++  MPI_Get_address(&(Alias[0]), &(Dtypeaddr[1]));
+   Dtypes  [2] = MPI_INT; Dtypelens  [2] = Numptrn ;
+-  MPI_Address(&(Weight[0]), &(Dtypeaddr[2]));
++  MPI_Get_address(&(Weight[0]), &(Dtypeaddr[2]));
+   Dtypes  [3] = MPI_INT; Dtypelens  [3] = Numptrn ;
+-  MPI_Address(&(constpat[0]), &(Dtypeaddr[3]));
++  MPI_Get_address(&(constpat[0]), &(Dtypeaddr[3]));
+   Dtypes  [4] = MPI_DOUBLE; Dtypelens  [4] = numcats ;
+-  MPI_Address(&(Rates[0]), &(Dtypeaddr[4]));
++  MPI_Get_address(&(Rates[0]), &(Dtypeaddr[4]));
+   Dtypes  [5] = MPI_DOUBLE; Dtypelens  [5] = tpmradix ;
+-  MPI_Address(&(Eval[0]), &(Dtypeaddr[5]));
++  MPI_Get_address(&(Eval[0]), &(Dtypeaddr[5]));
+   Dtypes  [6] = MPI_DOUBLE; Dtypelens  [6] = tpmradix ;
+-  MPI_Address(&(Freqtpm[0]), &(Dtypeaddr[6]));
++  MPI_Get_address(&(Freqtpm[0]), &(Dtypeaddr[6]));
+   Dtypes  [7] = MPI_DOUBLE; Dtypelens  [7] = tpmradix * tpmradix ;
+-  MPI_Address(&(Evec[0][0]), &(Dtypeaddr[7]));
++  MPI_Get_address(&(Evec[0][0]), &(Dtypeaddr[7]));
+   Dtypes  [8] = MPI_DOUBLE; Dtypelens  [8] = tpmradix * tpmradix ;
+-  MPI_Address(&(Ievc[0][0]), &(Dtypeaddr[8]));
++  MPI_Get_address(&(Ievc[0][0]), &(Dtypeaddr[8]));
+   Dtypes  [9] = MPI_DOUBLE; Dtypelens  [9] = tpmradix * tpmradix ;
+-  MPI_Address(&(iexp[0][0]), &(Dtypeaddr [9]));
++  MPI_Get_address(&(iexp[0][0]), &(Dtypeaddr [9]));
+   Dtypes [10] = MPI_DOUBLE; Dtypelens [10] = Maxspc * Maxspc ;
+-  MPI_Address(&(Distanmat[0][0]), &(Dtypeaddr[10]));
++  MPI_Get_address(&(Distanmat[0][0]), &(Dtypeaddr[10]));
+   Dtypes [11] = MPI_DOUBLE; Dtypelens [11] = numcats * tpmradix * tpmradix ;
+-  MPI_Address(&(ltprobr[0][0][0]), &(Dtypeaddr[11]));
++  MPI_Get_address(&(ltprobr[0][0][0]), &(Dtypeaddr[11]));
+  
+-  MPI_Type_struct(12, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
++  MPI_Type_create_struct(12, Dtypelens, Dtypeaddr, Dtypes, &PP_Data);
+   MPI_Type_commit(&PP_Data);
+  
+   for (dest=1; dest<PP_NumProcs; dest++) {
+@@ -1150,10 +1150,10 @@
+   ints[4] = usebestq;
+   ints[5] = approx;
+  
+-  MPI_Address(ints,     Dtypeaddr);
+-  MPI_Address(doubles, (Dtypeaddr+1));
++  MPI_Get_address(ints,     Dtypeaddr);
++  MPI_Get_address(doubles, (Dtypeaddr+1));
+   
+-  MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Quart);
++  MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Quart);
+   MPI_Type_commit(&PP_Quart);
+  
+ # ifdef PVERBOSE2
+@@ -1201,10 +1201,10 @@
+  
+   PP_quartrecved++;
+   PP_quartrecvedn++;
+-  MPI_Address(ints,     Dtypeaddr);
+-  MPI_Address(doubles, (Dtypeaddr+1));
++  MPI_Get_address(ints,     Dtypeaddr);
++  MPI_Get_address(doubles, (Dtypeaddr+1));
+   
+-  MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Quart);
++  MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Quart);
+   MPI_Type_commit(&PP_Quart);
+  
+   error = MPI_Recv(MPI_BOTTOM, 1, PP_Quart, MPI_ANY_SOURCE, PP_QUART, PP_Comm, &stat);
+@@ -1368,10 +1368,10 @@
+   ulis[5] = fullresqs; /* number of fully resolved quartets */
+   ulis[6] = missingqs; /* number of missing quartets */
+ 
+-  MPI_Address(ulis,  Dtypeaddr);
+-  MPI_Address(ints, (Dtypeaddr+1));
++  MPI_Get_address(ulis,  Dtypeaddr);
++  MPI_Get_address(ints, (Dtypeaddr+1));
+   
+-  MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_QBlockSpecs);
++  MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_QBlockSpecs);
+   MPI_Type_commit(&PP_QBlockSpecs);
+  
+ # ifdef PVERBOSE2
+@@ -1384,12 +1384,12 @@
+     fprintf(STDOUT, "(%2d) ... Sent QuartBlockSpecs (%ld, %ld, %ld, %d)\n", PP_Myid, ulis[0], ulis[1], ulis[2], ints[0]);
+ # endif /* PVERBOSE3 */
+ 
+-  MPI_Address(trueaddr, DtypeaddrRes);
++  MPI_Get_address(trueaddr, DtypeaddrRes);
+   DtypelensRes[0] = truenum;
+ 
+-  MPI_Address(bq, (DtypeaddrRes + 1));
++  MPI_Get_address(bq, (DtypeaddrRes + 1));
+   DtypelensRes[1] = numofbq;
+-  MPI_Type_struct(2, DtypelensRes, DtypeaddrRes, DtypesRes, &PP_QBlockRes);
++  MPI_Type_create_struct(2, DtypelensRes, DtypeaddrRes, DtypesRes, &PP_QBlockRes);
+   MPI_Type_commit(&PP_QBlockRes);
+ 
+   error = MPI_Ssend(MPI_BOTTOM, 1, PP_QBlockRes, PP_MyMaster, PP_QUARTBLOCK, PP_Comm);
+@@ -1455,10 +1455,10 @@
+ #	ifdef PVERBOSE3
+ 	    fprintf(STDOUT, "(%2d) Receiving QuartBlock ...\n", PP_Myid);
+ #	endif /* PVERBOSE3 */
+-	MPI_Address(ulis,  Dtypeaddr);
+-	MPI_Address(ints, (Dtypeaddr+1));
++	MPI_Get_address(ulis,  Dtypeaddr);
++	MPI_Get_address(ints, (Dtypeaddr+1));
+  
+-	MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_QBlockSpecs);
++	MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_QBlockSpecs);
+ 	MPI_Type_commit(&PP_QBlockSpecs);
+  
+ 	MPI_Probe(MPI_ANY_SOURCE, PP_QUARTBLOCKSPECS, PP_Comm, &stat);
+@@ -1486,13 +1486,13 @@
+ #       endif /* PVERBOSE3 */
+ 
+ 	DtypelensRes[0] =  truenum;
+-	MPI_Address(trueaddr,  DtypeaddrRes);
++	MPI_Get_address(trueaddr,  DtypeaddrRes);
+ 
+ 	bq = calloc((size_t) *numofbq, sizeof(uli));
+ 
+ 	DtypelensRes[1] = *numofbq;
+-	MPI_Address(bq, (DtypeaddrRes+1));
+-	MPI_Type_struct(2, DtypelensRes, DtypeaddrRes, DtypesRes, &PP_QBlockRes);
++	MPI_Get_address(bq, (DtypeaddrRes+1));
++	MPI_Type_create_struct(2, DtypelensRes, DtypeaddrRes, DtypesRes, &PP_QBlockRes);
+ 	MPI_Type_commit(&PP_QBlockRes);
+  
+ 	error = MPI_Recv(MPI_BOTTOM, 1, PP_QBlockRes, dest, PP_QUARTBLOCK, PP_Comm, &stat);
+@@ -1637,8 +1637,8 @@
+      Dtypelens[0] = (Numquartets + 1)/2;
+   }
+ 
+-  MPI_Address(&(quartetinfo[0]), Dtypeaddr);
+-  MPI_Type_struct(1, Dtypelens, Dtypeaddr, Dtypes, &PP_AllQuarts);
++  MPI_Get_address(&(quartetinfo[0]), Dtypeaddr);
++  MPI_Type_create_struct(1, Dtypelens, Dtypeaddr, Dtypes, &PP_AllQuarts);
+   MPI_Type_commit(&PP_AllQuarts);
+  
+   for (dest=1; dest<PP_NumProcs; dest++) {
+@@ -1686,8 +1686,8 @@
+     Dtypelens[0] = (*Numquartets + 1)/2;
+   }
+  
+-  MPI_Address(&(quartetinfo[0]), Dtypeaddr);
+-  MPI_Type_struct(1, Dtypelens, Dtypeaddr, Dtypes, &PP_AllQuarts);
++  MPI_Get_address(&(quartetinfo[0]), Dtypeaddr);
++  MPI_Type_create_struct(1, Dtypelens, Dtypeaddr, Dtypes, &PP_AllQuarts);
+   MPI_Type_commit(&PP_AllQuarts);
+  
+   error = MPI_Recv(MPI_BOTTOM, 1, PP_AllQuarts, PP_MyMaster, PP_ALLQUARTS, PP_Comm, &stat);
+@@ -1748,13 +1748,13 @@
+   for (n=0; n<(int)blocksize; n++) {
+     Dtypes[n]    = MPI_CHAR;
+     Dtypelens[n] = (taxa - 3) * taxa;
+-    MPI_Address(&(biparts[n][0][0]), &(Dtypeaddr[n]));
++    MPI_Get_address(&(biparts[n][0][0]), &(Dtypeaddr[n]));
+   }
+   pstptr = pstlist;
+   for (n=0; n<pstnum; n++) {
+     Dtypes[(int)blocksize + n]    = MPI_CHAR;
+     Dtypelens[(int)blocksize + n] = psteptreestrlen;
+-    MPI_Address((*pstptr).tree, &(Dtypeaddr[(int)blocksize + n]));
++    MPI_Get_address((*pstptr).tree, &(Dtypeaddr[(int)blocksize + n]));
+     pstnumarr[n] = (*pstptr).count;
+ #   ifdef PVERBOSE3
+        fprintf(STDOUT, "(%2d) Sent tree item ->%d: [%d/%d] #=%d  \"%s\"\n",
+@@ -1764,9 +1764,9 @@
+   }
+   Dtypes[((int)blocksize + pstnum)]    = MPI_INT;
+   Dtypelens[((int)blocksize + pstnum)] = pstnum;
+-  MPI_Address(&(pstnumarr[0]), &(Dtypeaddr[((int)blocksize + pstnum)]));
++  MPI_Get_address(&(pstnumarr[0]), &(Dtypeaddr[((int)blocksize + pstnum)]));
+ 
+-  MPI_Type_struct(((int)blocksize + pstnum + 1), Dtypelens, Dtypeaddr, Dtypes, &PP_Biparts);
++  MPI_Type_create_struct(((int)blocksize + pstnum + 1), Dtypelens, Dtypeaddr, Dtypes, &PP_Biparts);
+   MPI_Type_commit(&PP_Biparts);
+  
+   error = MPI_Ssend(MPI_BOTTOM, 1, PP_Biparts, PP_MyMaster, PP_PUZZLEBLOCK, PP_Comm);
+@@ -1843,20 +1843,20 @@
+     (*bip)[n]        = new_cmatrix(*taxa - 3, *taxa);
+     Dtypes[n]    = MPI_CHAR;
+     Dtypelens[n] = (*taxa - 3) * *taxa;
+-    MPI_Address(&((*bip)[n][0][0]), &(Dtypeaddr[n]));
++    MPI_Get_address(&((*bip)[n][0][0]), &(Dtypeaddr[n]));
+   }
+   for (n=0; n<pstlistnum; n++) {
+     pstarr[n]        = (char *)calloc((size_t) psteptreestrlen, sizeof(char)); 
+     Dtypes[(int)*blocksize + n]    = MPI_CHAR;
+     Dtypelens[(int)*blocksize + n] = psteptreestrlen;
+-    MPI_Address(&(pstarr[n][0]), &(Dtypeaddr[(int)*blocksize + n]));
++    MPI_Get_address(&(pstarr[n][0]), &(Dtypeaddr[(int)*blocksize + n]));
+   }
+   
+   Dtypes[(int)*blocksize + pstlistnum]    = MPI_INT;
+   Dtypelens[(int)*blocksize + pstlistnum] = pstlistnum;
+-  MPI_Address(&(pstnumarr[0]), &(Dtypeaddr[(int)*blocksize + pstlistnum]));
++  MPI_Get_address(&(pstnumarr[0]), &(Dtypeaddr[(int)*blocksize + pstlistnum]));
+ 
+-  MPI_Type_struct(((int)*blocksize + pstlistnum + 1), Dtypelens, Dtypeaddr, Dtypes, &PP_Biparts);
++  MPI_Type_create_struct(((int)*blocksize + pstlistnum + 1), Dtypelens, Dtypeaddr, Dtypes, &PP_Biparts);
+   MPI_Type_commit(&PP_Biparts);
+  
+   error = MPI_Recv(MPI_BOTTOM, 1, PP_Biparts, dest, PP_PUZZLEBLOCK, PP_Comm, &stat);
+@@ -2053,10 +2053,10 @@
+     fprintf(STDOUT, "(%2d) ... Sent DONE Signal\n", PP_Myid);
+ # endif /* PVERBOSE3 */
+  
+-  MPI_Address(ints,     Dtypeaddr);
+-  MPI_Address(doubles, (Dtypeaddr+1));
++  MPI_Get_address(ints,     Dtypeaddr);
++  MPI_Get_address(doubles, (Dtypeaddr+1));
+ 
+-  MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Stats);
++  MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Stats);
+   MPI_Type_commit(&PP_Stats);
+ 
+   doquartrecved[0]  = 0;
+@@ -2173,10 +2173,10 @@
+   doubles[4] = tarr.cpu;
+   doubles[5] = tarr.time;
+ 
+-  MPI_Address(ints,     Dtypeaddr);
+-  MPI_Address(doubles, (Dtypeaddr+1));
++  MPI_Get_address(ints,     Dtypeaddr);
++  MPI_Get_address(doubles, (Dtypeaddr+1));
+ 
+-  MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Stats);
++  MPI_Type_create_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Stats);
+   MPI_Type_commit(&PP_Stats);
+ 
+   error = MPI_Ssend(MPI_BOTTOM, 1, PP_Stats, PP_MyMaster, PP_STATS, PP_Comm);

diff --git a/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild b/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild
index 8e2a07f8183e..06fc28376ff5 100644
--- a/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild
+++ b/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit toolchain-funcs
 
@@ -18,14 +18,10 @@ RESTRICT="test"
 DEPEND="mpi? ( virtual/mpi )"
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}"/${PN}-impl-dec.patch )
-
-pkg_setup() {
-	use mpi && [[ $(tc-getCC) == icc* ]] &&
-		die "The parallelized version of tree-puzzle cannot be compiled using icc.
-			Either disable the \"mpi\" USE flag to compile only the non-parallelized
-			version of the program, or use gcc as your compiler (CC=\"gcc\")."
-}
+PATCHES=(
+	"${FILESDIR}"/${PN}-impl-dec.patch
+	"${FILESDIR}"/${P}-MPI-3.0.patch
+)
 
 src_configure() {
 	default
@@ -38,9 +34,14 @@ src_configure() {
 	fi
 }
 
+src_compile() {
+	# hopelessly terrible build system, abuses Automake
+	emake -j1
+}
+
 src_install() {
-	dobin src/puzzle
-	use mpi && dobin src/ppuzzle
+	dobin src/puzzle $(usev mpi src/ppuzzle)
+
 	einstalldocs
 
 	# User manual


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-biology/tree-puzzle/files/, sci-biology/tree-puzzle/
@ 2022-11-19  4:46 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2022-11-19  4:46 UTC (permalink / raw
  To: gentoo-commits

commit:     d4d7228930146c4626f8da2c0fb68c788329eb6a
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 19 04:45:55 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Nov 19 04:45:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4d72289

sci-biology/tree-puzzle: regenerate configure script for clang 16

Closes: https://bugs.gentoo.org/879751
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/tree-puzzle-5.2-C99-decls.patch          | 360 +++++++++++++++++++++
 .../tree-puzzle/files/tree-puzzle-impl-dec.patch   |  14 -
 sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild     |   9 +-
 3 files changed, 368 insertions(+), 15 deletions(-)

diff --git a/sci-biology/tree-puzzle/files/tree-puzzle-5.2-C99-decls.patch b/sci-biology/tree-puzzle/files/tree-puzzle-5.2-C99-decls.patch
new file mode 100644
index 000000000000..98456c0dacc1
--- /dev/null
+++ b/sci-biology/tree-puzzle/files/tree-puzzle-5.2-C99-decls.patch
@@ -0,0 +1,360 @@
+--- a/src/consensus.c
++++ b/src/consensus.c
+@@ -32,7 +32,7 @@
+ /******************************************************************************/
+ 
+ /* prepare for consensus tree analysis */
+-void initconsensus()
++void initconsensus(void)
+ {
+ #	if ! PARALLEL
+ 		biparts = new_cmatrix(Maxspc-3, Maxspc);
+--- a/src/consensus.h
++++ b/src/consensus.h
+@@ -65,7 +65,7 @@
+ /******************************************************************************/
+ 
+ /* prepare for consensus tree analysis */
+-void initconsensus();
++void initconsensus(void);
+ 
+ /* recursive function to get bipartitions */
+ /* traversal should be optimazable (HAS) */
+--- a/src/ml1.c
++++ b/src/ml1.c
+@@ -244,7 +244,7 @@
+ /***************************** exported functions *****************************/
+ 
+ 
+-void evaluateseqs()
++void evaluateseqs(void)
+ {	
+ 	ivector ali;
+ 
+@@ -1018,7 +1018,7 @@
+ 
+ 
+ /* compute 1 PAM rate matrix, its eigensystem, and the inverse matrix thereof */
+-void tranprobmat()
++void tranprobmat(void)
+ {
+ 	eigensystem(Eval, Evec); /* eigensystem of 1 PAM rate matrix */
+ 	luinverse(Evec, Ievc, tpmradix); /* inverse eigenvectors are in Ievc */
+@@ -1324,7 +1324,7 @@
+ 
+ 
+ /* initialize distance matrix */
+-void initdistan()
++void initdistan(void)
+ {
+ 	int i, j, k, diff, x, y;
+ 	double obs, temp;
+@@ -1478,7 +1478,7 @@
+ 
+ #else /* not PARALLEL */
+ 
+-void computedistan()
++void computedistan(void)
+ {
+ 	int i, j;
+ 
+--- a/src/ml2.c
++++ b/src/ml2.c
+@@ -1036,7 +1036,7 @@
+ 
+ 
+ /* preparation for ML analysis */
+-void mlstart()
++void mlstart(void)
+ {
+ 	/* number of states and code length */
+ 	tpmradix = gettpmradix();
+@@ -1098,7 +1098,7 @@
+ 
+ 
+ /* cleanup after ML analysis */
+-void mlfinish()
++void mlfinish(void)
+ {
+ 	if (Ctree != NULL)
+ 		free_tree(Ctree, Numspc);
+@@ -1566,7 +1566,7 @@
+                              int bestratefound,
+                              int ncats)    /* numcats */
+ #endif
+-void findbestratecombination()
++void findbestratecombination(void)
+ {
+ 	int k, u;
+ 	double bestvalue, fv2;
+@@ -2147,7 +2147,7 @@
+ } /* clock_lklhd */
+ 
+ /* find out the edge containing the root */
+-int findrootedge()
++int findrootedge(void)
+ {
+ 	int e, ebest;
+ 	double logbest, logtest;
+--- a/src/mlparam.c
++++ b/src/mlparam.c
+@@ -70,7 +70,7 @@
+ }
+ 
+ /* compute rates of each category when rates are Gamma-distributed */
+-void updaterates()
++void updaterates(void)
+ {
+ 	int i;
+ 	double alpha;
+@@ -190,7 +190,7 @@
+ }
+ 
+ /* estimate substitution process parameters - random quartets */
+-void optimseqevolparamsquart()
++void optimseqevolparamsquart(void)
+ {
+ 	double tsmeanold, yrmeanold;
+ 	dvector tslist, yrlist;
+@@ -320,7 +320,7 @@
+ 
+ 
+ /* optimize substitution process parameters - tree */
+-void optimseqevolparamstree()
++void optimseqevolparamstree(void)
+ {
+ 	twodimenmin(EPSILON_SUBSTPARAM,
+ 		(SH_optn || nuc_optn) && optim_optn && (data_optn == 0),
+@@ -379,7 +379,7 @@
+ 
+ 
+ /* optimize rate heterogeneity parameters */
+-void optimrateparams()
++void optimrateparams(void)
+ {	
+ 	twodimenmin(EPSILON_RATEPARAM,
+ 		fracinv_optim,
+@@ -396,7 +396,7 @@
+ 
+ /* estimate parameters of substitution process and rate heterogeneity - no tree
+    n-taxon tree is not needed because of quartet method or NJ tree topology */
+-void estimateparametersnotree()
++void estimateparametersnotree(void)
+ {
+ 	int it, nump, change;
+ 	double TSold, YRold, FIold, GEold;
+@@ -495,7 +495,7 @@
+ 
+ /* estimate parameters of substitution process and rate heterogeneity - tree
+    same as above but here the n-taxon tree is already in memory */
+-void estimateparameterstree()
++void estimateparameterstree(void)
+ {
+ 	int it, nump, change;
+ 	double TSold, YRold, FIold, GEold;
+--- a/src/model1.c
++++ b/src/model1.c
+@@ -31,7 +31,7 @@
+ #include "ml.h"
+ 
+ /* number of states of the selected model */ 
+-int gettpmradix()
++int gettpmradix(void)
+ {
+ 	if (data_optn == 0) { /* nucleotides */
+ 		if (nuc_optn) return 4;
+--- a/src/puzzle1.c
++++ b/src/puzzle1.c
+@@ -345,7 +345,7 @@
+ /******************************************************************************/
+ 
+ /* compute TN parameters according to F84 Ts/Tv ratio */
+-void makeF84model()
++void makeF84model(void)
+ {
+ 	double rho, piA, piC, piG, piT, piR, piY, ts, yr;
+ 	
+@@ -390,7 +390,7 @@
+ } /* makeF84model */
+ 
+ /* compute number of quartets used in LM analysis */
+-void compnumqts()
++void compnumqts(void)
+ {
+ 	if (lmqts == 0) {
+ 		if (numclust == 4)
+@@ -407,7 +407,7 @@
+ } /* compnumqts */
+ 
+ /* set options interactively */
+-void setoptions()
++void setoptions(void)
+ {	
+ 	int i, valid;
+ 	double sumfreq;
+@@ -1718,7 +1718,7 @@
+ } /* closefile */
+ 
+ /* symmetrize doublet frequencies */
+-void symdoublets()
++void symdoublets(void)
+ {
+ 	int i, imean;
+ 	double mean;
+@@ -1769,7 +1769,7 @@
+ } /* symdoublets */
+ 
+ /* show Ts/Tv ratio and Ts Y/R ratio */
+-void computeexpectations()
++void computeexpectations(void)
+ {
+ 	double AlphaYBeta, AlphaRBeta, piR, piY, num, denom, pyr, pur;
+ 	
+@@ -4604,7 +4604,7 @@
+ /* Reconstruct a tree with QP */
+ /* (parameter estimation already done) */
+ 
+-void recon_tree()
++void recon_tree(void)
+ {
+ 	int i;
+ 	unsigned char tmpweight;
+@@ -4848,7 +4848,7 @@
+ 
+ /***************************************************************/ 
+ 
+-void map_lklhd()
++void map_lklhd(void)
+ {	
+ 	int i, a, a1, a2, b, b1, b2, c, c1, c2, d;
+ 	uli nq;
+@@ -5101,7 +5101,7 @@
+ 
+ /***************************************************************/ 
+ 
+-void setdefaults() {
++void setdefaults(void) {
+ 
+   strcpy(INFILE,     INFILEDEFAULT);
+   strcpy(OUTFILE,    OUTFILEDEFAULT);
+@@ -6027,7 +6027,7 @@
+ 
+ /***************************************************************/ 
+ 
+-void memcleanup() { 
++void memcleanup(void) { 
+ 	if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) {
+ 		free(splitfreqs);
+ 		free(splitpatterns);
+--- a/src/puzzle2.c
++++ b/src/puzzle2.c
+@@ -860,7 +860,7 @@
+ 
+ 
+ /* estimate mean base frequencies from translated data set */
+-void estimatebasefreqs()
++void estimatebasefreqs(void)
+ {
+ 	int tpmradix, i, j;
+ 	uli all, *gene;
+@@ -903,7 +903,7 @@
+ 
+ 
+ /* guess model of substitution */
+-void guessmodel()
++void guessmodel(void)
+ {
+ 	double c1, c2, c3, c4, c5, c6;
+ 	dvector f;
+@@ -1160,7 +1160,7 @@
+ } /* callocquartets */
+ 
+ /* free quartet memory */
+-void freequartets()
++void freequartets(void)
+ {	
+ 	free(quartetinfo);
+ } /* freequartets */
+@@ -1357,7 +1357,7 @@
+ /*************************/
+ 
+ /* checks out all possible quartets */
+-void computeallquartets()
++void computeallquartets(void)
+ {	
+ 	double onethird;
+ 	uli nq;
+--- a/src/sprng/makeseed.c
++++ b/src/sprng/makeseed.c
+@@ -1,10 +1,6 @@
+ #include <time.h>
+ 
+-#ifdef __STDC__
+-int make_new_seed()
+-#else
+-int make_new_seed()
+-#endif
++int make_new_seed(void)
+ {
+   time_t tp;
+   struct tm *temp;
+--- a/src/sprng/primes-lcg64.c
++++ b/src/sprng/primes-lcg64.c
+@@ -1,5 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "primes-lcg64.h"
+ #include "primelist-lcg64.h"
+ 
+--- a/src/treesort.c
++++ b/src/treesort.c
+@@ -487,7 +487,7 @@
+ /**********/
+ 
+ /* malloc new tree list item */
+-treelistitemtype *gettreelistitem()
++treelistitemtype *gettreelistitem(void)
+ {
+ 	treelistitemtype *tmpptr;
+ 	tmpptr = (treelistitemtype *)calloc((size_t) 1, sizeof(treelistitemtype));
+--- a/src/treesort.h
++++ b/src/treesort.h
+@@ -84,7 +84,7 @@
+ /**********/
+ 
+ /* allocate memory for ctree 3 ints pointer plus 1 check byte */
+-int *initctree();
++int *initctree(void);
+ 
+ /**********/
+ 
+@@ -174,7 +174,7 @@
+ /**********/
+ 
+ /* malloc new tree list item */
+-treelistitemtype *gettreelistitem();
++treelistitemtype *gettreelistitem(void);
+ 
+ /**********/
+ 
+--- a/src/util.c
++++ b/src/util.c
+@@ -507,7 +507,7 @@
+ #define EPS 1.2e-7
+ #define RNMX (1.0-EPS)
+ 
+-double randomunitintervall()
++double randomunitintervall(void)
+ /* Long period (> 2e18) random number generator. Returns a uniform random
+    deviate between 0.0 and 1.0 (exclusive of endpoint values).
+ 
+@@ -734,7 +734,7 @@
+ /* Reads characters from stdin until a newline character or EOF
+    is received.  The newline is not made part of the string.
+    If an error occurs a null string \0 is returned */
+-cvector mygets()
++cvector mygets(void)
+ {
+ 	int c, n;
+ 	cvector str;

diff --git a/sci-biology/tree-puzzle/files/tree-puzzle-impl-dec.patch b/sci-biology/tree-puzzle/files/tree-puzzle-impl-dec.patch
deleted file mode 100644
index 93b960f5c2b4..000000000000
--- a/sci-biology/tree-puzzle/files/tree-puzzle-impl-dec.patch
+++ /dev/null
@@ -1,14 +0,0 @@
- src/sprng/primes-lcg64.c |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/src/sprng/primes-lcg64.c b/src/sprng/primes-lcg64.c
-index 8e5a7c9..fb04373 100644
---- a/src/sprng/primes-lcg64.c
-+++ b/src/sprng/primes-lcg64.c
-@@ -1,5 +1,6 @@
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- #include "primes-lcg64.h"
- #include "primelist-lcg64.h"
- 

diff --git a/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild b/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild
index e5093420d6a8..b5e8e3931220 100644
--- a/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild
+++ b/sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=8
 
+inherit autotools
+
 DESCRIPTION="Maximum likelihood analysis for nucleotide, amino acid, and two-state data"
 HOMEPAGE="http://www.tree-puzzle.de"
 SRC_URI="http://www.tree-puzzle.de/${P}.tar.gz"
@@ -17,10 +19,15 @@ DEPEND="mpi? ( virtual/mpi )"
 RDEPEND="${DEPEND}"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-impl-dec.patch
+	"${FILESDIR}"/${P}-C99-decls.patch
 	"${FILESDIR}"/${P}-MPI-3.0.patch
 )
 
+src_prepare() {
+	default
+	eautoreconf
+}
+
 src_configure() {
 	default
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-19  4:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-29  0:00 [gentoo-commits] repo/gentoo:master commit in: sci-biology/tree-puzzle/files/, sci-biology/tree-puzzle/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2022-11-19  4:46 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox