Skip to content

Commit ae97ab5

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into qe-eiger
2 parents 218bbc9 + 0237368 commit ae97ab5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1364
-442
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,25 @@ jobs:
5959
VALIDATE_ALL_CODEBASE: false
6060
VALIDATE_PYTHON_FLAKE8: true
6161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
63+
wheelvalidation:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v2
67+
- name: Setup up Python 3.8
68+
uses: actions/setup-python@v2
69+
with:
70+
python-version: 3.8
71+
- name: Bootstrap ReFrame
72+
run: |
73+
./bootstrap.sh
74+
- name: Generate Wheel
75+
run: |
76+
python -m pip install --upgrade pip setuptools wheel twine
77+
PYTHONPATH=$PWD/external:$PYTHONPATH python setup.py sdist bdist_wheel
78+
- name: Install Wheel
79+
run: |
80+
python -m pip install dist/ReFrame_HPC*.whl
81+
- name: Test Installation
82+
run: |
83+
reframe -V

README.md

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ The stages of this pipeline take care of all the system interaction details, suc
2727
Writing system regression tests in a high-level modern programming language, like Python, poses a great advantage in organizing and maintaining the tests.
2828
Users can create their own test hierarchies, create test factories for generating multiple tests at the same time and also customize them in a simple and expressive way.
2929

30+
Please visit the project's documentation [page](https://reframe-hpc.readthedocs.io/) for all the details!
3031

31-
## Getting ReFrame
3232

33-
ReFrame is almost ready to run just after you clone it from Github.
33+
## Installation
34+
35+
ReFrame is fairly easy to install.
3436
All you need is Python 3.6 or above and to run its bootstrap script:
3537

3638
```bash
@@ -40,37 +42,19 @@ cd reframe
4042
./bin/reframe -V
4143
```
4244

