-
Notifications
You must be signed in to change notification settings - Fork 117
Create regression test for Spark #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Use the `analytics` module provided by Cray. * Run a simple `pyspark` script to calculate pi.
| from reframe.core.launchers.registry import getlauncher | ||
|
|
||
|
|
||
| class SparkAnalyticsCheck(RunOnlyRegressionTest): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using the new-style checks.
| self.valid_prog_environs = ['PrgEnv-cray'] | ||
|
|
||
| self.modules = ['analytics'] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the blank lines here.
| pi_diff = sn.abs(pi_value - pi_reference) | ||
|
|
||
| self.sanity_patterns = sn.assert_lt(pi_diff, 0.01) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove blank lines.
| pi_reference = math.pi | ||
| pi_diff = sn.abs(pi_value - pi_reference) | ||
|
|
||
| self.sanity_patterns = sn.assert_lt(pi_diff, 0.01) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it fits in a single line, you may replace pi_diff with the sn.abs() expression directly.
| self.num_tasks = 72 | ||
| self.num_tasks_per_node = 18 | ||
| super().setup(partition, environ, **job_opts) | ||
| self.job.launcher = getlauncher('local')() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a small comment here, why you need to do that.
| self.num_tasks_per_node = 12 | ||
| else: | ||
| self.num_tasks = 72 | ||
| self.num_tasks_per_node = 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave a blank line here.
Use the
analyticsmodule provided by Cray.Run a simple
pysparkscript to calculate pi.Closes #107