From acb034e88bdfc53c5891e87d082893f9fd213f6b Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 18:53:31 +0200 Subject: [PATCH 1/8] Remove annoying warning in debug --- org/qmckl_error.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/org/qmckl_error.org b/org/qmckl_error.org index 0849de2..cecd42d 100644 --- a/org/qmckl_error.org +++ b/org/qmckl_error.org @@ -456,8 +456,19 @@ qmckl_get_error(qmckl_context context, qmckl_context_struct* const ctx = (qmckl_context_struct* const) context; assert (ctx != NULL); /* Impossible because the context is valid. */ +/* Turn off annoying GCC warning */ +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif + strncpy(function_name, ctx->error.function, QMCKL_MAX_FUN_LEN-1); strncpy(message , ctx->error.message , QMCKL_MAX_MSG_LEN-1); + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + (*exit_code) = ctx->error.exit_code; } qmckl_unlock(context); From f8e80b211313530f09bd1b9cb171dfc6dccefb36 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 18:54:48 +0200 Subject: [PATCH 2/8] Remove unused variables --- org/qmckl_sherman_morrison_woodbury.org | 2 -- 1 file changed, 2 deletions(-) diff --git a/org/qmckl_sherman_morrison_woodbury.org b/org/qmckl_sherman_morrison_woodbury.org index adc9ee0..9b4de48 100644 --- a/org/qmckl_sherman_morrison_woodbury.org +++ b/org/qmckl_sherman_morrison_woodbury.org @@ -211,7 +211,6 @@ The tests for the kernels are executed on datasets that are extracted from a run #+begin_src c :tangle (eval c_test) const uint64_t Dim = 21; -const uint64_t* N_updates_p = NULL; const double breakdown = 1e-3; const double tolerance = 1e-3; double res[441]; @@ -222,7 +221,6 @@ const double Updates1[21] = {-0.0068946573883295389, -0.024496730417013196, -0.2 const double Slater1[441] = {-2.8945870399475102, 3.5455725193023699, 2.0470812320709202, -3.5464441776275599, -2.0474903583526598, -2.89596366882324, -0.61329728364944502, 0.70991641283035301, 0.45664468407630898, 0.59523195028305098, 0.26079276204109197, -0.027727147564291999, -0.35093706846237199, -0.095610238611698206, -0.130077064037323, 0.10946778208017301, 0.021800471469759899, 0.048480678349733401, -0.092234551906585693, -0.0160505045205355, 0.0065372241660952603, -0.78021097183227495, -0.95558542013168302, -0.55174458026885997, -0.95579683780670199, -0.55179446935653698, 0.78044348955154397, -0.115299895405769, -0.11754634231329, -0.0318448171019554, -0.00082233443390577999, 0.064001239836216001, 0.12740932404995001, -0.049412809312343597, -0.074464745819568606, 0.19851659238338501, -0.088878795504569993, 0.135610401630402, -0.13736967742443101, -0.101879440248013, 0.102390937507153, 0.061368178576231003, -0.00527230883017182, 0.00029381641070358499, 0.0072919740341603799, -0.00026352208806201799, 0.0068838247098028703, 0.0047294595278799499, 0.11728889495134399, -0.062190085649490398, -0.15969239175319699, -0.10645916312933, 0.112943567335606, -0.0015487050404772199, -0.045737843960523598, 0.13196058571338701, 0.038660705089569099, -0.050266433507204097, -0.13745591044426, -0.037740666419267703, 0.11781705915927899, 0.19417031109332999, -0.0186148826032877, -0.30874741077423101, -0.37815779447555498, 0.218254208564758, 0.378139227628708, -0.21839827299118, -0.30879178643226601, 0.025539221242070202, 0.112043909728527, 0.037676706910133403, 0.025347150862216901, -0.19991625845432301, 0.14163509011268599, 0.13326919078826899, 0.213842943310738, 0.131471157073975, 0.14626120030879999, -0.0118067460134625, 0.093547157943248693, 0.22439678013324699, 0.0082425400614738499, -0.00068585784174501896, -1.52881526947021, -1.9163775505148799e-05, -2.1623263359069802, -1.5540548702119799e-05, 2.16284847259521, -1.52953028678894, -0.26402890682220498, 0.024944067001342801, -0.37140902876853898, -0.044071510434150703, -0.29843890666961698, -0.043834518641233403, -0.177285701036453, -0.058585006743669503, -0.0183692276477814, -0.026075478643178902, -0.15623773634433699, -0.011319605633616401, 0.054057534784078598, -0.23151709139347099, 0.10071966797113401, -0.067333526909351293, 0.00043256155913695698, 0.095035225152969402, -0.00043632232700474598, 0.094624765217304202, 0.066768139600753798, 0.14448715746402699, -0.12090456485748299, -0.203432962298393, -0.21472349762916601, 0.154288679361343, 0.017385326325893399, -0.071518480777740506, 0.27918133139610302, 0.080454014241695404, -0.0361245274543762, 0.0566458702087402, -0.030157707631588, 0.25150132179260298, -0.082445412874221802, -0.017144737765192999, -2.2779068946838401, -2.3393469746224599e-05, -3.2218937873840301, -1.7939200915861899e-05, 3.22278833389282, -2.2791447639465301, -0.47945570945739702, 0.045197278261184699, -0.64478874206543002, -0.080234304070472703, -0.47389149665832497, 0.024908870458602898, -0.23455648124218001, -0.10695217549800901, -0.033054649829864502, -0.195749551057816, -0.040076982229948002, 0.094596333801746396, 0.098401188850402804, -0.059563819319009802, 0.028169330209493599, -0.0025739683769643298, -0.0020174346864223502, -0.0024467820767313199, -0.00204527890309691, 0.00013988610589876801, 0.00073755031917244196, 0.17339251935482, 0.099962860345840496, 0.14622049033641801, -0.088966980576515198, 0.040044382214546197, -0.14437201619148299, -1.5416861060657501e-05, -0.081159926950931494, -0.11909016221761699, 0.170753449201584, 0.031124599277973199, -0.052109345793724102, 0.121445283293724, 0.0289684906601906, 0.0189813487231731, -0.0043673445470631097, -0.00014539182302542001, 0.0061219600029289696, 0.000189467871678062, 0.0060523007996380303, 0.00425094133242965, 0.0905451029539108, 0.058540407568216303, -0.15191346406936601, 0.11511342227459, 0.15016922354698201, 0.10024280846118901, -0.11066282540559801, -0.15089659392833699, -0.021995550021529201, 0.10021472722291901, 0.019932290539145501, 0.070281185209751101, -0.120184391736984, -0.030551897361874601, -0.023023990914225599, -0.0097634727135300602, 0.0119331693276763, -0.0068263513967394803, 0.011701960116624799, -0.0068089049309492103, 0.0095072658732533507, 0.133816182613373, -0.15090283751487699, 0.070243604481220204, 0.077758952975273105, -0.071993313729763003, -0.0526336021721363, -0.033549431711435297, -0.029018172994255999, 0.10475520789623299, 0.047332767397165298, 0.17077720165252699, 0.057527918368577999, -0.043988067656755399, 0.11077278107404701, -0.0581490993499756, -0.71565270423889205, 2.80283820757177e-05, 1.0121610164642301, -2.41986454057042e-05, 1.0123220682144201, 0.71586799621581998, -0.045286595821380601, -0.0269623268395662, 0.0683262273669243, -0.047560662031173699, -0.062597043812274905, -0.0278066452592611, 0.045772761106491103, 0.063010454177856404, 0.0197743345052004, -0.025724532082676901, -0.20542661845684099, -0.0248414911329746, 0.058127623051405002, 0.30385830998420699, 0.12407322973012901, -0.00073456991231069001, 0.000104061764432117, -0.0010063005611300501, 0.00014142321015242501, 0.00095045292982831597, -0.00064003589795902404, 0.056538689881563201, -0.038196403533220298, 0.095246985554695102, 0.077704243361949907, 0.089713566005229894, 0.071932643651962294, 0.058404259383678402, 0.097089007496833801, -1.8242251826450202e-05, -0.070699930191039997, 0.0231548044830561, 0.036239527165889698, -0.064700096845626803, 0.035663921386003501, -0.0192963760346174, -0.0285779368132353, 2.2119384368579599e-07, -0.0404084548354149, 4.62594880445977e-06, 0.040473498404025997, -0.028664523735642398, 0.0818745791912079, -0.0072916029021143896, 0.171691119670868, 0.0142411412671208, 0.227563425898552, 0.20764905214309701, 0.23875248432159399, 0.019401129335165, 0.0041248365305364097, -0.273390233516693, 0.031942136585712398, 0.24207504093647, -0.016599044203758202, 0.0499182641506195, -0.067969180643558502, -0.083720728754997295, -0.102523192763329, -0.059237916022539097, -0.10253403335809699, -0.0591498985886574, 0.083691440522670704, 0.093738317489623996, 0.118414394557476, 0.119053602218628, -0.19025875627994501, -0.017257452011108398, 0.111288614571095, -0.14737996459007299, -0.106449924409389, 0.119639433920383, -0.0358475148677826, 0.16083629429340399, -0.135845571756363, -0.045223556458950001, 0.129632458090782, 0.134273305535316, -0.0016409500967711199, 0.0020083498675376199, 0.0011536112288013101, -0.0019761291332542901, -0.0011378186754882301, -0.0015965295024216199, 0.062009602785110501, -0.085591755807399694, -0.073869466781616197, -0.129948750138283, -0.025633471086621298, 0.092304252088069902, 0.11476875841617599, 0.0570255033671856, -0.098354063928127303, 0.048130486160516697, -0.075562968850135803, -0.087558984756469699, -0.061446368694305399, 0.073952160775661496, -0.16332066059112499, -0.086937576532363905, -5.2227896958356703e-05, -0.12295132130384399, -5.67086790397298e-05, 0.122932203114033, -0.086922481656074496, 0.092386581003665896, 0.0563923679292202, 0.16267444193363201, -0.103307262063026, 0.177027583122253, 0.119934171438217, 0.15235325694084201, -0.13730293512344399, -0.036718469113111503, -0.13380806148052199, -0.14056211709976199, 0.11525499820709199, 0.122316166758537, -0.211628392338753, 0.13097538053989399, -0.71328485012054399, -0.87364697456359897, -0.50431287288665805, -0.87368428707122803, -0.50450080633163497, 0.71341556310653698, -0.0728774294257164, -0.0137394573539495, -0.131415024399757, 0.120499663054943, -0.15048809349536901, 0.067258194088935894, -0.016238121315836899, 0.25341770052909901, 0.061544414609670597, -0.124150305986404, -0.023104058578610399, 0.161576017737389, -0.18417926132678999, -0.016373874619603199, -0.0025253379717469198, -0.00358590018004179, -3.1569013572152501e-06, 0.00505110481753945, -1.33700987134944e-05, 0.0050756097771227403, 0.0036168387159705201, 0.076649472117423997, -0.0148532707244158, -0.15424914658069599, -0.031277053058147403, 0.20174449682235701, 0.17827098071575201, -0.21435502171516399, 0.043405968695879003, 0.0060502337291836704, 0.23922684788703899, 0.022777535021305102, 0.22072769701480899, 0.035028267651796299, -0.037091828882694203, -0.088090680539608002, -0.0137155568227172, -0.00072690693195909305, 0.019026592373848, 0.00073597067967057196, 0.018235495314001999, 0.012611641548574, 0.14907942712307001, 0.10721461474895499, -0.205590710043907, 0.18899101018905601, 0.14405034482479101, 0.0080890702083706908, -0.049517802894115399, -0.23817741870880099, -0.062822751700878102, -0.056222390383482, 0.079762905836105305, -0.057780988514423398, -0.208331778645515, -0.11229432374239, 0.015691248700022701, -0.13207408785819999, -0.00012266315752640399, -0.18668732047080999, -0.000116608949610963, 0.18647037446498901, -0.13181127607822399, 0.17992316186428101, 0.0310163982212543, 0.194987177848816, -0.051282022148370701, 0.079243704676628099, -0.16229276359081299, -0.029616238549351699, -0.065854735672473894, -0.025143278762698201, 0.277732163667679, -0.117880158126354, -0.184251189231873, 0.0632317289710045, -0.16761179268360099, 0.0069939070381224199, -0.0068073021247982996, -0.0083365431055426598, 0.0048150913789868398, 0.0083073899149894697, -0.0047997133806347804, -0.0067770029418170504, 0.077614806592464405, 0.12953585386276201, -0.063416801393032102, 0.138088583946228, -0.10224375873804099, 0.130568191409111, 0.164952263236046, 0.026345754042267799, 0.13718618452549, 0.084768116474151597, 0.096043966710567502, -0.054612904787063599, 0.138456135988235, -0.071488708257675199, 0.070078171789646093}; double Slater_inv1[441] = {-0.0525082963130096, -192.960477122746, -167.343357271998, 1.69063377058866, -1378.4882402189, 239.360652372684, 874.40192183061697, -513.31846478968203, 807.35483045933495, -19.026422090297299, -17.824591748935202, 165.6645926386, -332.909289060628, -18.6107453916377, -11.6439930601979, 317.18559450822198, 214.12532640356201, -430.80943299473, -344.65005510575799, 740.81014093255203, -84.923325284754696, 0.064335245989650805, 234.71397330210399, 205.1186636226, -3.4153770027768502, 1680.13890084581, -293.40065007215702, -1065.8419078679401, 624.86259814866003, -989.76729197131897, 23.298249286417001, 21.573213707404399, -202.41174445438401, 405.86421806904502, 22.922945938042901, 14.236362125535999, -386.65825218682801, -261.06337565261498, 528.20337075570103, 421.94063881187702, -902.75507799084596, 105.03985525163, 0.044200668381308601, -138.85152101714399, -121.27002019292, 2.0061662585667599, -992.69022926063894, 173.24384564131401, 629.63518796071799, -369.68832373377103, 582.99742710801104, -13.474468953452901, -12.4187314531643, 119.002229516372, -239.76386110607999, -13.4968690647037, -8.1499663302329708, 228.499936475189, 154.09732894897101, -311.21651724011002, -248.26815844269399, 533.37480106787098, -61.991136485706697, -0.0765497914729725, 240.772681546397, 209.115172008988, -2.12401058528051, 1722.15420882834, -299.07379390801702, -1092.4670851015201, 641.09661184520598, -1007.44097957056, 23.333413806919001, 21.9897514440317, -206.53257016044699, 415.81861108697302, 23.3743606050752, 14.107639254523001, -396.52477956346598, -267.77854087146301, 537.68662188870303, 429.83533323670702, -925.65731644586003, 106.070284414301, -0.037109975520249097, -136.738457148886, -118.917063549582, 1.19704609156923, -977.22998951029899, 169.63000196416201, 620.01253859081601, -364.02043006288699, 570.85982682561803, -13.451266756380299, -12.146454471873501, 117.435790064483, -235.687342903548, -13.183975346097, -8.2288378293500593, 224.66974233421601, 151.73703725446899, -304.613662218336, -243.40661913323399, 525.55077671846004, -60.142862384234697, -0.062476778936209301, 195.74640208908301, 170.54051550313201, -2.8328765312753998, 1399.12576024585, -244.28628529648901, -887.63077081451104, 520.884480704167, -823.92607500410702, 19.0479002693959, 18.195743596123101, -168.030291787452, 337.586201042798, 18.991146825575299, 11.5224539224244, -321.78784999564101, -217.23371709456501, 439.82292557372398, 351.28300986264401, -752.091241883468, 87.457548717202599, 4.3572379528639997e-05, -23.790404094575401, -19.504220922406098, 0.26595531593048999, -161.34910319146201, 30.163156787264001, 102.337776116854, -58.672051676794297, 103.227708063905, -0.22802366652163999, -2.2306129106953398, 21.778747237132102, -40.783330246607299, -1.38732280869919, -0.75357165711863805, 39.269880423319599, 26.312297182321299, -55.061514171221297, -43.569942636118199, 85.973367077774896, -10.016061028885201, 4.0427159001010801e-05, 28.392374743152502, 26.373254860492299, -0.36980926031100297, 209.22398819265001, -37.9473984838014, -132.76472733653301, 77.720615205630693, -127.924723556082, 0.29745864731730998, 2.7793514223195599, -29.019189334306802, 53.826499495808498, 4.2582570650914597, 0.51526747227423098, -50.914050124737102, -31.724328055085401, 68.0683646567051, 55.266627392249198, -110.63482872154501, 14.1152956761065, 0.00055720168222872903, -2.6345228739497299, -3.4087974363069198, 0.048641237778327802, -18.3623844122964, 3.8195276251277801, 11.6411523542838, -5.8812824661877396, 15.735088038012799, -0.058858662594294599, -0.23845780430312999, 6.5124119812799099, -6.1494099868393697, 0.340564236694477, -0.880332042883611, 5.7252222161672197, 2.8545094725865199, -8.3447036743893506, -8.0497901808946395, 9.3503553819376606, -1.76541796469797, 0.00098753020434672305, -4.6360828892267198, -4.7638931470942598, 0.052453544062221497, -34.4916331053766, 7.7511206271403301, 21.997597399118899, -10.6934789694381, 32.345600850876203, -0.10706305963427901, -0.54284354835464799, 12.037079682564, -12.6961140374279, -1.7388931639227301, -1.8407110220006899, 10.3197626100112, 5.2986332905796001, -16.735105713526099, -14.146077371772099, 15.8344011098352, -1.6714914906603899, -4.8622590537520702e-05, 21.991930004831101, 18.4929481874854, -0.23309077760739899, 151.30678790823001, -25.711826077506299, -96.044580982176896, 55.801793853982701, -88.373121372798394, 0.202838254384864, 1.86718437434255, -20.278044655055201, 40.151563308198597, 1.3977678891012399, 0.324629892441265, -37.6766500842932, -24.340233848932201, 47.6840523743628, 38.2032083073968, -79.164159949210401, 8.7548536140586801, -0.00061993571816668601, -0.395895385274183, -1.4644468265008701, -0.0046318612148825598, -4.9913109472233304, 1.48540197873744, 3.26672618350988, -0.95752411931703396, 8.9569370743490193, -0.062041348029879102, -0.080157437015122804, 8.0102582504767295, -5.9688675669055504, 0.67530938859376199, 1.27437097858607, 5.0084164430027203, 0.35632315612076498, -3.3504197552733501, -4.6662276852701501, -0.607157596121083, 0.48644342530280699, -0.00097211385626449695, 4.8383102174293198, 5.4067550135312503, -0.10295717451613901, 29.4184191533957, -9.4450875338250793, -18.800441303291901, 8.5840933132932609, -37.118301659976296, 0.106267952523929, 0.66461896188866798, -11.4398182377096, 13.0631130369628, -0.68992479801260798, 1.9745973431694701, -10.3210596342876, -5.2304303953711804, 18.385374172705902, 17.020178998151501, -12.315621520081001, 3.7778248703987298, -0.00031338187670125201, 12.870239622711001, 12.0022872209785, -0.16605346741786001, 96.046941246958397, -16.9389614709639, -60.935799758442698, 35.1352737141356, -61.591085318216102, 0.111297136966112, 1.23095348877198, -10.067914675180299, 24.0397569908422, 1.55026659084186, 0.71351574089035996, -23.902604464805101, -14.335678342218401, 32.573495764200203, 25.978026199263301, -50.506323253986302, 6.2999821545807402, 0.00078010309855064104, -5.4500389454791298, -2.8881970061941198, 0.034137151949219097, -36.693158530832299, 5.3229408635849698, 23.065511761726999, -18.654750377009499, 16.655427409154399, 0.0120347437456702, -0.40190064848770302, -4.3952667136196499, -3.2283315530947299, 0.535114819933451, -1.6695636399303999, 4.8387109899640901, 5.9387464984757097, -9.2525260067921593, -7.0534068376986703, 24.6079478080533, -1.24249543569277, -0.00048592251459139902, 2.8352295963632699, 2.97576788056818, -0.061903426111554402, 15.662499828725799, -6.3594611155842697, -10.0297611955082, 4.4512302388898801, -22.9014624835775, 0.0522795583755256, 0.46237084970893699, -5.9599628993498204, 6.3134697655201197, -0.35523986461548501, 1.1938822885348901, -6.1222818696018599, -3.0697099757554498, 13.1385066502153, 10.0165667609847, -5.6534055293581504, 2.2982459946613698, 5.71641932114923e-05, -1.95937881355126, -3.1686710464991501, 0.0078900256254279908, -20.7802266137845, 1.9052049215289899, 13.243728372567, -7.2010122960325198, -1.78569599703996, -0.0023099999984344298, -0.181452511231602, 1.49235850994062, -3.4781928086271598, -0.25097197027097001, 0.034267435208927201, 2.9589361689912899, 2.1880246525605398, 0.40946783452396801, 1.85119165819145, 10.9769363093921, -0.49737197226351498, 0.00057014015696656801, -11.992703942957201, -9.1707599397024797, 0.13131957021746299, -80.913738884742898, 12.2802670275716, 51.275110674413497, -30.8846663544597, 40.768216707846101, -0.056350552707040001, -0.906909874969271, 4.5662724440002496, -16.493313057723601, -1.3954832548549501, -1.1309540462973, 17.671878079289101, 13.348292143643, -21.057182826114602, -17.2839203520208, 44.417018731905799, -5.1700529859646398, 0.00070585484241785499, -3.84393110623766, -3.8217546887026601, 0.042692631956155899, -33.103657623136797, 7.29987823117549, 21.1351246026951, -8.9046379168685696, 25.840620537279499, -0.077726091155589205, -0.51813471867742, 9.6014602253082906, -12.721891663249099, -1.51539376366047, -1.54216689848713, 11.448584843886, 4.4017938077693604, -13.490798207962101, -12.3088359993453, 13.904387711973399, -1.27899798343336, -4.8529590100271397e-05, 1.5144453784960501, 2.3396824932439499, -0.0087660084169081508, 9.4873136503254205, -1.65331055509645, -5.9367044032646401, 5.0146643904078898, -0.269092370588084, 0.0089905796176170498, 0.14805840549764701, -0.89101366694270501, 3.0317998491567302, 0.22142707740346401, 0.0064304970181167601, -3.4235077646052301, -1.69328028781498, 0.48844632252065601, -0.57157344288643996, -5.8659323559885497, 0.45402791645044299, 3.1177001030445297e-05, -2.4386266852651501, -0.31040563209251798, 0.0039504037521311498, -21.849203607580201, -0.45787097219896, 13.8161508224212, -9.4311122174081508, -5.4786114733527702, -0.0069717560537701602, 0.0049075772339915403, 1.65968311111433, -4.9313027452898597, -0.39825841496395797, 0.056303363068839998, 4.9803632483141103, 2.7343202713150898, 2.3452757571679799, 3.3498732374241098, 12.4790131924658, -0.41615992378439798}; -const uint64_t N_updates2 = 2; const uint64_t Updates_index2[2] = {20, 21}; const double Updates2[42] = {-0.012056605890393198, 0.072118259966373, -0.14986032247543299, -0.023892195895314251, 0.2306191368843431, 0.070976656861603302, 0.059228850266663378, -0.0081594046205282003, 0.03775668889284136, -0.32248186320066397, -0.30175055470317586, -0.048578753136098399, -0.050512738234829151, 0.074964269995690003, 0.022375471889972701, 0.20063611492514641, -0.013817949220538101, 0.034675425849854905, 0.14269321411848099, 0.16303040878847203, 0.20520395040512121, 0.027209745720028898, -0.019752152264117806, 0.24686626344919221, 0.021544795483350802, 0.0053255971870385145, -0.074287162162363515, 0.0020896954229101539, -0.0015901625156403004, 0.045653678011149175, -0.095019596163183437, 0.015724316006526361, 0.057632524985820083, 0.0043175870669074383, -0.075611688196659296, -0.2787729352712634, 0.071667610667645931, -0.0016040895134210986, -0.018613442778587338, 0.16365851461887351, 0.018654582090675831, -0.43227782845497098}; const double Slater2[441] = {-2.8945870399475102, 3.5455725193023699, 2.0470812320709202, -3.5464441776275599, -2.0474903583526598, -2.89596366882324, -0.61329728364944502, 0.70991641283035301, 0.45664468407630898, 0.59523195028305098, 0.26079276204109197, -0.027727147564291999, -0.35093706846237199, -0.095610238611698206, -0.130077064037323, 0.10946778208017301, 0.021800471469759899, 0.048480678349733401, -0.092234551906585693, -0.028107110410928698, 0.013431881554424799, -0.78021097183227495, -0.95558542013168302, -0.55174458026885997, -0.95579683780670199, -0.55179446935653698, 0.78044348955154397, -0.115299895405769, -0.11754634231329, -0.0318448171019554, -0.00082233443390577999, 0.064001239836216001, 0.12740932404995001, -0.049412809312343597, -0.074464745819568606, 0.19851659238338501, -0.088878795504569993, 0.135610401630402, -0.13736967742443101, -0.101879440248013, 0.174509197473526, 0.085864908993244199, -0.00527230883017182, 0.00029381641070358499, 0.0072919740341603799, -0.00026352208806201799, 0.0068838247098028703, 0.0047294595278799499, 0.11728889495134399, -0.062190085649490398, -0.15969239175319699, -0.10645916312933, 0.112943567335606, -0.0015487050404772199, -0.045737843960523598, 0.13196058571338701, 0.038660705089569099, -0.050266433507204097, -0.13745591044426, -0.037740666419267703, 0.11781705915927899, 0.044309988617896999, 0.215069741010666, -0.30874741077423101, -0.37815779447555498, 0.218254208564758, 0.378139227628708, -0.21839827299118, -0.30879178643226601, 0.025539221242070202, 0.112043909728527, 0.037676706910133403, 0.025347150862216901, -0.19991625845432301, 0.14163509011268599, 0.13326919078826899, 0.213842943310738, 0.131471157073975, 0.14626120030879999, -0.0118067460134625, 0.093547157943248693, 0.22439678013324699, -0.015649655833840401, 0.011034868657589, -1.52881526947021, -1.9163775505148799e-05, -2.1623263359069802, -1.5540548702119799e-05, 2.16284847259521, -1.52953028678894, -0.26402890682220498, 0.024944067001342801, -0.37140902876853898, -0.044071510434150703, -0.29843890666961698, -0.043834518641233403, -0.177285701036453, -0.058585006743669503, -0.0183692276477814, -0.026075478643178902, -0.15623773634433699, -0.011319605633616401, 0.054057534784078598, -0.00089795450912788499, 0.0060455044731497799, -0.067333526909351293, 0.00043256155913695698, 0.095035225152969402, -0.00043632232700474598, 0.094624765217304202, 0.066768139600753798, 0.14448715746402699, -0.12090456485748299, -0.203432962298393, -0.21472349762916601, 0.154288679361343, 0.017385326325893399, -0.071518480777740506, 0.27918133139610302, 0.080454014241695404, -0.0361245274543762, 0.0566458702087402, -0.030157707631588, 0.25150132179260298, -0.0114687560126185, -0.066873423755168901, -2.2779068946838401, -2.3393469746224599e-05, -3.2218937873840301, -1.7939200915861899e-05, 3.22278833389282, -2.2791447639465301, -0.47945570945739702, 0.045197278261184699, -0.64478874206543002, -0.080234304070472703, -0.47389149665832497, 0.024908870458602898, -0.23455648124218001, -0.10695217549800901, -0.033054649829864502, -0.195749551057816, -0.040076982229948002, 0.094596333801746396, 0.098401188850402804, -0.000334969052346423, 0.0023343940265476699, -0.0025739683769643298, -0.0020174346864223502, -0.0024467820767313199, -0.00204527890309691, 0.00013988610589876801, 0.00073755031917244196, 0.17339251935482, 0.099962860345840496, 0.14622049033641801, -0.088966980576515198, 0.040044382214546197, -0.14437201619148299, -1.5416861060657501e-05, -0.081159926950931494, -0.11909016221761699, 0.170753449201584, 0.031124599277973199, -0.052109345793724102, 0.121445283293724, 0.020809086039662399, -0.039619617164135, -0.0043673445470631097, -0.00014539182302542001, 0.0061219600029289696, 0.000189467871678062, 0.0060523007996380303, 0.00425094133242965, 0.0905451029539108, 0.058540407568216303, -0.15191346406936601, 0.11511342227459, 0.15016922354698201, 0.10024280846118901, -0.11066282540559801, -0.15089659392833699, -0.021995550021529201, 0.10021472722291901, 0.019932290539145501, 0.070281185209751101, -0.120184391736984, 0.0072047915309667596, 0.043619588017463698, -0.0097634727135300602, 0.0119331693276763, -0.0068263513967394803, 0.011701960116624799, -0.0068089049309492103, 0.0095072658732533507, 0.133816182613373, -0.15090283751487699, 0.070243604481220204, 0.077758952975273105, -0.071993313729763003, -0.0526336021721363, -0.033549431711435297, -0.029018172994255999, 0.10475520789623299, 0.047332767397165298, 0.17077720165252699, 0.057527918368577999, -0.043988067656755399, -0.21170908212661699, 0.0024762949906289599, -0.71565270423889205, 2.80283820757177e-05, 1.0121610164642301, -2.41986454057042e-05, 1.0123220682144201, 0.71586799621581998, -0.045286595821380601, -0.0269623268395662, 0.0683262273669243, -0.047560662031173699, -0.062597043812274905, -0.0278066452592611, 0.045772761106491103, 0.063010454177856404, 0.0197743345052004, -0.025724532082676901, -0.20542661845684099, -0.0248414911329746, 0.058127623051405002, 0.00210775528103113, 0.0140155302360654, -0.00073456991231069001, 0.000104061764432117, -0.0010063005611300501, 0.00014142321015242501, 0.00095045292982831597, -0.00064003589795902404, 0.056538689881563201, -0.038196403533220298, 0.095246985554695102, 0.077704243361949907, 0.089713566005229894, 0.071932643651962294, 0.058404259383678402, 0.097089007496833801, -1.8242251826450202e-05, -0.070699930191039997, 0.0231548044830561, 0.036239527165889698, -0.064700096845626803, -0.012914831750094899, 0.058629415929317502, -0.0285779368132353, 2.2119384368579599e-07, -0.0404084548354149, 4.62594880445977e-06, 0.040473498404025997, -0.028664523735642398, 0.0818745791912079, -0.0072916029021143896, 0.171691119670868, 0.0142411412671208, 0.227563425898552, 0.20764905214309701, 0.23875248432159399, 0.019401129335165, 0.0041248365305364097, -0.273390233516693, 0.031942136585712398, 0.24207504093647, -0.016599044203758202, -0.00059447408420965097, 0.00458275340497494, -0.083720728754997295, -0.102523192763329, -0.059237916022539097, -0.10253403335809699, -0.0591498985886574, 0.083691440522670704, 0.093738317489623996, 0.118414394557476, 0.119053602218628, -0.19025875627994501, -0.017257452011108398, 0.111288614571095, -0.14737996459007299, -0.106449924409389, 0.119639433920383, -0.0358475148677826, 0.16083629429340399, -0.135845571756363, -0.045223556458950001, 0.204596728086472, 0.091698803007602706, -0.0016409500967711199, 0.0020083498675376199, 0.0011536112288013101, -0.0019761291332542901, -0.0011378186754882301, -0.0015965295024216199, 0.062009602785110501, -0.085591755807399694, -0.073869466781616197, -0.129948750138283, -0.025633471086621298, 0.092304252088069902, 0.11476875841617599, 0.0570255033671856, -0.098354063928127303, 0.048130486160516697, -0.075562968850135803, -0.087558984756469699, -0.061446368694305399, 0.096327632665634197, -0.084247380495071397, -0.086937576532363905, -5.2227896958356703e-05, -0.12295132130384399, -5.67086790397298e-05, 0.122932203114033, -0.086922481656074496, 0.092386581003665896, 0.0563923679292202, 0.16267444193363201, -0.103307262063026, 0.177027583122253, 0.119934171438217, 0.15235325694084201, -0.13730293512344399, -0.036718469113111503, -0.13380806148052199, -0.14056211709976199, 0.11525499820709199, 0.122316166758537, -0.0109922774136066, 0.077829994261264801, -0.71328485012054399, -0.87364697456359897, -0.50431287288665805, -0.87368428707122803, -0.50450080633163497, 0.71341556310653698, -0.0728774294257164, -0.0137394573539495, -0.131415024399757, 0.120499663054943, -0.15048809349536901, 0.067258194088935894, -0.016238121315836899, 0.25341770052909901, 0.061544414609670597, -0.124150305986404, -0.023104058578610399, 0.161576017737389, -0.18417926132678999, -0.0301918238401413, -0.017013777047395699, -0.00358590018004179, -3.1569013572152501e-06, 0.00505110481753945, -1.33700987134944e-05, 0.0050756097771227403, 0.0036168387159705201, 0.076649472117423997, -0.0148532707244158, -0.15424914658069599, -0.031277053058147403, 0.20174449682235701, 0.17827098071575201, -0.21435502171516399, 0.043405968695879003, 0.0060502337291836704, 0.23922684788703899, 0.022777535021305102, 0.22072769701480899, 0.035028267651796299, -0.0024164030328393, -0.017579320818185799, -0.0137155568227172, -0.00072690693195909305, 0.019026592373848, 0.00073597067967057196, 0.018235495314001999, 0.012611641548574, 0.14907942712307001, 0.10721461474895499, -0.205590710043907, 0.18899101018905601, 0.14405034482479101, 0.0080890702083706908, -0.049517802894115399, -0.23817741870880099, -0.062822751700878102, -0.056222390383482, 0.079762905836105305, -0.057780988514423398, -0.208331778645515, 0.030398890376091, 0.14741712808609, -0.13207408785819999, -0.00012266315752640399, -0.18668732047080999, -0.000116608949610963, 0.18647037446498901, -0.13181127607822399, 0.17992316186428101, 0.0310163982212543, 0.194987177848816, -0.051282022148370701, 0.079243704676628099, -0.16229276359081299, -0.029616238549351699, -0.065854735672473894, -0.025143278762698201, 0.277732163667679, -0.117880158126354, -0.184251189231873, 0.0632317289710045, -0.0045813838951289697, 0.024331344291567799, -0.0068073021247982996, -0.0083365431055426598, 0.0048150913789868398, 0.0083073899149894697, -0.0047997133806347804, -0.0067770029418170504, 0.077614806592464405, 0.12953585386276201, -0.063416801393032102, 0.138088583946228, -0.10224375873804099, 0.130568191409111, 0.164952263236046, 0.026345754042267799, 0.13718618452549, 0.084768116474151597, 0.096043966710567502, -0.054612904787063599, 0.138456135988235, 0.13371524214744601, -0.19178953766822801}; From f2b1c76e39feec8dd9b875ef2217468d63365847 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 19:49:07 +0200 Subject: [PATCH 3/8] Update gh-pages.yml --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index abed670..3b90893 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -24,7 +24,7 @@ jobs: run: ./autogen.sh - name: ./configure - run: QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode + run: QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode --without-trexio - name: make run: make -j 8 html From 4a3a169e03ecdc2c33f9d1e4644b4753d1282768 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 18:57:40 +0200 Subject: [PATCH 4/8] Less verbose output when tangling --- tools/tangle.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/tangle.sh b/tools/tangle.sh index 0f28038..7e402b6 100755 --- a/tools/tangle.sh +++ b/tools/tangle.sh @@ -35,8 +35,12 @@ do tangled=${i%.org}.tangled tangled=$(dirname $tangled)/.$(basename $tangled) NOW=$(date +"%m%d%H%M.%S") - tangle ${i} > $tangled - + tangle ${i} &> $tangled + rc=$? + if [[ $rc -ne 0 ]] ; then + cat $tangled + exit rc + fi # Make log file older than the tangled files touch -t ${NOW} $tangled done From 08f13d29b4b8ffbd8f967e80eeda3d40c1b26ee6 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 21:39:08 +0200 Subject: [PATCH 5/8] Cleaning tangle --- tools/build_doc.sh | 9 ++++++++- ci_install.sh => tools/ci_install.sh | 0 tools/tangle.sh | 5 +++-- 3 files changed, 11 insertions(+), 3 deletions(-) rename ci_install.sh => tools/ci_install.sh (100%) diff --git a/tools/build_doc.sh b/tools/build_doc.sh index 37935dd..c49a365 100755 --- a/tools/build_doc.sh +++ b/tools/build_doc.sh @@ -36,10 +36,17 @@ do exported=${i%.org}.exported exported=$(dirname $exported)/.$(basename $exported) NOW=$(date +"%m%d%H%M.%S") - extract_doc ${i} > $exported + extract_doc ${i} &> $exported + rc=$? # Make log file older than the exported files touch -t ${NOW} $exported + + # Fail if tangling failed + if [[ $rc -ne 0 ]] ; then + cat $exported + exit rc + fi done diff --git a/ci_install.sh b/tools/ci_install.sh similarity index 100% rename from ci_install.sh rename to tools/ci_install.sh diff --git a/tools/tangle.sh b/tools/tangle.sh index 7e402b6..ebd1929 100755 --- a/tools/tangle.sh +++ b/tools/tangle.sh @@ -37,10 +37,11 @@ do NOW=$(date +"%m%d%H%M.%S") tangle ${i} &> $tangled rc=$? + # Make log file older than the tangled files + touch -t ${NOW} $tangled + # Fail if tangling failed if [[ $rc -ne 0 ]] ; then cat $tangled exit rc fi - # Make log file older than the tangled files - touch -t ${NOW} $tangled done From 2587a046de3ff64d5996b10e697fa85096417ff6 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 21:40:14 +0200 Subject: [PATCH 6/8] Fixed #48 --- .github/workflows/test-build.yml | 13 ++++++++---- .github/workflows/vfc_test_workflow.yml | 10 +++++++++ Makefile.am | 28 ++++++++----------------- org/qmckl_ao.org | 12 ++++++++++- org/qmckl_distance.org | 4 ++-- org/qmckl_electron.org | 9 ++++++++ org/qmckl_jastrow.org | 9 ++++++++ org/qmckl_memory.org | 10 +++++++++ org/qmckl_mo.org | 9 ++++++++ org/qmckl_nucleus.org | 9 ++++++++ vfc_tests_config.json | 2 +- 11 files changed, 88 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index c83023a..9dc27d6 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -14,11 +14,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install dependencies run: sudo apt-get install emacs autoconf libhdf5-dev + - name: Install trexio run: | - # TODO: Update the following link when v1.1 will be released export VERSION=1.1.0 wget https://github.com/TREX-CoE/trexio/releases/download/v${VERSION}/trexio-${VERSION}.tar.gz tar -zxf trexio-${VERSION}.tar.gz @@ -26,32 +27,36 @@ jobs: ./configure --prefix=/usr make -j 8 sudo make install + - name: Build run: | ./autogen.sh QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode --enable-debug make -j 8 + - name: Run test run: | make -j check - ldd tests/test_qmckl_ao + - name: Archive test log file if: failure() uses: actions/upload-artifact@v2 with: name: test-report path: test-suite.log + - name: Dist test run: | make distcheck + - name: Archive test log file if: failure() uses: actions/upload-artifact@v2 with: name: dist-report path: test-suite.log - - + + # x86_macos: # # runs-on: macos-latest diff --git a/.github/workflows/vfc_test_workflow.yml b/.github/workflows/vfc_test_workflow.yml index cd63ec5..bdf7897 100644 --- a/.github/workflows/vfc_test_workflow.yml +++ b/.github/workflows/vfc_test_workflow.yml @@ -27,6 +27,16 @@ jobs: apt update apt -y install emacs pkg-config + - name: Install trexio + run: | + export VERSION=1.1.0 + wget https://github.com/TREX-CoE/trexio/releases/download/v${VERSION}/trexio-${VERSION}.tar.gz + tar -zxf trexio-${VERSION}.tar.gz + cd trexio-${VERSION} + ./configure --prefix=/usr + make -j 8 + sudo make install + - name: Run tests run: vfc_ci test -g -r diff --git a/Makefile.am b/Makefile.am index 5249142..802c8ea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,10 +30,6 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -if VFC_CI -AM_LDFLAGS=-lvfc_probes -lvfc_probes_f -endif - ACLOCAL_AMFLAGS = -I m4 VERSION_MAJOR = @VERSION_MAJOR@ @@ -41,7 +37,7 @@ VERSION_MINOR = @VERSION_MINOR@ VERSION_PATCH = @VERSION_PATCH@ SUBDIRS = -CLEANFILES = qmckl.mod qmckl_probes_f.mod +CLEANFILES = qmckl.mod qmckl_verificarlo_f.mod EXTRA_DIST = pkgconfigdir = $(libdir)/pkgconfig @@ -56,7 +52,6 @@ test_qmckl_fo = tests/qmckl_f.o src_qmckl_f = src/qmckl_f.f90 src_qmckl_fo = src/qmckl_f.o header_tests = tests/chbrclf.h tests/n2.h -qmckl_probes_src = src/qmckl_probes.h src/qmckl_probes.c src/qmckl_probes_f.f90 fortrandir = $(datadir)/qmckl/fortran/ @@ -68,7 +63,7 @@ AM_CPPFLAGS += -DQMCKL_TEST_DIR="\"$(abs_srcdir)/share/qmckl/test_data/\"" lib_LTLIBRARIES = src/libqmckl.la -src_libqmckl_la_SOURCES = $(qmckl_h) $(src_qmckl_f) $(C_FILES) $(F_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES) $(header_tests) $(qmckl_probes_src) +src_libqmckl_la_SOURCES = $(qmckl_h) $(src_qmckl_f) $(C_FILES) $(F_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES) $(header_tests) export qmckl_f qmckl_h srcdir @@ -99,15 +94,6 @@ $(src_qmckl_fo): $(src_qmckl_f) $(src_qmckl_f): $(srcdir)/$(qmckl_f) cp $(srcdir)/$(qmckl_f) $(src_qmckl_f) -src/qmckl_probes.c: - cp $(srcdir)/tools/qmckl_probes.c $(srcdir)/src/qmckl_probes.c - -src/qmckl_probes.h: - cp $(srcdir)/tools/qmckl_probes.h $(srcdir)/src/qmckl_probes.h - -src/qmckl_probes_f.f90: - cp $(srcdir)/tools/qmckl_probes_f.f90 $(srcdir)/src/qmckl_probes_f.f90 - share/doc/qmckl/html/index.html: share/doc/qmckl/html/README.html $(ln_s_verbose)cd share/doc/qmckl/html/ && \ rm -rf index.html && \ @@ -122,11 +108,16 @@ doc: html text if QMCKL_DEVEL + +if VFC_CI +AM_LDFLAGS=-lvfc_probes -lvfc_probes_f +endif + dist_src_DATA = $(ORG_FILES) $(TANGLED_FILES) $(EXPORTED_FILES) BUILT_SOURCES = $(C_FILES) $(F_FILES) $(FH_FUNC_FILES) $(FH_TYPE_FILES) $(H_FUNC_FILES) $(H_TYPE_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES) $(qmckl_f) $(qmckl_h) $(header_tests) -CLEANFILES += $(BUILT_SOURCES) $(C_TEST_FILES) $(F_TEST_FILES) $(TANGLED_FILES) $(C_TEST_FILES) $(F_TEST_FILES) $(qmckl_f) $(qmckl_h) $(HTML_FILES) $(TEXT_FILES) share/doc/qmckl/html/index.html $(EXPORTED_FILES) $(header_tests) +CLEANFILES += $(BUILT_SOURCES) $(C_TEST_FILES) $(F_TEST_FILES) $(TANGLED_FILES) $(C_TEST_FILES) $(F_TEST_FILES) $(qmckl_f) $(qmckl_h) $(HTML_FILES) $(TEXT_FILES) share/doc/qmckl/html/index.html $(EXPORTED_FILES) $(header_tests) EXTRA_DIST += \ $(srcdir)/tools/build_doc.sh \ @@ -151,7 +142,7 @@ export_verbose_0 = @echo " DOC $@"; tangle_verbose = $(tangle_verbose_@AM_V@) tangle_verbose_ = $(tangle_verbose_@AM_DEFAULT_V@) -tangle_verbose_0 = @echo " TANGLE $<"; +tangle_verbose_0 = @echo " ORG $<"; cat_h_verbose = $(cat_h_verbose_@AM_V@) cat_h_verbose_ = $(cat_h_verbose_@AM_DEFAULT_V@) @@ -190,7 +181,6 @@ cppcheck.out: $(qmckl_h) --language=c --std=c99 -rp --platform=unix64 \ -I../include *.c *.h 2>../$@ - .PHONY: cppcheck endif diff --git a/org/qmckl_ao.org b/org/qmckl_ao.org index 153cd4d..0807e83 100644 --- a/org/qmckl_ao.org +++ b/org/qmckl_ao.org @@ -46,6 +46,12 @@ gradients and Laplacian of the atomic basis functions. #+end_src + #+begin_src c :tangle (eval h_private_func) +#ifndef QMCKL_AO_HPF +#define QMCKL_AO_HPF + + #+end_src + #+begin_src c :tangle (eval h_private_type) #ifndef QMCKL_AO_HPT #define QMCKL_AO_HPT @@ -4168,6 +4174,10 @@ assert( fabs(ao_vgl[1][26][224] - (-3.843864637762753e-09)) < 1.e-14 ); #endif #+end_src + #+begin_src c :tangle (eval h_private_func) +#endif + #+end_src + *** Test #+begin_src c :tangle (eval c_test) rc = qmckl_context_destroy(context); @@ -4177,7 +4187,7 @@ assert( fabs(ao_vgl[1][26][224] - (-3.843864637762753e-09)) < 1.e-14 ); } #+end_src -**✸ Compute file names +*** Compute file names #+begin_src emacs-lisp ; The following is required to compute the file names diff --git a/org/qmckl_distance.org b/org/qmckl_distance.org index fd524f4..3d8d32a 100644 --- a/org/qmckl_distance.org +++ b/org/qmckl_distance.org @@ -288,7 +288,7 @@ end function qmckl_distance_sq_f integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C) use qmckl - use qmckl_probes_f + use qmckl_verificarlo_f use iso_c_binding implicit none @@ -720,7 +720,7 @@ end function qmckl_distance_f integer(qmckl_exit_code) function test_qmckl_dist(context) bind(C) use qmckl - use qmckl_probes_f + use qmckl_verificarlo_f use iso_c_binding implicit none diff --git a/org/qmckl_electron.org b/org/qmckl_electron.org index 9f2f89f..3104331 100644 --- a/org/qmckl_electron.org +++ b/org/qmckl_electron.org @@ -18,6 +18,11 @@ up-spin and down-spin electrons, and the electron coordinates. #include #+end_src + #+begin_src c :tangle (eval h_private_func) +#ifndef QMCKL_ELECTRON_HPF +#define QMCKL_ELECTRON_HPF + #+end_src + #+begin_src c :tangle (eval c_test) :noweb yes #include "qmckl.h" #include @@ -2408,6 +2413,10 @@ assert (rc == QMCKL_SUCCESS); #endif #+end_src + #+begin_src c :tangle (eval h_private_func) +#endif + #+end_src + *** Test #+begin_src c :tangle (eval c_test) if (qmckl_context_destroy(context) != QMCKL_SUCCESS) diff --git a/org/qmckl_jastrow.org b/org/qmckl_jastrow.org index 663ef3d..bd07a2d 100644 --- a/org/qmckl_jastrow.org +++ b/org/qmckl_jastrow.org @@ -13,6 +13,11 @@ these factors along with their derivatives. #+end_src + #+begin_src c :tangle (eval h_private_func) +#ifndef QMCKL_JASTROW_HPF +#define QMCKL_JASTROW_HPF + #+end_src + #+begin_src c :tangle (eval h_private_type) #ifndef QMCKL_JASTROW_HPT #define QMCKL_JASTROW_HPT @@ -5469,6 +5474,10 @@ assert(fabs(factor_een_deriv_e[0][0] + 0.0005481671107226865) < 1e-12); #endif #+end_src + #+begin_src c :tangle (eval h_private_func) +#endif + #+end_src + *** Test #+begin_src c :tangle (eval c_test) rc = qmckl_context_destroy(context); diff --git a/org/qmckl_memory.org b/org/qmckl_memory.org index a83ab73..5b1a50f 100644 --- a/org/qmckl_memory.org +++ b/org/qmckl_memory.org @@ -41,6 +41,11 @@ int main() { #+end_src + #+begin_src c :tangle (eval h_private_func) :noweb yes +#ifndef QMCKL_MEMORY_HPF +#define QMCKL_MEMORY_HPF + #+end_src + #+begin_src c :tangle (eval h_private_type) :noweb yes #ifndef QMCKL_MEMORY_HPT #define QMCKL_MEMORY_HPT @@ -273,6 +278,11 @@ assert(rc == QMCKL_SUCCESS); * End of files :noexport: + #+begin_src c :comments org :tangle (eval h_private_func) +#endif + + #+end_src + #+begin_src c :comments org :tangle (eval h_private_type) #endif diff --git a/org/qmckl_mo.org b/org/qmckl_mo.org index 7caaebc..61e619f 100644 --- a/org/qmckl_mo.org +++ b/org/qmckl_mo.org @@ -21,6 +21,11 @@ function to calculate the MOs. #+end_src + #+begin_src c :tangle (eval h_private_func) +#ifndef QMCKL_MO_HPF +#define QMCKL_MO_HPF + #+end_src + #+begin_src c :tangle (eval h_private_type) #ifndef QMCKL_MO_HPT #define QMCKL_MO_HPT @@ -843,6 +848,10 @@ printf("\n"); #endif #+end_src + #+begin_src c :tangle (eval h_private_func) +#endif + #+end_src + *** Test #+begin_src c :tangle (eval c_test) rc = qmckl_context_destroy(context); diff --git a/org/qmckl_nucleus.org b/org/qmckl_nucleus.org index bdd8cb8..e9727df 100644 --- a/org/qmckl_nucleus.org +++ b/org/qmckl_nucleus.org @@ -10,6 +10,11 @@ All the data relative to the molecular geometry is described here. #+end_src + #+begin_src c :tangle (eval h_private_func) +#ifndef QMCKL_NUCLEUS_HPF +#define QMCKL_NUCLEUS_HPF + #+end_src + #+begin_src c :tangle (eval h_private_type) #ifndef QMCKL_NUCLEUS_HPT #define QMCKL_NUCLEUS_HPT @@ -1138,6 +1143,10 @@ assert(rep - 318.2309879436158 < 1.e-10); #endif #+end_src + #+begin_src c :tangle (eval h_private_func) +#endif + #+end_src + *** Test #+begin_src c :tangle (eval c_test) if (qmckl_context_destroy(context) != QMCKL_SUCCESS) diff --git a/vfc_tests_config.json b/vfc_tests_config.json index e305151..9b8aca1 100644 --- a/vfc_tests_config.json +++ b/vfc_tests_config.json @@ -1,5 +1,5 @@ { - "make_command": "./ci_install.sh", + "make_command": "tools/ci_install.sh", "executables": [ { "executable": "tests/test_qmckl_distance", From 1a713455f840c15672ca28c2622bf208d0016bfc Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 21:53:00 +0200 Subject: [PATCH 7/8] Fixed DGEMM --- org/qmckl_blas.org | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/org/qmckl_blas.org b/org/qmckl_blas.org index 9cc1df1..33856fb 100644 --- a/org/qmckl_blas.org +++ b/org/qmckl_blas.org @@ -23,7 +23,8 @@ int main() { ** ~qmckl_dgemm~ - Matrix multiply l$C_{ij} = \beta C_{ij} + \alpha \sum_{k} A_{ik} \cdot B_{kj}$ using Fortran ~matmul~ function. + Matrix multiply: $C_{ij} = \beta C_{ij} + \alpha \sum_{k} A_{ik} \cdot B_{kj}$ using Fortran ~matmul~ function. + TODO: Add description about the external library dependence. #+NAME: qmckl_dgemm_args @@ -41,7 +42,7 @@ int main() { | double | beta | in | Array containing the $n \times m$ matrix $B$ | | double | C[][ldc] | out | Array containing the $n \times m$ matrix $B$ | | int64_t | ldc | in | Leading dimension of array ~B~ | - + *** Requirements - ~context~ is not ~QMCKL_NULL_CONTEXT~ @@ -75,7 +76,7 @@ int main() { const int64_t ldb, const double beta, double* const C, - const int64_t ldc ); + const int64_t ldc ); #+END_src @@ -161,11 +162,23 @@ integer function qmckl_dgemm_f(context, TransA, TransB, m, n, k, alpha, A, LDA, endif if (TransA) then - C = matmul(AT,B) + if (alpha == 1.d0 && beta == 0.d0) then + C = matmul(AT,B) + else + C = beta*C + alpha*matmul(AT,B) + endif else if (TransB) then - C = matmul(A,BT) + if (alpha == 1.d0 && beta == 0.d0) then + C = matmul(A,BT) + else + C = beta*C + alpha*matmul(A,BT) + endif else - C = matmul(A,B) + if (alpha == 1.d0 && beta == 0.d0) then + C = matmul(A,B) + else + C = beta*C + alpha*matmul(A,B) + endif endif end function qmckl_dgemm_f #+end_src @@ -251,7 +264,7 @@ integer(qmckl_exit_code) function test_qmckl_dgemm(context) bind(C) double precision :: x, alpha, beta TransA = .False. - TransB = .False. + TransB = .False. m = 1_8 k = 4_8 n = 6_8 @@ -302,7 +315,7 @@ integer(qmckl_exit_code) function test_qmckl_dgemm(context) bind(C) deallocate(A,B,C,D) end function test_qmckl_dgemm #+end_src - + #+begin_src c :comments link :tangle (eval c_test) qmckl_exit_code test_qmckl_dgemm(qmckl_context context); assert(QMCKL_SUCCESS == test_qmckl_dgemm(context)); From 7538a879fcc542c39d873fdc41f34081cc5ef08b Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Oct 2021 21:57:28 +0200 Subject: [PATCH 8/8] Fix documentation --- org/README.org | 47 ++++++++++++++++++++++++++++++------------- org/table_of_contents | 5 +++-- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/org/README.org b/org/README.org index 86bea66..ddbe385 100644 --- a/org/README.org +++ b/org/README.org @@ -16,14 +16,23 @@ grep TITLE $(cat table_of_contents) | tr ':' ' ' #+end_src #+RESULTS: toc - | qmckl.org | #+TITLE | Introduction | | - | qmckl_error.org | #+TITLE | Error | handling | - | qmckl_context.org | #+TITLE | Context | | - | qmckl_memory.org | #+TITLE | Memory | management | - | qmckl_numprec.org | #+TITLE | Numerical | precision | - | qmckl_electron.org | #+TITLE | Electrons | | - | qmckl_ao.org | #+TITLE | Atomic | Orbitals | - | qmckl_distance.org | #+TITLE | Inter-particle | distances | + | qmckl.org | #+TITLE | Introduction | | | + | qmckl_error.org | #+TITLE | Error | handling | | + | qmckl_context.org | #+TITLE | Context | | | + | qmckl_memory.org | #+TITLE | Memory | management | | + | qmckl_numprec.org | #+TITLE | Numerical | precision | | + | qmckl_distance.org | #+TITLE | Inter-particle | distances | | + | qmckl_nucleus.org | #+TITLE | Nucleus | | | + | qmckl_electron.org | #+TITLE | Electrons | | | + | qmckl_ao.org | #+TITLE | Atomic | Orbitals | | + | qmckl_mo.org | #+TITLE | Molecular | Orbitals | | + | qmckl_jastrow.org | #+TITLE | Jastrow | Factor | | + | qmckl_sherman_morrison_woodbury.org | #+TITLE | Sherman-Morrison-Woodbury | | | + | qmckl_utils.org | #+TITLE | Utility | functions | | + | qmckl_blas.org | #+TITLE | BLAS | functions | | + | qmckl_trexio.org | #+TITLE | TREXIO | I/O | library | + | qmckl_verificarlo.org | #+TITLE | Verificarlo | CI | | + | qmckl_tests.org | #+TITLE | Data | for | Tests | #+begin_src python :var data=toc :exports results :results raw result = [] @@ -40,20 +49,30 @@ return '\n'.join(result) - [[./qmckl_context.html][Context]] - [[./qmckl_memory.html][Memory management]] - [[./qmckl_numprec.html][Numerical precision]] + - [[./qmckl_distance.html][Inter-particle distances]] + - [[./qmckl_nucleus.html][Nucleus]] - [[./qmckl_electron.html][Electrons]] - [[./qmckl_ao.html][Atomic Orbitals]] - - [[./qmckl_distance.html][Inter-particle distances]] + - [[./qmckl_mo.html][Molecular Orbitals]] + - [[./qmckl_jastrow.html][Jastrow Factor]] + - [[./qmckl_sherman_morrison_woodbury.html][Sherman-Morrison-Woodbury]] + - [[./qmckl_utils.html][Utility functions]] + - [[./qmckl_blas.html][BLAS functions]] + - [[./qmckl_trexio.html][TREXIO I/O library]] + - [[./qmckl_verificarlo.html][Verificarlo CI]] + - [[./qmckl_tests.html][Data for Tests]] -------------------------------- The ultimate goal of the QMCkl library is to provide a high-performance - implementation of the main kernels of QMC. In this particular - implementation of the library, we focus on the definition of the API - and the tests, and on a /pedagogical/ presentation of the - algorithms. We expect the HPC experts to use this repository as a - reference for re-writing optimized libraries. + implementation of the main kernels of Quantum Monte Carlo + methods. + In this particular implementation of the library, we focus on the + definition of the API and the tests, and on a /pedagogical/ + presentation of the algorithms. We expect the HPC experts to use + this repository as a reference for re-writing optimized libraries. The source code of the library is available at https://github.com/trex-coe/qmckl diff --git a/org/table_of_contents b/org/table_of_contents index 45db916..2a74909 100644 --- a/org/table_of_contents +++ b/org/table_of_contents @@ -3,14 +3,15 @@ qmckl_error.org qmckl_context.org qmckl_memory.org qmckl_numprec.org +qmckl_distance.org qmckl_nucleus.org qmckl_electron.org qmckl_ao.org qmckl_mo.org qmckl_jastrow.org qmckl_sherman_morrison_woodbury.org -qmckl_distance.org qmckl_utils.org qmckl_blas.org -qmckl_tests.org qmckl_trexio.org +qmckl_verificarlo.org +qmckl_tests.org