squidient 2.5.0__tar.gz → 2.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. {squidient-2.5.0 → squidient-2.5.2}/PKG-INFO +1 -1
  2. {squidient-2.5.0 → squidient-2.5.2}/pyproject.toml +1 -1
  3. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/builds/builder.py +12 -3
  4. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/builds/executablebuild.py +39 -1
  5. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/diff.py +1 -0
  6. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/configure.py +3 -2
  7. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/builds/predefined.json +2 -1
  8. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/git.py +5 -3
  9. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/reports/report.py +1 -0
  10. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/squidient.py +1 -1
  11. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/squidientmonitor.py +1 -1
  12. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/testing/instance.py +41 -7
  13. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/utils/utils.py +5 -45
  14. {squidient-2.5.0 → squidient-2.5.2}/.gitignore +0 -0
  15. {squidient-2.5.0 → squidient-2.5.2}/LICENSE.txt +0 -0
  16. {squidient-2.5.0 → squidient-2.5.2}/README.md +0 -0
  17. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/__init__.py +0 -0
  18. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/builds/benchmarkbuild.py +0 -0
  19. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/builds/benchmarkbuilder.py +0 -0
  20. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/builds/build.py +0 -0
  21. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/builds/predefinedbuild.py +0 -0
  22. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/cli.py +0 -0
  23. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/codecoverage/codecoverage.py +0 -0
  24. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/codecoverage/gcovrcodecoverage.py +0 -0
  25. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/codecoverage/intelcodecoverage.py +0 -0
  26. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/compare.py +0 -0
  27. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/comparewithdifftable.py +0 -0
  28. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/absolute.py +0 -0
  29. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/close.py +0 -0
  30. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/l1norm.py +0 -0
  31. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/l1relative.py +0 -0
  32. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/l2norm.py +0 -0
  33. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/l2relative.py +0 -0
  34. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/linfnorm.py +0 -0
  35. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/linfrelative.py +0 -0
  36. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/power.py +0 -0
  37. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/relative.py +0 -0
  38. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/scalartolerance.py +0 -0
  39. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/tolerance.py +0 -0
  40. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compare/methods/vectortolerance.py +0 -0
  41. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/compilation/cmakeoptions.py +0 -0
  42. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/connection/buildlock.py +0 -0
  43. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/connection/job.py +0 -0
  44. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/connection/ssh.py +0 -0
  45. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/connection/sshconfigchecker.py +0 -0
  46. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/.squidient-initialized +0 -0
  47. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-alamak.json +0 -0
  48. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-chemint.json +0 -0
  49. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-clang.json +0 -0
  50. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-commdom.json +0 -0
  51. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-gnu.json +0 -0
  52. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-intel.json +0 -0
  53. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-mumps.json +0 -0
  54. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-nvhpc.json +0 -0
  55. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/alya-config/cmake-talp.json +0 -0
  56. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/benchmarks/benchmarks.json +0 -0
  57. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/builds/builds.json +0 -0
  58. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/builds/cc.json +0 -0
  59. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/builds/defaults.json +0 -0
  60. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/builds/predefined-old.json +0 -0
  61. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/configurations/projects.json +0 -0
  62. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/configurations/systems.json +0 -0
  63. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/configurations/tests.json +0 -0
  64. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/email/report.html +0 -0
  65. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/icons/big.png +0 -0
  66. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/icons/small.png +0 -0
  67. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/index.html +0 -0
  68. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/.gitignore +0 -0
  69. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small/.gitignore +0 -0
  70. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small/t3.small/cloud-init-slurm-fedora.sh +0 -0
  71. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small/t3.small/t3.small.tf +0 -0
  72. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small/t3.small/terraform.tfvars +0 -0
  73. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/.gitignore +0 -0
  74. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/cloud-init-slurm-fedora.sh +0 -0
  75. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/replace-var.sh +0 -0
  76. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/t3.small.tf +0 -0
  77. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/terraform.tfvars +0 -0
  78. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/.gitignore +0 -0
  79. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/cloud-init-slurm-fedora.sh +0 -0
  80. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/t3.small.tf +0 -0
  81. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/terraform.tfvars +0 -0
  82. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/version/version.json +0 -0
  83. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/bb.html +0 -0
  84. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/benchmarks.html +0 -0
  85. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/btest.html +0 -0
  86. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/btests.html +0 -0
  87. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/builds.html +0 -0
  88. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/cc-gcovr.html +0 -0
  89. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/cc-intel.html +0 -0
  90. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/files.html +0 -0
  91. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/canceled.png +0 -0
  92. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/created.png +0 -0
  93. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/failed.png +0 -0
  94. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/failed_black.png +0 -0
  95. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/failed_green.png +0 -0
  96. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/file_cloud.png +0 -0
  97. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/file_config.png +0 -0
  98. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/file_ko.png +0 -0
  99. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/file_ok.png +0 -0
  100. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/skipped.png +0 -0
  101. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/squidient_logo.png +0 -0
  102. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/success.png +0 -0
  103. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/success_black.png +0 -0
  104. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/timeout.png +0 -0
  105. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/tolerance.png +0 -0
  106. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/warning.png +0 -0
  107. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/warning_black.png +0 -0
  108. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/png/warning_green.png +0 -0
  109. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/canceled.svg +0 -0
  110. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/created.svg +0 -0
  111. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/failed.svg +0 -0
  112. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/failed_black.svg +0 -0
  113. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/failed_green.svg +0 -0
  114. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/manual.svg +0 -0
  115. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/running.svg +0 -0
  116. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/skipped.svg +0 -0
  117. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/success.svg +0 -0
  118. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/success_black.svg +0 -0
  119. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/warning.svg +0 -0
  120. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/warning_black.svg +0 -0
  121. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/img/svg/warning_green.svg +0 -0
  122. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/index.html +0 -0
  123. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/jquery.dynatable.css +0 -0
  124. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/jquery.dynatable.js +0 -0
  125. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/perf.html +0 -0
  126. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/test.html +0 -0
  127. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/tests.html +0 -0
  128. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/testsuite.css +0 -0
  129. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/data/web/testsuite.js +0 -0
  130. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/definitions.py +0 -0
  131. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/deployment/modulegenerator.py +0 -0
  132. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/init.py +0 -0
  133. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/monitor/monitor.py +0 -0
  134. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/monitor/monitordb.py +0 -0
  135. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/reports/monitorreport.py +0 -0
  136. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/sqreport/__init__.py +0 -0
  137. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/sqreport/squidientbasereport.py +0 -0
  138. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/sqreport/squidientcasereport.py +0 -0
  139. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/sqreport/squidientdetailedreport.py +0 -0
  140. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/sqreport/squidientfullreport.py +0 -0
  141. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/staging/staging.py +0 -0
  142. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/systems/partition.py +0 -0
  143. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/systems/platform.py +0 -0
  144. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/systems/qos.py +0 -0
  145. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/systems/queuetester.py +0 -0
  146. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/systems/reservation.py +0 -0
  147. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/systems/system.py +0 -0
  148. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/systems/systemmanager.py +0 -0
  149. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/terraform/terraform.py +0 -0
  150. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/testing/benchmarkinstance.py +0 -0
  151. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/testing/benchmarktest.py +0 -0
  152. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/testing/benchmarktester.py +0 -0
  153. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/testing/instancemerger.py +0 -0
  154. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/testing/test.py +0 -0
  155. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/testing/tester.py +0 -0
  156. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/timers/__init__.py +0 -0
  157. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/timers/timer.py +0 -0
  158. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/utils/arguments.py +0 -0
  159. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/utils/lock.py +0 -0
  160. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/utils/log.py +0 -0
  161. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/utils/message.py +0 -0
  162. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/utils/package.py +0 -0
  163. {squidient-2.5.0 → squidient-2.5.2}/src/squidient/utils/watchdog.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: squidient
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: CI/CD framework for alya
5
5
  Project-URL: Homepage, https://alya.gitlab.bsc.es/alya/ci-cd/squidient
6
6
  Project-URL: Bug Tracker, https://alya.gitlab.bsc.es/alya/ci-cd/squidient/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "squidient"
7
- version = "2.5.0"
7
+ version = "2.5.2"
8
8
  authors = [
9
9
  { name="Damien Dosimont", email="damien.dosimont@gmail.com" },
10
10
  ]
@@ -18,6 +18,8 @@
18
18
  #########################################################################
19
19
  import sys
20
20
  import shutil
21
+ from shlex import quote as shell_quote
22
+ from urllib.parse import quote as url_quote
21
23
 
22
24
  from ..utils.utils import *
23
25
  from ..terraform.terraform import *
@@ -286,12 +288,19 @@ class Builder:
286
288
  self.cd_push(self._config["alamak"]["path"])
287
289
  critical_command("./alamak.sh --clean")
288
290
  if self._config["alamak"]["revision"] is not None:
289
- ref = "--revision " + self._config["alamak"]["revision"]
291
+ ref = "--revision " + shell_quote(self._config["alamak"]["revision"])
290
292
  else:
291
- ref = "--branch " + self._config["alamak"]["branch"]
293
+ ref = "--branch " + shell_quote(self._config["alamak"]["branch"])
292
294
  alamak_command = ""
293
295
  if user != "" and token != "":
