Skip to content
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

Build EMEWS in GitHub Actions #2

Merged
merged 3 commits into from
Jun 19, 2024
Merged

Build EMEWS in GitHub Actions #2

merged 3 commits into from
Jun 19, 2024

Conversation

JostMigenda
Copy link
Member

To be ready for release, we should make sure we are able to build EMEWS reproducibly in GitHub Actions. To achieve that, we need to remove hard-coded paths from the setup.py.

Getting this right across different operating systems and with different Python versions will require several iterations. This initial commit is a very early exploratory draft.

* remove hard-coded paths from setup.py
* remove unused distutils import in setup.py
  (Note that distutils has been removed in Python 3.12)
* skip Ubuntu and Windows for now
@JostMigenda JostMigenda force-pushed the JostMigenda/buildWorkflow branch from 20f18a3 to 7170bc3 Compare June 7, 2024 20:12
@JostMigenda
Copy link
Member Author

JostMigenda commented Jun 7, 2024

I had to make fixes to the mstl code which relied on a few outdated or non-standard behaviours in gcc; but it now compiles on macOS on a GitHub Actions runner. 🎉

There’s still one issue in the output of the example script; I’ll check next week whether that actually impacts the output files.

Full script output
*********************************************************
rho	PREM.rho.dat
Ye	PREM.Ye.dat
Loading a file Thrown in the function Read by the object PREM.rho.dat
Loading a file Thrown in the function Read by the object PREM.Ye.dat
m1	0	dm21^2	7.59e-05	dm32	0.00243
theta12V	34.4	theta13V	9	theta23V	45	deltaCP	0
NE	296	Emin	1	Emax	60
output filename stem	out/EMEWS:PREM:-35.8552,316.975:7.59e-05,0.00243,34.4,9,45,0:296,1,60
Number of domains	9
Domain	0:	0	to	2.05241e+06
Domain	1:	2.05241e+06	to	3.66538e+06
Domain	2:	3.66538e+06	to	7.27619e+07
Domain	3:	7.27619e+07	to	1.30867e+08
Domain	4:	1.30867e+08	to	6.1513e+08
Domain	5:	6.1513e+08	to	6.73235e+08
Domain	6:	6.73235e+08	to	7.42331e+08
Domain	7:	7.42331e+08	to	7.43944e+08
Domain	8:	7.43944e+08	to	7.45997e+08
std::exception Thrown in XInterval In object Unknown At line Unknown
	: The d 6.368e+08 is not between 0 and 6.368e+08
Finished
�finished

So far, I’ve focussed on getting it to build on macOS; and the workflow is skipping Linux and Windows. @jpkneller and @Sheshuk, you said you’d managed to compile EMEWS on those systems? Could you please add the OS-specific instructions to the workflow?

Ideally, you would only need to modify a single install step per OS, where you

  1. install any OS-specific dependencies
  2. export the LIBOMP_INCLUDE environment variable

… and everything else should remain unchanged.

In practice, I suspect it won’t go quite as smoothly, so it’s probably best if you submit that as separate PRs (on top of this branch here) and then I can figure out how to merge everything.

@jpkneller jpkneller merged commit 37aa78d into main Jun 19, 2024
1 check passed
@jpkneller
Copy link
Collaborator

I fixed the bug that was cause of the exception. I also took the opportunity to fix some minor issues when the output is switched on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants