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

Clean up names of executables, replase Setup_Py_Dir #1119

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Checking Sirocco compiled and can read in inputs correctly
run: |
cd $SIROCCO/examples/gh-workflow/
$SIROCCO/bin/Setup_Py_Dir
$SIROCCO/bin/Setup_Sirocco_Dir
$SIROCCO/bin/sirocco -i cv_macro_benchmark
$SIROCCO/bin/sirocco -i cv_standard
$SIROCCO/bin/sirocco -i fiducial_agn
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions source/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,43 +272,43 @@ run_indent:
swind: startup $(swind_objects) $(CUDA_OBJECTS)
$(CC) $(CFLAGS) $(swind_objects) $(CUDA_OBJECTS) $(LDFLAGS) -o swind
cp $@ $(BIN)
mv $@ $(BIN)/swind$(VERSION)
mv $@ $(BIN)/swind-$(VERSION)
@if [ $(INDENT) = yes ] ; then ../py_progs/run_indent.py -changed ; fi

windsave2table: startup $(table_objects) $(CUDA_OBJECTS)
$(CC) $(CFLAGS) $(table_objects) $(CUDA_OBJECTS) $(LDFLAGS) -o windsave2table
cp $@ $(BIN)
mv $@ $(BIN)/windsave2table$(VERSION)
mv $@ $(BIN)/windsave2table-$(VERSION)
@if [ $(INDENT) = yes ] ; then ../py_progs/run_indent.py -changed ; fi

windsave2fits: startup $(windsave2fits_objects) $(CUDA_OBJECTS)
$(CC) $(CFLAGS) $(windsave2fits_objects) $(CUDA_OBJECTS) $(LDFLAGS) -lcfitsio -o windsave2fits
cp $@ $(BIN)
mv $@ $(BIN)/windsave2fits$(VERSION)
mv $@ $(BIN)/windsave2fits-$(VERSION)
@if [ $(INDENT) = yes ] ; then ../py_progs/run_indent.py -changed ; fi

rad_hydro_files: startup $(rhf_objects) $(CUDA_OBJECTS)
$(CC) $(CFLAGS) $(rhf_objects) $(CUDA_OBJECTS) $(LDFLAGS) -o rad_hydro_files
cp $@ $(BIN)
mv $@ $(BIN)/rad_hydro_files$(VERSION)
mv $@ $(BIN)/rad_hydro_files-$(VERSION)
@if [ $(INDENT) = yes ] ; then ../py_progs/run_indent.py -changed ; fi

modify_wind: startup $(modify_wind_objects) $(CUDA_OBJECTS)
$(CC) $(CFLAGS) $(modify_wind_objects) $(CUDA_OBJECTS) $(LDFLAGS) -o modify_wind
cp $@ $(BIN)
mv $@ $(BIN)/modify_wind$(VERSION)
mv $@ $(BIN)/modify_wind-$(VERSION)
@if [ $(INDENT) = yes ] ; then ../py_progs/run_indent.py -changed ; fi

inspect_wind: startup $(inspect_wind_objects) $(CUDA_OBJECTS)
$(CC) $(CFLAGS) $(inspect_wind_objects) $(CUDA_OBJECTS) $(LDFLAGS) -o inspect_wind
cp $@ $(BIN)
mv $@ $(BIN)/inspect_wind$(VERSION)
mv $@ $(BIN)/inspect_wind-$(VERSION)
@if [ $(INDENT) = yes ] ; then ../py_progs/run_indent.py -changed ; fi

sirocco_optd: startup $(sirocco_optd_obj) $(CUDA_OBJECTS)
$(CC) $(CFLAGS) $(sirocco_optd_obj) $(CUDA_OBJECTS) $(LDFLAGS) -o $@
cp $@ $(BIN)
mv $@ $(BIN)/sirocco_optd$(VERSION)
mv $@ $(BIN)/sirocco_optd-$(VERSION)
@if [ $(INDENT) = yes ] ; then ../py_progs/run_indent.py -changed ; fi

# unit_tests allows one to test low level routines, but one must be aware that one needs to define
Expand Down
10 changes: 5 additions & 5 deletions source/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ setup_dfudge ()
void
setup_atomic_data (const char *atomic_filename)
{
int rc; // Return code from running Setup_Py_Dir
int rc; // Return code from running Setup_Sirocco_Dir
struct stat file_stat; // Used to check the atomic data exists
char answer[LINELENGTH];

Expand All @@ -924,19 +924,19 @@ setup_atomic_data (const char *atomic_filename)
/*
* Check that geo.atomic_filename exists - i.e. that the directory is readable
* and in the directory Python is being executed from. If it isn't - then
* try to run Setup_Py_Dir. If both fail, then warn the user and exit Python
* try to run Setup_Sirocco_Dir. If both fail, then warn the user and exit Python
*/

if (stat (atomic_filename, &file_stat))
{
Log ("Unable to open atomic masterfile %s\n", atomic_filename);
Log ("Running Setup_Py_Dir to try and fix the situation\n");
Log ("Running Setup_Sirocco_Dir to try and fix the situation\n");
if (rank_global == 0)
{
rc = system ("Setup_Py_Dir");
rc = system ("Setup_Sirocco_Dir");
if (rc)
{
Error ("Unable to open %s and run Setup_Py_Dir\n", atomic_filename);
Error ("Unable to open %s and run Setup_Sirocco_Dir\n", atomic_filename);
Exit (1);
}
}
Expand Down
7 changes: 4 additions & 3 deletions source/windsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ wind_read (filename)

if (stat (geo.atomic_filename, &file_stat))
{
if (system ("Setup_Py_Dir"))
if (system ("Setup_Sirocco_Dir"))
{
Error ("Unable to open %s or create link for atomic data\n", geo.atomic_filename);
Exit (1);
Expand Down Expand Up @@ -498,8 +498,9 @@ spec_read (filename)
Exit (EXIT_FAILURE);
}

Log ("Reading specfile %s with %d spectra and %d wavelength bins, created with sirocco version %s and currently using sirocco version %s\n",
filename, nspectra, NWAVE_EXTRACT, version, VERSION);
Log
("Reading specfile %s with %d spectra and %d wavelength bins, created with sirocco version %s and currently using sirocco version %s\n",
filename, nspectra, NWAVE_EXTRACT, version, VERSION);

/* First allocate space */

Expand Down
Loading