294
- alamak_command = "./alamak.sh --https " + ref + " --user " + user + " --token " + token
296
+ alamak_command = (
297
+ "./alamak.sh --https "
298
+ + ref
299
+ + " --user "
300
+ + shell_quote(user)
301
+ + " --token "
302
+ + shell_quote(url_quote(token, safe=""))
303
+ )
295
304
  else:
296
305
  alamak_command = "./alamak.sh --ssh " + ref
297
306
  try:
@@ -170,19 +170,57 @@ class ExecutableBuild(Build):
170
170
  options.options("$" + cmake_link_dir, spath + remote_cc_dir + "/" + self._build_id, (spath + "/" + alya_dir).replace("//", "/"), mpirun_options)
171
171
  self._options = options
172
172
 
173
+ def _resolve_slurm_resources(self):
174
+ cpus_per_task = self._sbatch.get("--cpus-per-task", self._sys.get_cpus_per_task())
175
+ if "--ntasks-per-node" in self._sbatch:
176
+ return {
177
+ "--cpus-per-task": cpus_per_task,
178
+ "--ntasks-per-node": self._sbatch["--ntasks-per-node"],
179
+ }
180
+
181
+ tasks_per_node = self._sys.get_tasks_per_node()
182
+ try:
183
+ node_cpus = int(self._sys.get_cpus_per_task()) * int(self._sys.get_tasks_per_node())
184
+ requested_cpus_per_task = int(cpus_per_task)
185
+ requested_tasks = max(1, int(self._threads))
186
+ except (TypeError, ValueError):
187
+ return {
188
+ "--cpus-per-task": cpus_per_task,
189
+ "--ntasks-per-node": tasks_per_node,
190
+ }
191
+ if requested_cpus_per_task <= 0:
192
+ return {
193
+ "--cpus-per-task": cpus_per_task,
194
+ "--ntasks-per-node": tasks_per_node,
195
+ }
196
+
197
+ tasks_per_node = min(
198
+ int(tasks_per_node),
199
+ requested_tasks,
200
+ max(1, node_cpus // requested_cpus_per_task),
201
+ )
202
+ return {
203
+ "--cpus-per-task": cpus_per_task,
204
+ "--ntasks-per-node": tasks_per_node,
205
+ }
206
+
173
207
  def generate_job(self):
174
208
  self.set_queue()
175
209
  spath = self._server_path + "/"
210
+ slurm_resources = self._resolve_slurm_resources()
176
211
  script = open(self._report_dir + "/JOB.SB", 'w')
177
212
  script.write("#!/bin/bash\n")
178
213
  script.write("#SBATCH -D " + spath + self._build_path + "\n")
179
214
  script.write("#SBATCH --output=" + build_out_file + "\n")
180
215
  script.write("#SBATCH --error=" + build_err_file + "\n")
181
216
  script.write("#SBATCH --job-name=" + jtitle + self._hash + "\n")
182
- script.write("#SBATCH --ntasks-per-node=" + str(self._sys.get_tasks_per_node()) + "\n")
217
+ script.write("#SBATCH --cpus-per-task=" + str(slurm_resources["--cpus-per-task"]) + "\n")
218
+ script.write("#SBATCH --ntasks-per-node=" + str(slurm_resources["--ntasks-per-node"]) + "\n")
183
219
  script.write("#SBATCH --ntasks=" + str(self._threads)+"\n")
184
220
  script.write("#SBATCH --time=" + self._timeout + "\n")
185
221
  for parameter in self._sbatch:
222
+ if parameter in slurm_resources:
223
+ continue
186
224
  if str(self._sbatch[parameter]) == "":
187
225
  line = "#SBATCH " + parameter + "\n"
188
226
  else:
@@ -33,6 +33,7 @@ class Diff(ScalarTolerance):
33
33
 
34
34
  def read(self):
35
35
  self._total = 0
36
+ return self._status
36
37
 
37
38
  def compare_pair(self, vref : str, vtest : str) -> bool:
38
39
  pass
@@ -204,6 +204,7 @@ def set_cc_ref(com=""):
204
204
  "\t0a604c815ead8bb5ebc5fd944c39ea9c31dbf694\n" +
205
205
  "\torigin/master\n", [r"\w{8}", r"\w{40}", "origin/master"],
206
206
  "This does not look like a git commit", "origin/master", com)
