-
Notifications
You must be signed in to change notification settings - Fork 113
Add METISSE for stellar evolution #1254
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
Open
rieder
wants to merge
56
commits into
amusecode:main
Choose a base branch
from
rieder:add/metisse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
b94e0b7
Initial import Metisse interface
rieder aee7cc5
remove file
rieder a74c50d
update interface
rieder b87f8b0
Stub interface
rieder 112cce7
standard imports
rieder b69bd94
update interface with particle set
rieder ad1aaff
Updates to Metisse interface
rieder 9c7de5a
Interface updates
rieder 2256960
add getters/setters
rieder e70640d
small updates
rieder 212d9bd
update literature
rieder 1abca6c
Updates
rieder 186fd73
add parameter setters/getters
rieder 8363f30
cleanup and fixes to resize
rieder 4549b19
interface updates
rieder c0042f6
Prevent hanging when t_end > t_nuc
rieder 8d75358
remove python particleset
rieder 279e79d
add units used, start with a small timestep
rieder 100d32a
Merge remote-tracking branch 'lourens/issue-1024-new-build-system' in…
rieder a57a35f
fix allocation bug
rieder 3fab0cc
Fix Ubuntu MPI hang
LourensVeen a4cbc1a
Merge commit '450d20c0b542be53ff6fdf82bb6c2cce1c80c7bf' into add/metisse
rieder d3f86bf
Add ext tests
LourensVeen a438d18
move files to new structure
rieder 359245b
update to new dir structure (2)
rieder 542abff
move to new dir structure (3)
rieder fd6bfde
small updates for newer METISSE
rieder 0e8f6c6
updates for memory management
rieder 9f1f9da
add test script for metisse
rieder 79e2bed
Add code tests
LourensVeen 0293c2e
updated way of setting the metallicity/track dirs
rieder 12c746a
Set correct unit for evolving!
rieder 1261d47
remove debug print
rieder 170c709
ignore data files
rieder d4b48dc
Merge commit '79e2bed8d8930ab68b09d8df9bdd7e42e0820a92' into add/metisse
rieder cb36a3c
Merge remote-tracking branch 'upstream/main' into add/metisse
rieder bf27508
remove duplicates
rieder a57acfe
update test
rieder 20f2c5f
add plotting script
rieder cf3d4a0
Merge remote-tracking branch 'upstream/main' into add/metisse
rieder 2ecb5e7
remove workflows from another branch
rieder 64e868a
undo another external commit
rieder bacb301
another external change
rieder e04527c
that's all of them, I think
rieder 725e811
final 2
rieder 9957513
Merge remote-tracking branch 'upstream/main' into add/metisse
rieder 0d46763
Add/update examples for Metisse
rieder 26956f3
update Makefile
rieder 1598169
Update to fix bugs
rieder 66e0fc3
download the amuse version of METISSE
rieder 24f602f
consistency change: initial_metallicity renamed to metallicity
rieder a7469bd
ensure stars already have properties when added
rieder 5d139a1
Update METISSE interface to enable more evolve steps on the same set
rieder 0972780
Set default dir for tracks
rieder 47d3758
Download data files on first run
rieder d44aeb6
cleanup
rieder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -455,3 +455,5 @@ packages/dist | |
|
|
||
| # standard directory for a virtualenv | ||
| env/ | ||
| src/amuse_metisse/data | ||
| src/amuse_metisse/src/METISSE | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| fortran python cmake install download |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../ |
44 changes: 44 additions & 0 deletions
44
src/amuse/community/metisse/packages/amuse-metisse/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| [project] | ||
| name = "amuse-metisse" | ||
| dynamic = ["version"] | ||
| requires-python = ">=3.7" | ||
| dependencies = [ | ||
| "amuse-framework" | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling", "versioningit"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.version] | ||
| source = "versioningit" | ||
|
|
||
| [tool.versioningit.next-version] | ||
| method = "smallest" | ||
|
|
||
| [tool.versioningit.format] | ||
| distance = "{next_version}.dev{distance}+{vcs}{rev}" | ||
| dirty = "{base_version}+d{build_date:%Y%m%d}" | ||
| distance-dirty = "{next_version}.dev{distance}+{vcs}{rev}.d{build_date:%Y%m%d}" | ||
|
|
||
| [tool.hatch.build] | ||
| skip-excluded-dirs = true | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| include = ["metisse/**/*.py"] | ||
| exclude = [ | ||
| "metisse/packages", | ||
| "metisse/support", | ||
| "metisse/src", | ||
| "metisse/tests" | ||
| ] | ||
| artifacts = ["metisse/metisse_worker"] | ||
|
|
||
| [tool.hatch.build.targets.wheel.sources] | ||
| "metisse" = "amuse/community/metisse" | ||
|
|
||
| [tool.pytest.ini_options] | ||
| pythonpath = ["metisse/tests/", "../../../../../tests"] | ||
|
|
||
| testpaths = ["metisse/tests"] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| ifneq (,$(filter-out clean distclean, $(MAKECMDGOALS))) | ||
| include support/config.mk | ||
| endif | ||
|
|
||
|
|
||
| # Detecting dependencies | ||
| support/config.mk: | ||
| cd support && ./configure | ||
|
|
||
|
|
||
| # Downloading the code | ||
| VERSION = 1b79dba5cdb7ac801d4ff24e746a22ad2e566f7c | ||
|
|
||
| metisse.tar.gz: | ||
| $(DOWNLOAD) https://github.com/TeamMETISSE/METISSE/archive/$(VERSION).tar.gz >$@ | ||
|
|
||
| src: metisse.tar.gz | ||
| tar xf $< | ||
| mv metisse-$(VERSION) src | ||
|
|
||
| # Building the code into a static library | ||
| DEPFLAGS += $(STOPCOND_CFLAGS) $(STOPCONDMPI_CFLAGS) $(AMUSE_MPI_CFLAGS) | ||
| DEPFLAGS += $(FORSOCKETS_CFLAGS) $(SIMPLE_HASH_CFLAGS) $(G6LIB_CFLAGS) | ||
| DEPFLAGS += $(OPENMP_FFLAGS) | ||
| FCFLAGS += $(DEPFLAGS) -ffpe-summary=all -fbacktrace -fcheck=all -g -Wall | ||
|
|
||
| LDLIBS += -lm $(STOPCOND_LIBS) $(STOPCONDMPI_LIBS) $(AMUSE_MPI_LIBS) | ||
| LDLIBS += $(FORSOCKETS_LIBS) | ||
|
|
||
| CODELIB := libmetisse.a | ||
|
|
||
| .PHONY: src/$(CODELIB) | ||
|
|
||
| src/$(CODELIB): | src/make | ||
| $(MAKE) -C src/make libmetisse | ||
|
|
||
|
|
||
| # Building the workers | ||
| metisse_worker.f90: interface.py | ||
| amusifier --type=f90 interface.py MetisseInterface -o $@ | ||
|
|
||
| storage.o: storage.f90 | ||
| $(MPIFC) -c -o $@ $(FCFLAGS) $< | ||
|
|
||
| metisse_worker.o: metisse_worker.f90 storage.o | src | ||
| $(MPIFC) -c -o $@ $(FCFLAGS) $< | ||
|
|
||
| %.o: %.f90 | ||
| $(MPIFC) -c -o $@ $(FCFLAGS) -Isrc/make $< | ||
|
|
||
| metisse_worker: storage.o src/$(CODELIB) interface.o metisse_worker.o | ||
| $(MPIFC) -o $@ $(LDFLAGS) $^ $(LDLIBS) | ||
|
|
||
|
|
||
| # Which packages contain which workers? | ||
| amuse-metisse_contains: metisse_worker | ||
|
|
||
| # Building and installing packages | ||
| develop-%: %_contains | ||
| support/shared/uninstall.sh $* | ||
| python -m pip install -e packages/$* | ||
|
|
||
| install-%: %_contains | ||
| support/shared/uninstall.sh $* | ||
| python -m pip install packages/$* | ||
|
|
||
| package-%: %_contains | ||
| python3 -m pip install -vv --no-cache-dir --no-deps --no-build-isolation --prefix ${PREFIX} packages/$* | ||
|
|
||
| test-%: | ||
| cd packages/$* && pytest | ||
|
|
||
|
|
||
| # Cleaning up | ||
| .PHONY: clean | ||
| clean: | ||
| -$(MAKE) -C src/make clean | ||
| rm -rf *.o *.mod *worker* | ||
|
|
||
| .PHONY: distclean | ||
| distclean: clean | ||
| -$(MAKE) -C src/make distclean | ||
| rm -f support/config.mk support/config.log support/config.status | ||
| rm -rf support/autom4te.cache | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
|
|
||
| To update/replace the current version of SSE, just unpack a new | ||
| tarball in the sse directory. The MUSE module uses the SSE | ||
| distribution unchanged, and relies only on the calling sequences to | ||
| zcnsts(), evolv1(), star(), and deltat(). | ||
|
|
||
| Scientific papers written using this module should reference the paper | ||
|
|
||
| "Comprehensive analytic formulae for stellar evolution as a function | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a mechanism for this, right? Should this go into the docstring in interface.py with the other references there? |
||
| of mass and metallicity" | ||
| Hurley J.R., Pols O.R., Tout C.A., 2000, MNRAS, 315, 543 | ||
|
|
||
| (See sse/README_SSE for more details.) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| """ | ||
| Interface for METISSE | ||
| """ | ||
| import os | ||
| from .interface import MetisseInterface | ||
| from .interface import Metisse | ||
| from .download import download_sample_metisse_tracks | ||
|
|
||
| if not os.path.exists(os.path.join(os.path.dirname(__file__), "data")): | ||
| print("Downloading sample MESA tracks for METISSE") | ||
| download_sample_metisse_tracks() | ||
|
|
||
| __all__ = ["MetisseInterface", "Metisse"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There should not be a package here, just a forward in amuse/community/metisse/init.py and interface.py, like for the other codes.