diff --git a/math/sprng/Makefile b/math/sprng/Makefile index 6b03d720ef51..5b07c63b2667 100644 --- a/math/sprng/Makefile +++ b/math/sprng/Makefile @@ -1,66 +1,66 @@ PORTNAME= SPRNG PORTVERSION= 5.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= math science MASTER_SITES= http://www.sprng.org/Version${PORTVERSION}/ DISTNAME= ${PORTNAME:tl}${PORTVERSION:R} MAINTAINER= thierry@FreeBSD.org COMMENT= Scalable Parallel Pseudo Random Number Generators Library WWW= http://www.sprng.org/ LICENSE= CC-BY-NC-SA-4.0 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libtestu01.so:math/testu01 -USES= compiler dos2unix fortran gmake localbase tar:bz2 +USES= compiler fortran gmake localbase tar:bz2 DOS2UNIX_GLOB= LICENSE FFLAGS= -I${LOCALBASE}/include GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-testu01=${LOCALBASE} \ --with-testu01lib=${LOCALBASE}/lib \ --with-testu01inc=${LOCALBASE}/include/TestU01 TEST_TARGET= check PORTEXAMPLES= * OPTIONS_DEFINE= EXAMPLES MPICH OPTIONS_DEFAULT= EXAMPLES MPICH OPTIONS_SUB= yes MPICH_USES= mpi:mpich MPICH_CONFIGURE_WITH= mpi ASCII_TEXTS= checkcmrg checklcg checklcg64 checklfg checkmlfg checkpmlcg \ checksprng timecmrg timelcg timelcg64 timelfg timemlfg timepmlcg\ timesprng .include pre-configure: .if ${CHOSEN_COMPILER_TYPE} == clang ${FIND} ${WRKSRC} -name Makefile.in | \ ${XARGS} ${REINPLACE_CMD} -e 's|-lstdc++|-lc++|' .endif .for s in check_gen.cpp check_gen_simple.cpp ${FIND} ${WRKSRC} -name ${s} | \ ${XARGS} ${REINPLACE_CMD} -e 's|using namespace std;||' .endfor post-stage: (cd ${STAGEDIR}${PREFIX}/share && \ ${RM} .insertlib gencheck gentime insertlib) (cd ${STAGEDIR}${PREFIX}/bin && ${RM} ${ASCII_TEXTS}) post-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/EXAMPLES && \ ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) (cd ${STAGEDIR}${EXAMPLESDIR} && ${RM} -r .deps) .if !defined(WITH_DEBUG) ${FIND} ${STAGEDIR}${EXAMPLESDIR} -name "*.sprng" | \ ${XARGS} ${STRIP_CMD} .endif .include diff --git a/math/sprng/distinfo b/math/sprng/distinfo index 842f16fd6ab1..9f69180f74db 100644 --- a/math/sprng/distinfo +++ b/math/sprng/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1607615633 -SHA256 (sprng5.tar.bz2) = 9172a495472cc24893e7489ce9b5654300dc60cba4430e436ce50d28eb749a66 -SIZE (sprng5.tar.bz2) = 648021 +TIMESTAMP = 1773689189 +SHA256 (sprng5.tar.bz2) = 696ef452bdd998d2e66586e73d81dac875082e35d08de419cede1a1bb2555b59 +SIZE (sprng5.tar.bz2) = 590000 diff --git a/math/sprng/files/patch-SRC_pmlcg_longlong.h b/math/sprng/files/patch-SRC_pmlcg_longlong.h index a153cbb31087..988d6183fe5e 100644 --- a/math/sprng/files/patch-SRC_pmlcg_longlong.h +++ b/math/sprng/files/patch-SRC_pmlcg_longlong.h @@ -1,15 +1,14 @@ ---- SRC/pmlcg/longlong.h.orig 2024-12-17 18:25:17 UTC +--- SRC/pmlcg/longlong.h.orig 2021-01-15 16:37:37 UTC +++ SRC/pmlcg/longlong.h @@ -211,9 +211,8 @@ UDItype __umulsidi3 (USItype, USItype); "r" ((USItype) (al)), \ "rI" ((USItype) (bl))) #define umul_ppmm(xh, xl, a, b) \ -{register USItype __t0, __t1, __t2; \ - __asm__ ("%@ Inlined umul_ppmm\n" \ - " mov %2, %5, lsr #16\n" \ +{USItype __t0, __t1, __t2; \ + __asm__ (" mov %2, %5, lsr #16\n" \ " mov %0, %6, lsr #16\n" \ " bic %3, %5, %2, lsl #16\n" \ " bic %4, %6, %0, lsl #16\n" \ - diff --git a/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp b/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp index 590e6ca0e26c..f6d0109b7ed6 100644 --- a/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp +++ b/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp @@ -1,23 +1,19 @@ ---- SRC/pmlcg/pmlcg.cpp.orig 2018-10-22 19:39:18 UTC +--- SRC/pmlcg/pmlcg.cpp.orig 2021-04-08 18:13:59 UTC +++ SRC/pmlcg/pmlcg.cpp -@@ -853,14 +853,14 @@ int PMLCG::unpack_rng(char *packed) +@@ -804,13 +804,13 @@ int PMLCG::unpack_rng (char *packed) p += load_long64(p,8,&mult); p += load_long64(p,8,&x); #else /* No 64 bit type available */ -- p += load_int(p,4,&a_size); -+ p += load_int(p,4,(unsigned int *)&a_size); +- p += load_int (p, 4, &a_size); ++ p += load_int(p, 4, (unsigned int *)&a_size); -- p += load_intarray(p,2,4,&m); -- r[1] = m[1]&0xffffff; -+ p += load_intarray(p,2,4,(unsigned int *)&m); -+ r[1] = m[1]&0xffffff; - r[0] = m[1]>>24 | m[0]<<8; -- -- p += load_intarray(p,2,4,&m); -- a[1] = m[1]&0xffffff; -+ -+ p += load_intarray(p,2,4,(unsigned int *)&m); -+ a[1] = m[1]&0xffffff; - a[0] = m[1]>>24 | m[0]<<8; - #endif +- p += load_intarray (p, 2, 4, &m); ++ p += load_intarray(p, 2, 4, (unsigned int *)&m); + r[1] = m[1] & 0xffffff; + r[0] = m[1] >> 24 | m[0] << 8; +- p += load_intarray (p, 2, 4, &m); ++ p += load_intarray (p, 2, 4, (unsigned int *)&m); + a[1] = m[1] & 0xffffff; + a[0] = m[1] >> 24 | m[0] << 8; + #endif diff --git a/math/sprng/files/patch-TESTS_mpitests_wolff.cpp b/math/sprng/files/patch-TESTS_mpitests_wolff.cpp index 30e2f0d3ecda..1d6625645765 100644 --- a/math/sprng/files/patch-TESTS_mpitests_wolff.cpp +++ b/math/sprng/files/patch-TESTS_mpitests_wolff.cpp @@ -1,37 +1,37 @@ ---- TESTS/mpitests/wolff.cpp.orig 2011-08-06 15:58:22 UTC +--- TESTS/mpitests/wolff.cpp.orig 2021-01-15 16:37:36 UTC +++ TESTS/mpitests/wolff.cpp -@@ -14,7 +14,7 @@ using namespace std; +@@ -13,7 +13,7 @@ using namespace std; /*#define PARALLEL*/ -int lattice_size, *spin, *stack, nsites; +int lattice_size, *spin, *my_stack, nsites; - Sprng **genptr; /* array of random number generators */ + Sprng **genptr; /* array of random number generators */ int exponent, mask; /* Used for efficiency purposes */ double prob; -@@ -73,12 +73,12 @@ void Single_Cluster_Update(void) /* update lattice spi - if (genptr[i]->sprng() > prob) - continue; - spin[nnJ]=-spin[nnJ]; -- stack[++Ipt]=nnJ; -+ my_stack[++Ipt]=nnJ; - } - - if(Ipt>=0) - { -- i=stack[Ipt]; -+ i=my_stack[Ipt]; - Ipt--; - } - else i=-1; -@@ -216,8 +216,8 @@ void minitialize(int rng_type, int seed, int param, in - +@@ -80,12 +80,12 @@ void Single_Cluster_Update (void) /* update lattice sp + if (genptr[i]->sprng () > prob) + continue; + spin[nnJ] = -spin[nnJ]; +- stack[++Ipt] = nnJ; ++ my_stack[++Ipt] = nnJ; + } - spin = static_cast(malloc(nsites*sizeof(int))); -- stack = static_cast(malloc(nsites*sizeof(int))); -- if(!spin || !stack) -+ my_stack = static_cast(malloc(nsites*sizeof(int))); -+ if(!spin || !my_stack) - { - printf("\n\tMemory allocation failure, program exits!\n"); - exit(-1); + if (Ipt >= 0) + { +- i = stack[Ipt]; ++ i = my_stack[Ipt]; + Ipt--; + } + else +@@ -219,8 +219,8 @@ void minitialize (int rng_type, int seed, int param, i + Energy[i][j] = Cv[i][j] = 0.0; + + spin = static_cast (malloc (nsites * sizeof(int))); +- stack = static_cast (malloc (nsites * sizeof(int))); +- if (!spin || !stack) ++ my_stack = static_cast (malloc (nsites * sizeof(int))); ++ if (!spin || !my_stack) + { + printf ("\n\tMemory allocation failure, program exits!\n"); + exit (-1); diff --git a/math/sprng/files/patch-TESTS_wolff.cpp b/math/sprng/files/patch-TESTS_wolff.cpp index 7b5fcda07c83..fb13263bc10a 100644 --- a/math/sprng/files/patch-TESTS_wolff.cpp +++ b/math/sprng/files/patch-TESTS_wolff.cpp @@ -1,37 +1,37 @@ ---- TESTS/wolff.cpp.orig 2011-08-06 15:58:04 UTC +--- TESTS/wolff.cpp.orig 2021-01-15 16:35:52 UTC +++ TESTS/wolff.cpp -@@ -14,7 +14,7 @@ using namespace std; +@@ -13,7 +13,7 @@ using namespace std; /*#define PARALLEL*/ -int lattice_size, *spin, *stack, nsites; +int lattice_size, *spin, *my_stack, nsites; - Sprng **genptr; /* array of random number generators */ + Sprng **genptr; /* array of random number generators */ int exponent, mask; /* Used for efficiency purposes */ double prob; -@@ -73,12 +73,12 @@ void Single_Cluster_Update(void) /* update lattice spi - if (genptr[i]->sprng() > prob) - continue; - spin[nnJ]=-spin[nnJ]; -- stack[++Ipt]=nnJ; -+ my_stack[++Ipt]=nnJ; - } - - if(Ipt>=0) - { -- i=stack[Ipt]; -+ i=my_stack[Ipt]; - Ipt--; - } - else i=-1; -@@ -216,8 +216,8 @@ void minitialize(int rng_type, int seed, int param, in - +@@ -80,12 +80,12 @@ void Single_Cluster_Update (void) /* update lattice sp + if (genptr[i]->sprng () > prob) + continue; + spin[nnJ] = -spin[nnJ]; +- stack[++Ipt] = nnJ; ++ my_stack[++Ipt] = nnJ; + } - spin = static_cast(malloc(nsites*sizeof(int))); -- stack = static_cast(malloc(nsites*sizeof(int))); -- if(!spin || !stack) -+ my_stack = static_cast(malloc(nsites*sizeof(int))); -+ if(!spin || !my_stack) - { - printf("\n\tMemory allocation failure, program exits!\n"); - exit(-1); + if (Ipt >= 0) + { +- i = stack[Ipt]; ++ i = my_stack[Ipt]; + Ipt--; + } + else +@@ -219,8 +219,8 @@ void minitialize (int rng_type, int seed, int param, i + Energy[i][j] = Cv[i][j] = 0.0; + + spin = static_cast (malloc (nsites * sizeof(int))); +- stack = static_cast (malloc (nsites * sizeof(int))); +- if (!spin || !stack) ++ my_stack = static_cast (malloc (nsites * sizeof(int))); ++ if (!spin || !my_stack) + { + printf ("\n\tMemory allocation failure, program exits!\n"); + exit (-1); diff --git a/math/sprng/files/patch-TESTS_wolfftest.cpp b/math/sprng/files/patch-TESTS_wolfftest.cpp index dc897c35383e..348880e0b71c 100644 --- a/math/sprng/files/patch-TESTS_wolfftest.cpp +++ b/math/sprng/files/patch-TESTS_wolfftest.cpp @@ -1,37 +1,37 @@ ---- TESTS/wolfftest.cpp.orig 2009-06-13 21:46:10 UTC +--- TESTS/wolfftest.cpp.orig 2021-01-15 16:35:53 UTC +++ TESTS/wolfftest.cpp -@@ -14,7 +14,7 @@ using namespace std; +@@ -13,7 +13,7 @@ using namespace std; /*#define PARALLEL*/ -int lattice_size, *spin, *stack, nsites; +int lattice_size, *spin, *my_stack, nsites; - Sprng **genptr; /* array of random number generators */ + Sprng **genptr; /* array of random number generators */ int exponent, mask; /* Used for efficiency purposes */ double prob; -@@ -74,12 +74,12 @@ void Single_Cluster_Update(void) /* update lattice spi - if (genptr[i]->sprng() > prob) - continue; - spin[nnJ]=-spin[nnJ]; -- stack[++Ipt]=nnJ; -+ my_stack[++Ipt]=nnJ; - } - - if(Ipt>=0) - { -- i=stack[Ipt]; -+ i=my_stack[Ipt]; - Ipt--; - } - else i=-1; -@@ -217,8 +217,8 @@ void minitialize(int rng_type, int seed, int param, in - +@@ -81,12 +81,12 @@ void Single_Cluster_Update (void) /* update lattice sp + if (genptr[i]->sprng () > prob) + continue; + spin[nnJ] = -spin[nnJ]; +- stack[++Ipt] = nnJ; ++ my_stack[++Ipt] = nnJ; + } - spin = static_cast(malloc(nsites*sizeof(int))); -- stack = static_cast(malloc(nsites*sizeof(int))); -- if(!spin || !stack) -+ my_stack = static_cast(malloc(nsites*sizeof(int))); -+ if(!spin || !my_stack) - { - printf("\n\tMemory allocation failure, program exits!\n"); - exit(-1); + if (Ipt >= 0) + { +- i = stack[Ipt]; ++ i = my_stack[Ipt]; + Ipt--; + } + else +@@ -220,8 +220,8 @@ void minitialize (int rng_type, int seed, int param, i + Energy[i][j] = Cv[i][j] = 0.0; + + spin = static_cast (malloc (nsites * sizeof(int))); +- stack = static_cast (malloc (nsites * sizeof(int))); +- if (!spin || !stack) ++ my_stack = static_cast (malloc (nsites * sizeof(int))); ++ if (!spin || !my_stack) + { + printf ("\n\tMemory allocation failure, program exits!\n"); + exit (-1); diff --git a/math/sprng/pkg-plist b/math/sprng/pkg-plist index 68060d31f76a..072e2a436f1e 100644 --- a/math/sprng/pkg-plist +++ b/math/sprng/pkg-plist @@ -1,93 +1,69 @@ %%MPICH%%bin/2streams_mpi.tmp bin/FIPS_140_2.tmp bin/alphabit.tmp bin/bigCrush.tmp bin/check.ccmrg bin/check.clcg bin/check.clcg64 bin/check.clfg bin/check.cmlfg bin/check.cpmlcg -bin/check.fcmrg -bin/check.flcg -bin/check.flfg -bin/check.fmlfg -bin/check.fpmlcg bin/check_sim.ccmrg bin/check_sim.clcg bin/check_sim.clcg64 bin/check_sim.clfg bin/check_sim.cmlfg bin/check_sim.cpmlcg -bin/check_sim.fcmrg -bin/check_sim.flcg -bin/check_sim.flfg -bin/check_sim.fmlfg -bin/check_sim.fpmlcg bin/collisions.tmp bin/convert.tmp -bin/convertf.tmp bin/coupon.tmp bin/crush.tmp bin/equidist.tmp %%MPICH%%bin/fsprng-simple_mpi.tmp %%MPICH%%bin/fsprng_mpi.tmp bin/gap.tmp bin/libsprng.a bin/maxt.tmp %%MPICH%%bin/message-simple_mpi.tmp %%MPICH%%bin/message_mpi.tmp bin/metropolis.tmp bin/perm.tmp bin/pi-simple.tmp %%MPICH%%bin/pi-simple_mpi.tmp -bin/pif-simple.tmp bin/poker.tmp bin/rabbit.tmp bin/random_walk.tmp bin/runs.tmp bin/seed-simple.tmp %%MPICH%%bin/seed-simple_mpi.tmp bin/seed.tmp %%MPICH%%bin/seed_mpi.tmp -bin/seedf-simple.tmp -bin/seedf.tmp bin/serial.tmp bin/simple-simple.tmp -bin/simplef-simple.tmp bin/smallCrush.tmp bin/spawn.tmp -bin/spawnf.tmp bin/sprng-simple.tmp %%MPICH%%bin/sprng-simple_mpi.tmp bin/sprng.tmp %%MPICH%%bin/sprng_mpi.tmp -bin/sprngf-simple.tmp -bin/sprngf.tmp -bin/subroutinef.tmp bin/sum.tmp bin/time.ccmrg bin/time.clcg bin/time.clcg64 bin/time.clfg bin/time.cmlfg bin/time.cpmlcg -bin/time.fcmrg -bin/time.flcg -bin/time.flfg -bin/time.fmlfg -bin/time.fpmlcg bin/wolff.tmp bin/wolffind.tmp bin/wolfftest.tmp include/bignum.h include/cmrg.h include/lcg.h include/lcg64.h include/lfg.h include/mlfg.h include/pmlcg.h include/sprng.h include/sprng_cpp.h include/sprng_f.h lib/libsprng.a