207
+ save_json(config, config_file)
207
208
 
208
209
 
209
210
  def set_builds(com=""):
@@ -490,7 +491,7 @@ def gitlab_config(pipeline, directory, alya_ref, alya_branch, flex=False, system
490
491
  config_project = open_json(project_file)
491
492
  if project not in config_project:
492
493
  console.error("Project " + project + " not found")
493
- exit(1)
494
+ raise RuntimeError("Project " + project + " not found")
494
495
  config_project = config_project[project]
495
496
  for platform in config_project["systems"][system]["platforms"]:
496
497
  if platform in config["systems"][system]["platforms"]:
@@ -518,7 +519,7 @@ def set_mr(type):
518
519
  config = open_json(config_file)
519
520
  config["db"]["user"] = "alya_user"
520
521
  config["db"]["database"] = database_name["test"]
521
- config["benchmarks"]["tests"] = ["elbow", "sphere-16M"]
522
+ config["benchmarks"]["tests"] = ["elbow", "sphere-16M", "bolund-32M"]
522
523
  save_json(config, config_file)
523
524
 
524
525
 
@@ -60,7 +60,8 @@
60
60
  "cmake-acc-nvhpc-24.11-i4-gpu-ndimepar-vecsize2048k"
61
61
  ],
62
62
  "mr": [
63
- "cmake-gpp-gnu-13.2.0-i4-ndimepar"
63
+ "cmake-gpp-gnu-13.2.0-i4-ndimepar",
64
+ "cmake-acc-nvhpc-24.11-i4-gpu-ndimepar-vecsize2048k"
64
65
  ]
65
66
  }
66
67
  }
@@ -22,6 +22,7 @@
22
22
  # -*- coding: utf-8 -*-
23
23
  import os.path
24
24
  import shutil
25
+ from urllib.parse import quote
25
26
 
26
27
  from .utils.utils import *
27
28
  from .utils.message import console
@@ -58,7 +59,7 @@ class Git:
58
59
  if self._password == "":
59
60
  self._password = getpass.getpass(prompt="Enter your password for the HTTPS repository \n" + self._git_https + ":")
60
61
  self._git_https_user_password = self._git_https.replace("https://", "https://" + self._user + ":" +
61
- percent_encoding(self._password) + "@")
62
+ quote(self._password, safe="") + "@")
62
63
  else:
63
64
  self._git_https_user_password = self._git_https
64
65
 
@@ -128,7 +129,7 @@ class Git:
128
129
  else:
129
130
  c = command('git remote set-url origin ' + self._git_https).success
130
131
  if password != "":
131
- self.replace_git_config_text(percent_encoding(password), "PASSWORD")
132
+ self.replace_git_config_text(quote(password, safe=""), "PASSWORD")
132
133
  self.cd_pop()
133
134
  return c
134
135
 
