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

shmesa #558

Merged
merged 19 commits into from
Jan 18, 2024
Merged

shmesa #558

merged 19 commits into from
Jan 18, 2024

Conversation

earlbellinger
Copy link
Member

Command line utilities for MESA. See the README for usage.

As per the suggestion in the Discussion, it is now to be run as a standalone program rather than to be sourced. Therefore, recommended usage will be to add PATH=$PATH:$MESA_DIR/scripts/shmesa to your ~/.bashrc, and then you can call shmesa from anywhere.

@earlbellinger earlbellinger added the enhancement New feature or request label Jul 8, 2023
@evbauer
Copy link
Member

evbauer commented Jul 10, 2023

Should we add the suggestion of editing PATH to the MESA installation documentation here?

@@ -108,6 +108,9 @@ uses export to set variables):
export MESASDK_ROOT=/Applications/mesasdk
source $MESASDK_ROOT/bin/mesasdk_init.sh

# add shmesa (the MESA command line tool) to your PATH
PATH=$PATH:$MESA_DIR/scripts/shmesa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want an export here to get the path update into the user's environment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought $PATH is exported by default (so doesn't need to be re-exported). Nevertheless I've added it as there's no harm.

fi

# Create a zip file containing only inlists and models
zip -r "$zip_name" "$dir_to_zip" -i '*inlist*' '*.mod'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include src/ directories here too so that run_star_extras get bundled up too? And maybe some other files like *.list and *.net would be helpful as well?

In playing with this just now, I also noticed that make/run_star.mod and make/run_star_extras.mod got picked up by this, but the mod files are fortran objects that we don't want to share. Is there an easy way to exclude those?

@earlbellinger
Copy link
Member Author

earlbellinger commented Sep 1, 2023

some extra planned features, including some suggestions from the summer school participants:

  • max/min/first/last: point at history.data or a profile file, supply a column name and get the relevant output (e.g., shmesa max LOGS/history.data star_age)
  • closest: point at history.data or a profile file and supply a column and a value as well as additional column names. closest will find the row whose value is closest to the supplied one and print the values of the other columns belonging to that row (e.g., shmesa closest center_h1 0.1 model_number star_age)
  • extras: replace the standard run_star_extras.f90 file with the full template
  • add: the shmesa change functionality only changes existing inlist parameter names; add could insert names into the inlist (e.g., shmesa add inlist_project controls do_element_diffusion .true.)

additional todo:

  • hook into the github continuous integration testing
  • -i/--interactive option, to prompt the user on each file they want to include
  • --dry-run to show which files would be nominally included

@evbauer
Copy link
Member

evbauer commented Sep 1, 2023

I love the extras idea!

@earlbellinger earlbellinger merged commit f70af65 into main Jan 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants