8000 Add libfabric backend by rsc18 · Pull Request #556 · argonne-lcf/THAPI · GitHub
[go: up one dir, main page]

Skip to content

Add libfabric backend - #556

Open
rsc18 wants to merge 25 commits into
develfrom
add-libfabric-backend
Open

rsc18 wants to merge 25 commits into
develfrom
add-libfabric-backend

Conversation

@rsc18
@rsc18 rsc18 commented Nov 7, 2026
Copy link
Copy Markdown

Adding libfabric backend that uses libfabric hook framework.

@DonAurelio DonAurelio left a comment •
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @rsc18! as I told you, this is an iterative process. That is how I work with @TApplencourt.

Please, consider the following changes in addition to the ones I pointed out before.

  • We should change the name of the backend from libfabric to ofi. This follows the naming convention in other backends such as Level Zero (ze), OpenMP (omp). This name should be reflected in the libraries you generate, for instance (libfrabicTracer.so -> libofiTracer.so), and other parts of the code that use that naming.
  • We do not need the whole libfabric source code in here. We just need the headers under /include they should be located at /backends/ofi/include. This following the structure of other backends. Here, I think we do not need the headers under /include/ofi/windows because we are not supporting windows.
  • The file called framework_hook.c renamed it to ofi_tracer.c as the naming convention in the other tracers.

So in this PR we should have just the following files:

  • /backends/ofi/include for OFI (required) headers
  • /backends/ofi/ofi_tracepoints.h LTTng Tracepoints
  • /backends/ofi/ofi_tracepoints.c LTTng Tracepoints
  • /backends/ofi/ofi_tracer.c with the hook logic
  • /backends/ofi/tracer_ofi.sh.in
  • /backends/ofi/Makefile.am with the tracer build logic

With that, we should be able to generate raw traces (iprof --no-analysis ./app); no tally, no timeline. We can work on the tally and timeline in another PR.

If it is usefull for you, you can copy and paste these facts about iprof in your IA.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This file should not be included

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed image folder and in README.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We have a testing framework that let us test specific invariants we expect to see in traces generated by this backend. This test has at least three problems: first, it is not minimal, e.i., it is not validating a specific functionality/feature/invariant; second, it is not connected to the testing framework; third, it can not be validated automatically, some body has to check the output.

Please, remove this file, we can work together on the tests once we have our mininal first PR working.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sounds good, test folder removed. Will add later once we have minimal first PR working

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We do not need personal or custom instalation scripts. That should live outside THAPI. Please, remove this file.

We recommed you to use the command below to load all thapi build time dependencies whenever you need to compile thapi. This ensure we all use the same build enviroment for our constributions.

source /home/avivasmeza/thapi_env/load_build_modules.sh

Then you can use the command below in a fresh sesion to load all thapi runtime dependencies.

module use /home/avivasmeza/thapi_env/modules
module load thapi-env/blob

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This makes more sense. Could you please update the permissions on the file?
source /home/avivasmeza/thapi_env/load_build_modules.sh
bash: /home/avivasmeza/thapi_env/load_build_modules.sh: Permission denied

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I did some permissions update, let my know if that work

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Avoid to load personal files, like this one, to the repo...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added .DS_Store in .gitignore

Comment thread backends/libfabric/upstream/.DS_Store Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Avoid to load personal files, like this one, to the repo...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed .DS_store file and added .DS_Store in .gitignore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For this PR, we do not need this file. This file is the model.yaml we create from the header to generate the tracepoints. But we are not doing that right now.

10BC8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can delete this file too. We do not need it for now. We will need it when we start with code generation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep this for you...

Comment thread utils/yaml_ast.rb
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change is not required yet since we are not using code generation.

Comment thread .gitignore
Comment on lines +21 to +28
# Trace output
*.trace

# Shared libraries, including versioned files
*.so
*.so.*


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can also skipt this change and be carefull to commit just what is required.

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

0