@@ -138,7 +139,7 @@ class Git:
138
139
  self._original_remote = command('git remote get-url origin').stdout.strip()
139
140
  c = command('git remote set-url origin ' + remote, silent=True).success
140
141
  if password != "":
141
- self.replace_git_config_text("PASSWORD", percent_encoding(password))
142
+ self.replace_git_config_text("PASSWORD", quote(password, safe=""))
142
143
  self.cd_pop()
143
144
  return c
144
145
 
@@ -213,6 +214,7 @@ class Git:
213
214
  command("git clean -x -f")
214
215
  if not command("git checkout " + self._branch, log_output=True).success:
215
216
  logger.error("Cannot checkout branch " + self._branch)
217
+ self.cd_pop()
216
218
  return False
217
219
  command("git reset --hard HEAD")
218
220
  command("git clean -x -f")
@@ -48,6 +48,7 @@ class Report:
48
48
  def open(self):
49
49
  try:
50
50
  self._data = open_critical_json(self._report)
51
+ self._valid = self._data.get("valid", True)
51
52
  except:
52
53
  self.init()
53
54
 
@@ -183,7 +183,7 @@ def _run_cli(argv: Sequence[str]) -> int:
183
183
 
184
184
  else:
185
185
  help()
186
- exit(1)
186
+ return 1
187
187
 
188
188
  return 0
189
189
 
@@ -107,7 +107,7 @@ def _run_cli(argv: Sequence[str]) -> int:
107
107
 
108
108
  else:
109
109
  help()
110
- exit(1)
110
+ return 1
111
111
 
112
112
  return 0
113
113
 
@@ -140,13 +140,47 @@ class Instance:
140
140
  return int(self._sys.get_test_max_tasks())<int(self._mpi)*int(max(1,int(self._openmp)))
141
141
 
142
142
  def set_sbatch(self):
143
-
144
- self._sbatch["--cpus-per-task"] = self._sys.get_cpus_per_task()
145
- self._sbatch["--ntasks-per-node"] = self._sys.get_tasks_per_node()
146
- if "sbatch" in self._execution:
147
- for parameter in self._execution["sbatch"]:
148
- self._sbatch[parameter] = self._execution["sbatch"][parameter]
149
- self._mergeable = False
143
+ execution_sbatch = self._execution.get("sbatch", {})
144
+ self._sbatch.update(self._resolve_slurm_resources(execution_sbatch))
145
+
146
+ for parameter in execution_sbatch:
147
+ if parameter not in self._sbatch:
148
+ self._sbatch[parameter] = execution_sbatch[parameter]
149
+ self._mergeable = False
150
+
151
+ def _resolve_slurm_resources(self, execution_sbatch):
152
+ cpus_per_task = execution_sbatch.get("--cpus-per-task", self._sys.get_cpus_per_task())
153
+ if "--ntasks-per-node" in execution_sbatch:
154
+ return {
155
+ "--cpus-per-task": cpus_per_task,
156
+ "--ntasks-per-node": execution_sbatch["--ntasks-per-node"],
157
+ }
158
+
159
+ tasks_per_node = self._sys.get_tasks_per_node()
160
+ try:
161
+ node_cpus = int(self._sys.get_cpus_per_task()) * int(self._sys.get_tasks_per_node())
162
+ requested_cpus_per_task = int(cpus_per_task)
163
+ requested_tasks = max(1, int(self.get_tasks()))
164
+ except (TypeError, ValueError):
165
+ return {
166
+ "--cpus-per-task": cpus_per_task,
167
+ "--ntasks-per-node": tasks_per_node,
168
+ }
169
+ if requested_cpus_per_task <= 0:
170
+ return {
171
+ "--cpus-per-task": cpus_per_task,
172
+ "--ntasks-per-node": tasks_per_node,
173
+ }
174
+
175
+ tasks_per_node = min(
176
+ int(tasks_per_node),
177
+ requested_tasks,
178
+ max(1, node_cpus // requested_cpus_per_task),
179
+ )
180
+ return {
181
+ "--cpus-per-task": cpus_per_task,
182
+ "--ntasks-per-node": tasks_per_node,
183
+ }
150
184
 
151
185
  def set_bind_and_map(self):
152
186
  if "commands" in self._execution:
@@ -23,9 +23,6 @@
23
23
  from .log import *
24
24
  from datetime import datetime
25
25
 
26
- import smtplib
27
- from email.mime.multipart import MIMEMultipart
28
- from email.mime.text import MIMEText
29
26
  from shutil import copyfile
30
27
 
31
28
  logger = logging.getLogger(logging_context)
@@ -36,6 +33,7 @@ def exist_json(name):
36
33
  """
37
34
  Test if Json file exist
38
35
  """
36
+ name = os.fspath(name)
39
37
  return os.path.isfile(name)
40
38
 
41
39
 
@@ -43,6 +41,7 @@ def open_critical_json(name):
43
41
  """
44
42
  Open a Json file.
45
43
  """
44
+ name = os.fspath(name)
46
45
  try:
47
46
  with open(name) as json_data:
48
47
  d = json.load(json_data)
@@ -64,6 +63,7 @@ def open_json(name):
64
63
  """
65
64
  Open a Json file.
66
65
  """
66
+ name = os.fspath(name)
67
67
  try:
68
68
  with open(name) as json_data:
69
69
  d = json.load(json_data)
@@ -85,10 +85,11 @@ def save_json(d, name):
85
85
  """
86
86
  Save a json file
87
87
  """
88
+ name = os.fspath(name)
88
89
  if(type(d) != type({})):
89
90
  logger.error("Date type is not a dict")
90
91
  raise TypeError("First parameter data type expected: dict " +
91
- "but find: "+type(d))
92
+ "but find: " + str(type(d)))
92
93
  try:
93
94
  with open(name, 'w') as fp:
94
95
  json.dump(d, fp, indent=4, sort_keys=True)
@@ -292,25 +293,6 @@ def write_text_file(file, data):
292
293
  f.close()
293
294
 
294
295
 
295
- def send_email(html, fr, to, tag, copy=None):
296
- # Create message container - the correct MIME type is multipart/alternative
297
- msg = MIMEMultipart('alternative')
298
- if tag == "":
299
- msg['Subject'] = "[AlyaTestSuite] Report Test Email"
300
- else:
301
- msg['Subject'] = "[AlyaTestSuite][" + tag + "] Report Test Email"
302
- msg['From'] = fr
303
- to_list = [to, 'damien.dosimont@bsc.es']
304
- msg['To'] = ", ".join(to_list)
305
- if copy is not None:
306
- msg['CC'] = copy
307
- part2 = MIMEText(html, 'html', "utf-8")
308
- msg.attach(part2)
309
- s = smtplib.SMTP_SSL('mail.bsc.es', port=465)
310
- s.sendmail(fr, to_list, msg.as_string())
311
- s.quit()
312
-
313
-
314
296
  def copy_json(source, destination):
315
297
  """
316
298
  Copy a Json file
@@ -334,28 +316,6 @@ def is_option(value, short, long=""):
334
316
  return value == short or (long != "" and value == long)
335
317
 
336
318
 
337
- def percent_encoding(str):
338
- str2 = str.replace('!', '%21')
339
- str2 = str2.replace('#', '%23')
340
- str2 = str2.replace('$', '%24')
341
- str2 = str2.replace('&', '%26')
342
- str2 = str2.replace("'", '%27')
343
- str2 = str2.replace('(', '%28')
344
- str2 = str2.replace(')', '%29')
345
- str2 = str2.replace('*', '%2A')
346
- str2 = str2.replace('+', '%2B')
347
- str2 = str2.replace(',', '%2C')
348
- str2 = str2.replace('/', '%2F')
349
- str2 = str2.replace(':', '%3A')
350
- str2 = str2.replace(';', '%3B')
351
- str2 = str2.replace('=', '%3D')
352
- str2 = str2.replace('?', '%3F')
353
- str2 = str2.replace('@', '%40')
354
- str2 = str2.replace('[', '%5B')
355
- str2 = str2.replace(']', '%5D')
356
- return str2
357
-
358
-
359
319
  def duration2str(start, end):
360
320
  duration = int(end - start)
361
321
  return secondstotime(duration)
File without changes
File without changes
File without changes