dftracer
A multi-level dataflow tracer for capturing I/O calls from workflows.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Keywords
Repository
A multi-level dataflow tracer for capturing I/O calls from workflows.
Basic Info
- Host: GitHub
- Owner: LLNL
- License: mit
- Language: Jupyter Notebook
- Default Branch: develop
- Homepage: https://dftracer.readthedocs.io/en/latest/
- Size: 29.3 MB
Statistics
- Stars: 18
- Watchers: 2
- Forks: 11
- Open Issues: 18
- Releases: 22
Topics
Metadata Files
README.md
DFTracer
Overview
DFTracer is a tracing tool designed to capture both application-code and I/O-call level events from workflows. It provides a unified tracing interface, optimized trace format, and compression mechanism to enable efficient distributed analysis for large-scale AI-driven workloads.
Prerequisites
Requirements for DFTracer
- Python>=3.7
- pybind11
Requirements for DFAnalyzer
- bokeh>=2.4.2
- dask>=2023.5.0
- distributed
- matplotlib>=3.7.3
- numpy>=1.24.3
- pandas>=2.0.3
- pyarrow>=12.0.1
- pybind11
- python-intervals>=1.10.0.post1
- rich>=13.6.0
- seaborn>=0.13.2
- zindex_py
Installation
Users can easily install DFTracer using pip, the standard tool for installing Python packages.
This method works for both native Python and Conda environments.
From PyPI
bash
pip install dftracer
pip install dftracer[dfanalyzer]
From Github
bash
DFTRACER_VERSION=develop
pip install git+https://github.com/LLNL/dftracer.git@${DFTRACER_VERSION}
pip install git+https://github.com/LLNL/dftracer.git@${DFTRACER_VERSION}#egg=dftracer[dfanalyzer]
From Source
```bash git clone git@github.com:LLNL/dftracer.git cd dftracer
You can skip this for installing the dev branch.
for latest stable version use master branch.
git checkout tags/
For detailed build instructions, click here.
Usage
```python from dftracer.logger import dftracer, dftfn loginst = dftracer.initializelog(logfile=None, datadir=None, processid=-1) dftfn = dft_fn("COMPUTE")
Example of using function decorators
@dftfn.log def logevents(index): sleep(1)
Example of function spawning and implicit I/O calls
def posixcalls(val): index, isspawn = val path = f"{cwd}/data/demofile{index}.txt" f = open(path, "w+") f.write("Now the file has more content!") f.close() if isspawn: print(f"Calling spawn on {index} with pid {os.getpid()}") loginst.finalize() # This need to be called to correctly finalize DFTracer. else: print(f"Not calling spawn on {index} with pid {os.getpid()}")
NPZ calls internally calls POSIX calls.
def npzcalls(index): path = f"{cwd}/data/demofile{index}.npz" if os.path.exists(path): os.remove(path) records = np.random.randint(255, size=(8, 8, 1024), dtype=np.uint8) recordlabels = [0] * 1024 np.savez(path, x=records, y=record_labels)
def main(): logevents(0) npzcalls(1) with getcontext('spawn').Pool(1, initializer=init) as pool: pool.map(posixcalls, ((2, True),)) log_inst.finalize()
if name == "main": main() ```
For this example, as the dftracer.initialize_log do not pass logfile or data_dir, we need to set DFTRACER_LOG_FILE and DFTRACER_DATA_DIR.
By default the DFTracer mode is set to FUNCTION.
Example of running this configurations are:
```bash
The process id, app_name and .pfw will be appended by DFTracer for each app and process.
The name of the final log file will be ~/logfile-<APPNAME>-.pfw
DFTRACERLOGFILE=~/log_file
Colon separated paths to include in the tracing
DFTRACERDATADIR=/dev/shm/:/p/gpfs1/$USER/dataset:$PWD/data
Enable DFTracer
DFTRACER_ENABLE=1 ```
For more examples, click here.
Documentation
- Building DFTracer: https://dftracer.readthedocs.io/en/latest/build.html
- Integrating DFTracer: https://dftracer.readthedocs.io/en/latest/examples.html
- Visualizing DFTracer Traces: https://dftracer.readthedocs.io/en/latest/perfetto.html
- Building DFAnalyzer: https://dftracer.readthedocs.io/en/latest/dfanalyzer_build.html
Citation and Reference
The original SC'24 paper describes the design and implementation of the DFTracer code. Please cite this paper and the code if you use DFTracer in your research.
``` @inproceedings{devarajandftracer2024, address = {Atlanta, GA}, title = {{DFTracer}: {An} {Analysis}-{Friendly} {Data} {Flow} {Tracer} for {AI}-{Driven} {Workflows}}, shorttitle = {{DFTracer}}, urldate = {2024-07-31}, booktitle = {{SC24}: {International} {Conference} for {High} {Performance} {Computing}, {Networking}, {Storage} and {Analysis}}, publisher = {IEEE}, author = {Devarajan, Hariharan and Pottier, Loic and Velusamy, Kaushik and Zheng, Huihuo and Yildirim, Izzet and Kogiou, Olga and Yu, Weikuan and Kougkas, Anthony and Sun, Xian-He and Yeom, Jae Seung and Mohror, Kathryn}, month = nov, year = {2024}, }
@misc{devarajandftracercode_2024, type = {Github}, title = {Github {DFTracer}}, shorttitle = {{DFTracer}}, url = {https://github.com/LLNL/dftracer.git}, urldate = {2024-07-31}, journal = {DFTracer: A multi-level dataflow tracer for capture I/O calls from worklows.}, author = {Devarajan, Hariharan and Pottier, Loic and Velusamy, Kaushik and Zheng, Huihuo and Yildirim, Izzet and Kogiou, Olga and Yu, Weikuan and Kougkas, Anthony and Sun, Xian-He and Yeom, Jae Seung and Mohror, Kathryn}, month = jun, year = {2024}, } ```
Acknowledgments
This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344; and under the auspices of the National Cancer Institute (NCI) by Frederick National Laboratory for Cancer Research (FNLCR) under Contract 75N91019D00024. This research used resources of the Argonne Leadership Computing Facility, a U.S. Department of Energy (DOE) Office of Science user facility at Argonne National Laboratory and is based on research supported by the U.S. DOE Office of Science-Advanced Scientific Computing Research Program, under Contract No. DE-AC02-06CH11357. Office of Advanced Scientific Computing Research under the DOE Early Career Research Program. Also, This material is based upon work partially supported by LLNL LDRD 23-ERD-045 and 24-SI-005. LLNL-CONF-857447.
Owner
- Name: Lawrence Livermore National Laboratory
- Login: LLNL
- Kind: organization
- Email: github-admin@llnl.gov
- Location: Livermore, CA, USA
- Website: https://software.llnl.gov
- Twitter: LLNL_OpenSource
- Repositories: 520
- Profile: https://github.com/LLNL
For over 70 years, the Lawrence Livermore National Laboratory has applied science and technology to make the world a safer place.
GitHub Events
Total
- Create event: 49
- Release event: 8
- Issues event: 12
- Watch event: 2
- Delete event: 12
- Issue comment event: 22
- Push event: 288
- Pull request review comment event: 55
- Pull request review event: 94
- Pull request event: 86
- Fork event: 2
Last Year
- Create event: 49
- Release event: 8
- Issues event: 12
- Watch event: 2
- Delete event: 12
- Issue comment event: 22
- Push event: 288
- Pull request review comment event: 55
- Pull request review event: 94
- Pull request event: 86
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 8
- Total pull requests: 53
- Average time to close issues: 3 months
- Average time to close pull requests: 1 day
- Total issue authors: 7
- Total pull request authors: 6
- Average comments per issue: 1.13
- Average comments per pull request: 0.04
- Merged pull requests: 33
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 7
- Pull requests: 53
- Average time to close issues: 29 days
- Average time to close pull requests: 1 day
- Issue authors: 6
- Pull request authors: 6
- Average comments per issue: 1.14
- Average comments per pull request: 0.04
- Merged pull requests: 33
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- hariharan-devarajan (2)
- pramodk (1)
- Ceres445 (1)
- jsoref (1)
- arcturus5340 (1)
- theo-jolivel (1)
Pull Request Authors
- hariharan-devarajan (33)
- rayandrew (9)
- izzet (4)
- OlgaKogiou (1)
- Druva-D (1)
- Ceres445 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 1,066 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 21
- Total maintainers: 1
pypi.org: dftracer
I/O profiler for deep learning python apps. Specifically for dlio_benchmark.
- Homepage: https://github.com/LLNL/dftracer
- Documentation: https://dftracer.readthedocs.io/en/latest/
- License: MIT License
-
Latest release: 1.0.15
published 6 months ago
Rankings
Maintainers (1)
pypi.org: pydftracer
I/O profiler for deep learning python apps. Specifically for dlio_benchmark.
- Homepage: https://github.com/LLNL/dftracer
- Documentation: https://dftracer.readthedocs.io/en/latest/
- License: MIT License
-
Latest release: 1.0.14
published 7 months ago