43-
### Other installation ways
44-
45-
You can also install ReFrame through the following channels:
46-
47-
- Through [PyPI](https://pypi.org/project/ReFrame-HPC/):
48-
49-
```
50-
pip install reframe-hpc
51-
```
52-
53-
- Through [Spack](https://spack.io/):
54-
55-
```
56-
spack install reframe
57-
```
58-
59-
- Through [EasyBuild](https://easybuild.readthedocs.io/):
60-
61-
```
62-
eb easybuild/easyconfigs/r/ReFrame/ReFrame-VERSION.eb -r
63-
```
45+
If you want a specific release, please refer to the documentation [page](https://reframe-hpc.readthedocs.io/en/stable/started.html).
6446

65-
Finally, you may access all previous versions of ReFrame [here](https://github.com/eth-cscs/reframe/releases).
6647

48+
### Running the unit tests
6749

68-
## Documentation
50+
You can optionally run the framework's unit tests with the following command:
6951

70-
You may find the official documentation of the latest release and the current master in the following links:
52+
```bash
53+
./test_reframe.py -v
54+
```
7155

72-
- [Latest release](https://reframe-hpc.readthedocs.io/en/stable)
73-
- [Current master](https://reframe-hpc.readthedocs.io/en/latest)
56+
NOTE: Unit tests require a functional C compiler, available through the `cc` command, that is also able to recognize the ``-O2`` option.
57+
The [GNU Make](https://www.gnu.org/software/make/) build tool is also needed.
7458

7559

7660
### Building the documentation locally
@@ -102,21 +86,18 @@ However, they can serve as a very good starting point for implementing your syst
10286

10387
You can get in contact with the ReFrame community in the following ways:
10488

105-
### Mailing list
106-
107-
For keeping up with the latest news about ReFrame, posting questions and, generally getting in touch with other users and the developers, you may follow the mailing list: [[email protected]](mailto:[email protected]).
108-
109-
Only subscribers may send messages to the list.
110-
To subscribe, please send an empty message to [[email protected]](mailto:[email protected]).
89+
### Slack
11190

112-
For unsubscribing, you may send an empty message to [[email protected]](mailto:reframe-[email protected]).
91+
Please join the community's [Slack channel](https://reframe-slack.herokuapp.com) for keeping up with the latest news about ReFrame, posting questions and, generally getting in touch with other users and the developers.
11392

114-
### Slack
93+
### Mailing list
11594

116-
You may also reach the community through Slack [here](https://reframe-slack.herokuapp.com).
95+
You may also [subscribe](mailto:[email protected]) to the [mailing list](mailto:[email protected]).
96+
Only subscribers can send messages to the list.
97+
For unsubscribing, you may send an empty message [here](mailto:[email protected]).
11798

11899

119100
## Contributing back
120101

121-
ReFrame is an open-source project and we welcome third-party contributions.
102+
ReFrame is an open-source project and we welcome and encourage contributions!
122103
Check out our Contribution Guide [here](https://github.com/eth-cscs/reframe/wiki/contributing-to-reframe).

bin/reframe

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
# PYTHON_ARGCOMPLETE_OK
23
#
34
# Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
45
# ReFrame Project Developers. See the top-level LICENSE file for details.

cscs-checks/apps/cp2k/cp2k_check.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ def __init__(self):
1414
self.executable = 'cp2k.psmp'
1515
self.executable_opts = ['H2O-256.inp']
1616

17-
energy = sn.extractsingle(r'\s+ENERGY\| Total FORCE_EVAL \( QS \) '
18-
r'energy \(a\.u\.\):\s+(?P<energy>\S+)',
19-
self.stdout, 'energy', float, item=-1)
17+
energy = sn.extractsingle(
18+
r'\s+ENERGY\| Total FORCE_EVAL \( QS \) '
19+
r'energy [\[\(]a\.u\.[\]\)]:\s+(?P<energy>\S+)',
20+
self.stdout, 'energy', float, item=-1
21+
)
2022
energy_reference = -4404.2323
2123
energy_diff = sn.abs(energy-energy_reference)
2224
self.sanity_patterns = sn.all([
2325
sn.assert_found(r'PROGRAM STOPPED IN', self.stdout),
2426
sn.assert_eq(sn.count(sn.extractall(
25-
r'(?P<step_count>STEP NUM)',
27+
r'(?i)(?P<step_count>STEP NUMBER)',
2628
self.stdout, 'step_count')), 10),
2729
sn.assert_lt(energy_diff, 1e-4)
2830
])

cscs-checks/apps/gromacs/gromacs_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self, scale, variant):
7373
references = {
7474
'maint': {
7575
'large': {
76-
'daint:gpu': {'perf': (73.4, -0.10, None, 'ns/day')}
76+
'daint:gpu': {'perf': (63.0, -0.10, None, 'ns/day')}
7777
}
7878
},
7979
'prod': {

cscs-checks/libraries/io/netcdf_compile_run.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,23 @@ def __init__(self, lang, linkage):
2222
self.lang = lang
2323
self.linkage = linkage
2424
self.descr = f'{lang_names[lang]} NetCDF {linkage.capitalize()}'
25-
self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc',
26-
'arolla:cn', 'tsa:cn']
25+
self.valid_systems = ['daint:gpu', 'daint:mc',
26+
'dom:gpu', 'dom:mc',
27+
'arolla:cn', 'tsa:cn',
28+
'eiger:mc']
29+
if linkage == 'static':
30+
self.valid_systems.remove('eiger:mc')
31+
2732
if self.current_system.name in ['daint', 'dom']:
2833
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu',
2934
'PrgEnv-intel', 'PrgEnv-pgi']
3035
self.modules = ['cray-netcdf']
3136
elif self.current_system.name in ['arolla', 'tsa']:
3237
self.exclusive_access = True
3338
self.valid_prog_environs = ['PrgEnv-gnu-nompi', 'PrgEnv-pgi-nompi']
39+
elif self.current_system.name in ['eiger']:
40+
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu']
41+
self.modules = ['cray-hdf5', 'cray-netcdf']
3442

3543
self.sourcesdir = os.path.join(self.current_system.resourcesdir,
3644
'netcdf')

cscs-checks/microbenchmarks/cpu/fft/fftw_benchmark.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ def __init__(self, exec_mode):
1414
self.sourcepath = 'fftw_benchmark.c'
1515
self.build_system = 'SingleSource'
1616
self.valid_systems = ['daint:gpu', 'dom:gpu']
17+
18+
# Cray FFTW library is not officially supported for the PGI
19+
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu']
1720
self.modules = ['cray-fftw']
1821
self.num_tasks_per_node = 12
1922
self.num_gpus_per_node = 0
2023
self.sanity_patterns = sn.assert_eq(
2124
sn.count(sn.findall(r'execution time', self.stdout)), 1)
2225
self.build_system.cflags = ['-O2']
23-
if self.current_system.name in {'daint', 'dom'}:
24-
# Cray FFTW library is not officially supported for the PGI
25-
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu']
26-
2726
self.perf_patterns = {
2827
'fftw_exec_time': sn.extractsingle(
2928
r'execution time:\s+(?P<exec_time>\S+)', self.stdout,
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#ifndef BENCHES_HPP
2+
#define BENCHES_HPP
3+
4+
#include <limits>
5+
#include <cmath>
6+
#include <climits>
7+
8+
namespace nsimd {
9+
namespace benches {
10+
11+
template <typename T>
12+
double rand_sign() {
13+
if (std::is_unsigned<T>::value) {
14+
return 1.;
15+
} else {
16+
return (::rand() % 2) ? 1. : -1.;
17+
}
18+
}
19+
20+
template <typename T>
21+
T rand_bits(T min, T max = std::numeric_limits<T>::max()) {
22+
T r;
23+
do {
24+
int nbits = sizeof(T) * CHAR_BIT;
25+
uint64_t x = 0;
26+
for (int i = 0; i < nbits; ++i) {
27+
x |= uint64_t(::rand() % 2) << i;
28+
}
29+
r = *((T*)&x);
30+
} while (r < min || r > max);
31+
return r;
32+
}
33+
34+
template <typename T>
35+
T rand_from(T min, T max = std::numeric_limits<T>::max()) {
36+
// From: http://c-faq.com/lib/randrange.html
37+
return T(double(min)
38+
+ (double(::rand()) / (double(RAND_MAX) / (double(max) - double(min) + 1))));
39+
}
40+
41+
template <typename T>
42+
T rand_fp(T min, T max) {
43+
T r;
44+
if (std::isinf(min) && std::isinf(max)) {
45+
// For now, we're not using this method for random number
46+
//r = rand_bits<T>(min, max);
47+
r = rand_from<T>(-1000000, 1000000);
48+
} else {
49+
r = rand_from<T>(min, max);
50+
}
51+
return r;
52+
}
53+
54+
template <typename T>
55+
T rand(T min, T max = std::numeric_limits<T>::max()) {
56+
return rand_from<T>(min, max);
57+
}
58+
59+
template <>
60+
float rand<float>(float min, float max) {
61+
return rand_fp<float>(min, max);
62+
}
63+
64+
template <>
65+
double rand<double>(double min, double max) {
66+
return rand_fp<double>(min, max);
67+
}
68+
69+
}
70+
}
71+
72+
#endif

0 commit comments

Comments
 (0)