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

Move serial_build and parallel_build functionality into Makefile #189

Closed
Tracked by #188
SeanBryan51 opened this issue Dec 11, 2023 · 0 comments · Fixed by #193
Closed
Tracked by #188

Move serial_build and parallel_build functionality into Makefile #189

SeanBryan51 opened this issue Dec 11, 2023 · 0 comments · Fixed by #193
Assignees

Comments

@SeanBryan51
Copy link
Collaborator

SeanBryan51 commented Dec 11, 2023

The serial_build and parallel_build build scripts can go in the Makefile by creating rules specific to serial or mpi. This simplifies the build system by reducing the number of scripts. See here as an example.

@SeanBryan51 SeanBryan51 changed the title Move and functionality into . Move serial_build and parallel_build functionality into Makefile Dec 11, 2023
@SeanBryan51 SeanBryan51 self-assigned this Dec 11, 2023
SeanBryan51 added a commit that referenced this issue Dec 11, 2023
This change simplifies the CABLE offline build system by deprecating the
`serial_build` and `parallel_build` build scripts and moving their
functionality into the Makefile.

Fixes #189
@SeanBryan51 SeanBryan51 linked a pull request Dec 11, 2023 that will close this issue
SeanBryan51 added a commit that referenced this issue Dec 15, 2023
This change simplifies the CABLE offline build system by deprecating the
`serial_build` and `parallel_build` build scripts and moving their
functionality into the Makefile.

Fixes #189
SeanBryan51 added a commit that referenced this issue Dec 19, 2023
This change simplifies the CABLE offline build system by deprecating the
`serial_cable` and `parallel_cable` build scripts and moving their
functionality into the Makefile.

Replace `ls *.o` in `serial_cable` and `parallel_cable` scripts with
`$(OBJS)` in the Makefile where `OBJS` is a list of object files common
to both serial and MPI. This is done so that:

1. We leverage `make` syntax to simplify the rules for `serial` and
   `mpi` targets.
2. We can replace the `all` target (which contains a list of object
   files as dependencies) with `$(OBJS)`.
3. We clean up the existing definition of `LSRC` in the Makefile and use
   this to generate a list of the required object files.

See [#193][PR] for a sorted diff of the new `LSRC` variable against the
previous `LSRC` and against the list of object file dependencies in the
`all` target.

Tools for testing binary equivalence of executables (see `ldd`, `nm` and
`objdump` tools), show that the serial and MPI executables are
equivalent to their respective executable in the main branch.

Fixes #189

[PR]: #193
SeanBryan51 added a commit that referenced this issue Dec 19, 2023
This change simplifies the CABLE offline build system by deprecating the
`serial_cable` and `parallel_cable` build scripts and moving their
functionality into the Makefile.

Replace `ls *.o` in `serial_cable` and `parallel_cable` scripts with
`$(OBJS)` in the Makefile where `OBJS` is a list of object files common
to both serial and MPI. This is done so that:
1. We leverage `make` syntax to simplify the rules for `serial` and
`mpi` targets.
2. We can replace the `all` target (which contains a list of object
files as dependencies) with `$(OBJS)`.
2. We clean up the existing definition of `LSRC` in the Makefile and use
this to generate a list of the required object files.
See [#193][PR] for a sorted diff of the new `LSRC` variable against the
previous `LSRC` and against the list of object file dependencies in the
`all` target.

Tools for testing binary equivalence of executables (see `ldd`, `nm` and
`objdump` tools), show that the serial and MPI executables are
equivalent to their respective executable in the main branch.

Fixes #189

[PR]: #193

<!-- readthedocs-preview cable start -->
----
📚 Documentation preview 📚:
https://cable--193.org.readthedocs.build/en/193/

<!-- readthedocs-preview cable end -->
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 a pull request may close this issue.

1 participant