diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..9056e42 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,50 @@ +name: Bug report +description: File a bug report +title: "[Bug]: " +labels: ["bug", "triage"] + +assignees: + - octocat +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Please, describe the issue you are facing. + placeholder: + value: + validations: + required: true + + - type: textarea + id: what-is-expected + attributes: + label: What did you expect to happen? + description: Please, describe what you expected to happen. + placeholder: + value: + validations: + required: true + + - type: dropdown + id: version + attributes: + label: Version + description: What version of Drishti are you running? + options: + - 0.4 (Default) + - 0.3 + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..8f6ab2a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,22 @@ +name: Feature request +description: Request a new feature +title: "[Feature]: " +labels: ["enhancement", "triage"] + +assignees: + - octocat +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + + - type: textarea + id: what-feature + attributes: + label: What feature do you want? + description: Please, describe the feature you are requesting. + placeholder: + value: + validations: + required: true diff --git a/.github/workflows/[flake8] b/.github/workflows/[flake8] new file mode 100644 index 0000000..76be966 --- /dev/null +++ b/.github/workflows/[flake8] @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 160 +exclude = .git,__pycache__,docs/source/conf.py,build,dist \ No newline at end of file diff --git a/.github/workflows/drishti-darshan-3.4.0.yml b/.github/workflows/drishti-darshan-3.4.0.yml new file mode 100644 index 0000000..6535241 --- /dev/null +++ b/.github/workflows/drishti-darshan-3.4.0.yml @@ -0,0 +1,100 @@ +name: Drishti (Darshan 3.4.0) + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + drishti: + runs-on: ubuntu-latest + container: jlbez/dxt-explorer-ubuntu-20.04 + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Dependencies + run: | + sudo apt-get update + sudo apt-get install cmake gcc git libtool python3 python3-pip libcurl4-openssl-dev software-properties-common -y + + # Darshan + git clone https://github.com/darshan-hpc/darshan.git darshan-3.4.0 + cd darshan-3.4.0 + git checkout darshan-3.4.0 + + pip install --upgrade pip + + - name: Build Darshan + run: | + export DARSHAN_DIR=/opt/darshan + + mkdir $DARSHAN_DIR + cd darshan-3.4.0 + bash prepare.sh + cd darshan-util + ./configure --prefix=$DARSHAN_DIR + make + make install + + - name: Install py-darshan + run: | + pip install darshan==3.4.0.1 + + - name: Install Drishti + run: | + pip install -r requirements.txt + pip install . + + - name: Run Drishti (--help) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti -h + + - name: Run Drishti (--issues) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --issues sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run Drishti (--code) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --code sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--verbose) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --verbose sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--path) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --path sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--html) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --html sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--svg) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --svg sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Upload Artifact + if: always() + uses: actions/upload-artifact@v2 + with: + name: tests + path: sample/** + retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/drishti-darshan-3.4.1.yml b/.github/workflows/drishti-darshan-3.4.1.yml new file mode 100644 index 0000000..29ed011 --- /dev/null +++ b/.github/workflows/drishti-darshan-3.4.1.yml @@ -0,0 +1,100 @@ +name: Drishti (Darshan 3.4.1) + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + drishti: + runs-on: ubuntu-latest + container: jlbez/dxt-explorer-ubuntu-20.04 + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Dependencies + run: | + sudo apt-get update + sudo apt-get install cmake gcc git libtool python3 python3-pip libcurl4-openssl-dev software-properties-common -y + + # Darshan + git clone https://github.com/darshan-hpc/darshan.git darshan-3.4.1 + cd darshan-3.4.1 + git checkout darshan-3.4.1 + + pip install --upgrade pip + + - name: Build Darshan + run: | + export DARSHAN_DIR=/opt/darshan + + mkdir $DARSHAN_DIR + cd darshan-3.4.1 + bash prepare.sh + cd darshan-util + ./configure --prefix=$DARSHAN_DIR + make + make install + + - name: Install py-darshan + run: | + pip install darshan==3.4.1 + + - name: Install Drishti + run: | + pip install -r requirements.txt + pip install . + + - name: Run Drishti (--help) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti -h + + - name: Run Drishti (--issues) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --issues sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run Drishti (--code) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --code sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--verbose) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --verbose sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--path) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --path sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--html) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --html sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--svg) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --svg sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Upload Artifact + if: always() + uses: actions/upload-artifact@v2 + with: + name: tests + path: sample/** + retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/drishti-darshan-3.4.2.yml b/.github/workflows/drishti-darshan-3.4.2.yml new file mode 100644 index 0000000..0398f37 --- /dev/null +++ b/.github/workflows/drishti-darshan-3.4.2.yml @@ -0,0 +1,100 @@ +name: Drishti (Darshan 3.4.2) + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + drishti: + runs-on: ubuntu-latest + container: jlbez/dxt-explorer-ubuntu-20.04 + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Dependencies + run: | + sudo apt-get update + sudo apt-get install cmake gcc git libtool python3 python3-pip libcurl4-openssl-dev software-properties-common -y + + # Darshan + git clone https://github.com/darshan-hpc/darshan.git darshan-3.4.2 + cd darshan-3.4.2 + git checkout darshan-3.4.2 + + pip install --upgrade pip + + - name: Build Darshan + run: | + export DARSHAN_DIR=/opt/darshan + + mkdir $DARSHAN_DIR + cd darshan-3.4.2 + bash prepare.sh + cd darshan-util + ./configure --prefix=$DARSHAN_DIR + make + make install + + - name: Install py-darshan + run: | + pip install darshan==3.4.2 + + - name: Install Drishti + run: | + pip install -r requirements.txt + pip install . + + - name: Run Drishti (--help) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti -h + + - name: Run Drishti (--issues) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --issues sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run Drishti (--code) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --code sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--verbose) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --verbose sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--path) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --path sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--html) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --html sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Run DXT Explorer (--svg) + run: | + export PATH=/opt/darshan/bin:$PATH + + drishti --svg sample/jlbez_8a_benchmark_write_parallel_id1321662_8-21-5892-15802854900629188750_106.darshan + + - name: Upload Artifact + if: always() + uses: actions/upload-artifact@v2 + with: + name: tests + path: sample/** + retention-days: 1 \ No newline at end of file diff --git a/drishti/main.py b/drishti/main.py index 8dad467..8605a48 100644 --- a/drishti/main.py +++ b/drishti/main.py @@ -1423,8 +1423,13 @@ def main(): insights_end_time = time.time() - job_start = datetime.datetime.fromtimestamp(job['job']['start_time'], datetime.timezone.utc) - job_end = datetime.datetime.fromtimestamp(job['job']['end_time'], datetime.timezone.utc) + # Version 3.4.1 of py-darshan changed the contents on what is reported in 'job' + if 'start_time' in job['job']: + job_start = datetime.datetime.fromtimestamp(job['job']['start_time'], datetime.timezone.utc) + job_end = datetime.datetime.fromtimestamp(job['job']['end_time'], datetime.timezone.utc) + else: + job_start = datetime.datetime.fromtimestamp(job['job']['start_time_sec'], datetime.timezone.utc) + job_end = datetime.datetime.fromtimestamp(job['job']['end_time_sec'], datetime.timezone.utc) console.print()