Skip to content

Commit 9dddfba

Browse files
author
Theofilos Manitaras
committed
Merge remote-tracking branch 'origin/bugfix/bootstrap_python_version' into bugfix/bootstrap_python_version
2 parents 28602f7 + 45faf35 commit 9dddfba

File tree

27 files changed

+1000
-365
lines changed

27 files changed

+1000
-365
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).

bootstrap.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ pyver=$($python -V | sed -n 's/Python \([0-9]\+\)\.\([0-9]\+\)\..*/\1.\2/p')
6262
# We need to exit with a zero code if the Python version is the correct
6363
# one, so we invert the comparison
6464

65-
if $python -c 'import sys;sys.exit(sys.version_info[:2] >= (3, 6))'; then
66-
echo -e "ReFrame requires Python >= 3.6"
65+
if $python -c 'import sys; sys.exit(sys.version_info[:2] >= (3, 6))'; then
66+
echo -e "ReFrame requires Python >= 3.6 (found $($python -V 2>&1))"
6767
exit 1
6868
fi
6969

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/apps/quantumespresso/quantumespresso_check.py

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,43 @@ class QuantumESPRESSOCpuCheck(QuantumESPRESSOCheck):
3939
def __init__(self, scale, variant):
4040
super().__init__()
4141
self.descr = f'QuantumESPRESSO CPU check (version: {scale}, {variant})'
42-
self.valid_systems = ['daint:mc']
42+
self.valid_systems = ['daint:mc', 'eiger:mc']
4343
self.modules = ['QuantumESPRESSO']
4444
if scale == 'small':
4545
self.valid_systems += ['dom:mc']
46-
self.num_tasks = 216
4746
energy_reference = -11427.09017218
47+
if self.current_system.name in ['daint', 'dom']:
48+
self.num_tasks = 216
49+
self.num_tasks_per_node = 36
50+
elif self.current_system.name == 'eiger':
51+
self.num_tasks = 96
52+
self.num_tasks_per_node = 16
53+
self.num_cpus_per_task = 16
54+
self.num_tasks_per_core = 1
55+
self.use_multithreading = False
56+
self.variables = {
57+
'MPICH_OFI_STARTUP_CONNECT': '1',
58+
'OMP_NUM_THREADS': '8',
59+
'OMP_PLACES': 'cores',
60+
'OMP_PROC_BIND': 'close'
61+
}
4862
else:
49-
self.num_tasks = 576
5063
energy_reference = -11427.09017152
51-
52-
self.num_tasks_per_node = 36
64+
if self.current_system.name in ['daint']:
65+
self.num_tasks = 576
66+
self.num_tasks_per_node = 36
67+
elif self.current_system.name in ['eiger']:
68+
self.num_tasks = 256
69+
self.num_tasks_per_node = 16
70+
self.num_cpus_per_task = 16
71+
self.num_tasks_per_core = 1
72+
self.use_multithreading = False
73+
self.variables = {
74+
'MPICH_OFI_STARTUP_CONNECT': '1',
75+
'OMP_NUM_THREADS': '8',
76+
'OMP_PLACES': 'cores',
77+
'OMP_PROC_BIND': 'close'
78+
}
5379

5480
energy = sn.extractsingle(r'!\s+total energy\s+=\s+(?P<energy>\S+) Ry',
5581
self.stdout, 'energy', float)
@@ -65,26 +91,37 @@ def __init__(self, scale, variant):
6591
'maint': {
6692
'small': {
6793
'dom:mc': {'time': (115.0, None, 0.05, 's')},
68-
'daint:mc': {'time': (115.0, None, 0.10, 's')}
94+
'daint:mc': {'time': (115.0, None, 0.10, 's')},
95+
'eiger:mc': {'time': (66.0, None, 0.10, 's')}
6996
},
7097
'large': {
71-
'daint:mc': {'time': (115.0, None, 0.10, 's')}
98+
'daint:mc': {'time': (115.0, None, 0.10, 's')},
99+
'eiger:mc': {'time': (53.0, None, 0.10, 's')}
72100
}
73101
},
74102
'prod': {
75103
'small': {
76104
'dom:mc': {'time': (115.0, None, 0.05, 's')},
77-
'daint:mc': {'time': (115.0, None, 0.10, 's')}
105+
'daint:mc': {'time': (115.0, None, 0.10, 's')},
106+
'eiger:mc': {'time': (66.0, None, 0.10, 's')}
78107
},
79108
'large': {
80-
'daint:mc': {'time': (115.0, None, 0.10, 's')}
109+
'daint:mc': {'time': (115.0, None, 0.10, 's')},
110+
'eiger:mc': {'time': (53.0, None, 0.10, 's')}
81111
}
82112
}
83113
}
84114

85115
self.reference = references[variant][scale]
86116
self.tags |= {'maintenance' if variant == 'maint' else 'production'}
87117

118+
@rfm.run_before('run')
119+
def set_task_distribution(self):
120+
self.job.options = ['--distribution=block:block']
121+
122+
@rfm.run_before('run')
123+
def set_cpu_binding(self):
124+
self.job.launcher.options = ['--cpu-bind=cores']
88125

89126
@rfm.parameterized_test(*([s, v]
90127
for s in ['small', 'large']

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)