diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bfc5426 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 + +# Indentation override for all JS under lib directory +[package.json] +indent_size = 2 + +[*.{remarkrc,eslintrc}] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..f391e7d --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,66 @@ +{ + "env": {}, + "globals": {}, + "extends": "eslint:recommended", + "rules": { + "curly": 2, + "guard-for-in": 2, + "no-extend-native": 2, + "block-scoped-var": 1, + "no-use-before-define": 2, + "no-caller": 2, + "no-sequences": 2, + "no-new": 2, + "no-extra-parens": 1, + "dot-notation": [ + 1, + { + "allowPattern": "^[a-z]+(_[a-z]+)+$" + } + ], + "no-implicit-coercion": [ + 2, + { + "boolean": true, + "number": true, + "string": false + } + ], + "no-multi-spaces": 2, + "key-spacing": [ + 2, + { + "beforeColon": false, + "afterColon": true + } + ], + "comma-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "semi-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "no-spaced-func": 2, + "no-trailing-spaces": 2, + "eol-last": 2, + "semi": 2, + "space-infix-ops": 2, + "consistent-this": [ + 1, + "self" + ], + "linebreak-style": [ + 2, + "unix" + ], + "keyword-spacing": 1 + } +} diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..cd020e8 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# How to Contribute + +Third-party patches are essential for keeping XDMoD great. There are a +few guidelines that we need contributors to follow so that we can have a +chance of keeping on top of things. + +## Getting Started + +* Contact us about the feature or bug fix you intend to work on before you start. + * The change may be something we are already working on internally, or we + may have advice on how best to proceed. + * If working on a bug fix, include: + * Steps to reproduce the bug + * The earliest version that you know has the bug + * We can be **publicly** reached via: + * The issues tab of this repository + * The XDMoD mailing list (see [the Open XDMoD support page][support]) + * We can be **privately** reached via: + * The XDMoD support email address (see [the Open XDMoD support page][support]) +* Once you have the go-ahead, fork the repository on GitHub and make the + changes there. + +## Making Changes + +* Create a topic branch from where you want to base your work. + * Base your work on the oldest version of XDMoD you want to change. If you + want to fix a bug in XDMoD 6.5 and newer, you would create a topic branch + on `xdmod6.5` (`git checkout -b fix/my_contribution xdmod6.5`). +* Make commits of logical units. ([Squash](https://www.youtube.com/watch?v=qh9KtjfjzCU) + your commits before submission if necessary.) +* Check for unnecessary whitespace with `git diff --check` before committing. + +## Style Guidelines (linting) + +* If there exists a linter config file for some aspect of the project (e.g. `.eslintrc.json`, `.editorconfig`, `.remarkrc`), please use the associated linter with the config. +* If there is no applicable linter or linter config when editing a file, try to stick with its current style. +* Make sure that you fix any errors found by all configured linters (e.g. remark-lint, ESLint, phpcs). +* If an error or warning can't be fixed, please add comments to the pull/commit explaining why. +* We realize that all code, including existing code, might not pass the linters (as configured). + * If you want to fix stylistic errors for an entire file that you're working on (which is appreciated!), fix it in a separate commit before starting on any functional code changes. This makes it easier to see the functional changes. + * Please do not submit changes that are _purely_ style fixes. While we would love to see the code get tidied up, every change introduced increases the chance of conflicts for someone else's work in progress. + +## Submitting Changes + +* Make sure you have followed the style guidelines. +* Push your changes to a topic branch in your fork of the repository. +* All relevant documentation should be added to or updated as part of your pull request. +* Submit a pull request to the repository. +* After feedback has been given, we expect responses (comments and/or commits) within two weeks. After two weeks of inactivity, we may close the pull request. + +[support]: http://open.xdmod.org/support.html diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..cc96187 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,32 @@ + + +## Expected Behavior + + + +## Current Behavior + + + +## Possible Solution + + + +## Steps to Reproduce (for bugs) + + +1. +2. +3. +4. + +## Context + + + +## Your Environment + +* Version used: +* Environment name and version (e.g. Chrome 39, Node.js 5.4): +* Operating system and version (desktop or mobile): +* Link to your project: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..31ce1f1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ + + +## Description + + + + +## Motivation and Context + + + +## Tests performed + + + + +## Types of changes + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +## Checklist: + + +- [ ] My code follows the code style of this project as found in the **CONTRIBUTING** document. +- [ ] I have added tests to cover my changes. +- [ ] All new and existing tests passed. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d978ae8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,310 @@ +# Numerous always-ignore extensions +*.diff +*.err +*.orig +*.log +*.rej + +# Ignore paths that contain generated content. +cache/ +log/ +logs/ + +# Created by https://www.gitignore.io/api/archives,bower,intellij,xcode,composer,node,osx,sass,maven,java,linux,vim + +### Archives ### +# It's better to unpack these files and commit the raw source because +# git has its own built in compression methods. +*.7z +*.rar +*.zip +*.gz +*.tgz +*.bzip +*.bz2 +*.xz +*.lzma +*.cab + +#packing-only formats +*.iso +*.tar + +#package management formats +*.dmg +*.xpi +*.gem +*.egg +*.deb +*.rpm +*.msi +*.msm +*.msp + + +### Bower ### +bower_components +.bower-cache +.bower-registry +.bower-tmp + + +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio + +*.iml + +## Directory-based project format: +.idea/ +# if you remove the above rule, at least ignore the following: + +# User-specific stuff: +# .idea/workspace.xml +# .idea/tasks.xml +# .idea/dictionaries + +# Sensitive or high-churn files: +# .idea/dataSources.ids +# .idea/dataSources.xml +# .idea/sqlDataSources.xml +# .idea/dynamic.xml +# .idea/uiDesigner.xml + +# Gradle: +# .idea/gradle.xml +# .idea/libraries + +# Mongo Explorer plugin: +# .idea/mongoSettings.xml + +## File-based project format: +*.ipr +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties + + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate + + +### Composer ### +composer.phar +vendor/ + +# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + + +### Node ### +# Logs +logs +*.log +npm-debug.log* +node_modules/ + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git +node_modules + + +### OSX ### +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Sass ### +.sass-cache/ +*.css.map + + +### Maven ### +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties + + +### Java ### +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### C ### +*.so + +### Linux ### +*~ + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +### Vim ### +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist +*~ + +## XDMod Specific ignores ## + +# Build files +xdmod-*.tar.gz +xdmod-*.rpm +/build.xml +/nbproject + +/html/gui/lib/extjs +/html/manual_dev +/.sonar/ +external_libraries/ + +/html/gui/lib/highcharts +/html/gui/lib/jquery +/html/gui/lib/jquery-plugins +/html/gui/lib/moment +/html/gui/lib/moment-timezone +/html/gui/lib/rsvp + +# Custom PHPUnit configuration files. +/open_xdmod/modules/*/tests/phpunit.xml + +# Security +*.pem +*.csr +*.key +*.crt +/configuration/supremm_resources.json +.secrets.json +.secrets + +# ETL Generated files / folders +configuration/datawarehouse.d/ +configuration/rawstatisticsconfig.json +configuration/roles.d/supremm.json +configuration/supremmconfig.json +configuration/aggregation_meta/ + +# ETL resource-specific configuration +/etl/js/config/supremm/dataset_maps/* +/etl/js/config/supremm/tests/* +!/etl/js/config/supremm/dataset_maps/pcp.js +!/etl/js/config/supremm/tests/pcp + +# Local ETL configuration files +# configuration/etl/*.json +# configuration/etl/**/*.json + +# Include CCR Log Class +!classes/Log + +# Include Internal Dashboard Log Directory +!html/internal_dashboard/js/Log + +# Include Internal Dashboard Controllers Log Directory +!html/internal_dashboard/controllers/log + +# Include Open XDMoD builder code +!classes/OpenXdmod/Build + +# eclipse project files +/.project + diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b50b738 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs/xdmod-jekyll-theme"] + path = docs/xdmod-jekyll-theme + url = https://github.com/ubccr/xdmod-jekyll-theme diff --git a/.remarkrc b/.remarkrc new file mode 100644 index 0000000..8b9a6dd --- /dev/null +++ b/.remarkrc @@ -0,0 +1,12 @@ +{ + "plugins": { + "lint": { + "list-item-spacing": false, + "list-item-indent": false, + "maximum-line-length": false + } + }, + "settings": { + "commonmark": true + } +} diff --git a/.travis.build.sh b/.travis.build.sh new file mode 100755 index 0000000..6e38b4a --- /dev/null +++ b/.travis.build.sh @@ -0,0 +1,159 @@ +#!/usr/bin/env bash + +export PATH +PATH="$(pwd)/vendor/bin:$(pwd)/node_modules/.bin:$PATH" + +source ~/.nvm/nvm.sh +nvm use "$NODE_VERSION" + +module_dir="appkernels" +module_name="Application Kernels" + +# Fix for Travis not specifying a range if testing the first commit of +# a new branch on push +if [ -z "$TRAVIS_COMMIT_RANGE" ]; then + TRAVIS_COMMIT_RANGE="$(git rev-parse --verify --quiet "${TRAVIS_COMMIT}^1")...${TRAVIS_COMMIT}" +fi + +if [ "$TEST_SUITE" = "syntax" ] || [ "$TEST_SUITE" = "style" ]; then + # Check whether the start of the commit range is available. + # If it is not available, try fetching the complete history. + commit_range_start="$(echo "$TRAVIS_COMMIT_RANGE" | sed -E 's/^([a-fA-F0-9]+).*/\1/')" + if ! git show --format='' --no-patch "$commit_range_start" &>/dev/null; then + git fetch --unshallow + + # If it's still unavailable (likely due a push build caused by a force push), + # tests based on what has changed cannot be run. + if ! git show --format='' --no-patch "$commit_range_start" &>/dev/null; then + echo "Could not find commit range start ($commit_range_start)." >&2 + echo "Tests based on changed files cannot run." >&2 + exit 1 + fi + fi + + # Get the files changed by this commit (excluding deleted files). + files_changed=() + while IFS= read -r -d $'\0' file; do + files_changed+=("$file") + done < <(git diff --name-only --diff-filter=d -z "$TRAVIS_COMMIT_RANGE") + + # Separate the changed files by language. + php_files_changed=() + js_files_changed=() + for file in "${files_changed[@]}"; do + if [[ "$file" == *.php ]]; then + php_files_changed+=("$file") + elif [[ "$file" == *.js ]]; then + js_files_changed+=("$file") + fi + done +fi + +# Build tests require the corresponding version of Open XDMoD. +if [ "$TEST_SUITE" = "build" ]; then + xdmod_branch="$TRAVIS_BRANCH" + echo "Cloning Open XDMoD branch '$xdmod_branch'" + git clone --depth=1 --branch="$xdmod_branch" https://github.com/ubccr/xdmod.git ../xdmod + + # If PHP 5.3.3 is installed, SSL/TLS isn't available to PHP. + # Use a newer version of PHP for installing Composer dependencies. + using_php_533="false"; [[ "$(php --version)" == PHP\ 5.3.3\ * ]] && using_php_533="true" + if "$using_php_533"; then + echo "Using newer version of PHP for installing dependencies" + phpenv global 5.3 + php --version + fi + + # Install Composer dependencies. + pushd ../xdmod >/dev/null + composer install + popd >/dev/null + + # If using PHP 5.3.3 for testing purposes, stop using the newer PHP version. + if "$using_php_533"; then + echo "Reverting back to PHP 5.3.3 for testing" + phpenv global 5.3.3 + php --version + fi + + # Create a symlink from Open XDMoD to this module. + ln -s "$(pwd)" "../xdmod/open_xdmod/modules/$module_dir" +fi + +# Perform a test set based on the value of $TEST_SUITE. +build_exit_value=0 +if [ "$TEST_SUITE" = "syntax" ]; then + for file in "${php_files_changed[@]}"; do + php -l "$file" >/dev/null + if [ $? != 0 ]; then + build_exit_value=2 + fi + done + for file in "${js_files_changed[@]}"; do + eslint --no-eslintrc "$file" + if [ $? != 0 ]; then + build_exit_value=2 + fi + done +elif [ "$TEST_SUITE" = "style" ]; then + for file in "${php_files_changed[@]}"; do + phpcs "$file" + if [ $? != 0 ]; then + build_exit_value=2 + fi + done + for file in "${js_files_changed[@]}"; do + eslint "$file" + if [ $? != 0 ]; then + build_exit_value=2 + fi + done +elif [ "$TEST_SUITE" = "build" ]; then + # If PHP 5.3.3 is installed, SSL/TLS isn't available to PHP. + # Use a newer version of PHP for installing Composer dependencies. + using_php_533="false"; [[ "$(php --version)" == PHP\ 5.3.3\ * ]] && using_php_533="true" + if "$using_php_533"; then + echo "Using newer version of PHP for installing dependencies" + phpenv global 5.3 + php --version + fi + + echo "Building Open XDMoD..." + ../xdmod/open_xdmod/build_scripts/build_package.php --module xdmod + echo "Building $module_name module..." + ../xdmod/open_xdmod/build_scripts/build_package.php --module "$module_dir" + if [ $? != 0 ]; then + build_exit_value=2 + fi + + # If using PHP 5.3.3 for testing purposes, stop using the newer PHP version. + if "$using_php_533"; then + echo "Reverting back to PHP 5.3.3 for testing" + phpenv global 5.3.3 + php --version + fi + + xdmod_install_dir="$HOME/xdmod-install" + + echo "Installing Open XDMoD..." + cd ../xdmod/open_xdmod/build || exit 2 + xdmod_tar="$(find . -regex '^\./xdmod-[0-9]+[^/]*\.tar\.gz$')" + tar -xf "$xdmod_tar" + cd "$(basename "$xdmod_tar" .tar.gz)" || exit 2 + ./install --prefix="$xdmod_install_dir" + + echo "Installing $module_name module..." + cd .. || exit 2 + module_tar="$(find . -regex "^\./xdmod-${module_dir}-[0-9]+[^/]*\.tar\.gz$")" + tar -xf "$module_tar" + cd "$(basename "$module_tar" .tar.gz)" || exit 2 + ./install --prefix="$xdmod_install_dir" + if [ $? != 0 ]; then + build_exit_value=2 + fi +else + echo "Invalid value for \$TEST_SUITE: $TEST_SUITE" >&2 + build_exit_value=1 +fi + +exit $build_exit_value diff --git a/.travis.install.sh b/.travis.install.sh new file mode 100755 index 0000000..d22cde5 --- /dev/null +++ b/.travis.install.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +function install_pear_dependencies() { + pear install Log +} + +# If PHP 5.3.3 is installed, SSL/TLS isn't available to PHP. +# Use a newer version of PHP for installing Composer dependencies. +using_php_533="false"; [[ "$(php --version)" == PHP\ 5.3.3\ * ]] && using_php_533="true" +if "$using_php_533"; then + echo "Using newer version of PHP for installing dependencies" + phpenv global 5.3 + php --version + + # Install PEAR dependencies for newer version of PHP. + install_pear_dependencies +fi + +# Install Composer dependencies. +composer install + +# If using PHP 5.3.3 for testing purposes, stop using the newer PHP version. +if "$using_php_533"; then + echo "Reverting back to PHP 5.3.3 for testing" + phpenv global 5.3.3 + php --version +fi + +# Install PEAR dependencies for testing version of PHP. +install_pear_dependencies + +# Install npm dependencies. +source ~/.nvm/nvm.sh +nvm install "$NODE_VERSION" +nvm use "$NODE_VERSION" +npm install diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9d1834a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +# Use container-based environment for quicker initialization +sudo: false + +# Specify the build matrix +language: php +php: + - '5.3.3' + - '5.4' +env: + global: + - NODE_VERSION=6 + matrix: + - TEST_SUITE=syntax + - TEST_SUITE=style + - TEST_SUITE=build CACHE_NAME=build + +matrix: + allow_failures: + - env: TEST_SUITE=style + +# Add dependency directories to the Travis cache +cache: + directories: + - node_modules + - $HOME/.composer/cache + - /tmp/pear/cache + +# Delegate the installation step to the custom Travis installation script +install: ./.travis.install.sh + +# Delegate the build step to the custom Travis build script +script: ./.travis.build.sh diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..5a49c5d --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,16 @@ +# Open XDMoD Application Kernels Authors + +## Current Maintainers + +- Steven M. Gallo +- Jeffrey T. Palmer +- Nikolay Simakov +- Joseph White +- Thomas Yearke +- Jeanette Sperhac +- Ryan Rathsam + +## Previous Maintainers + +- Amin Ghadersohi +- Ryan Gentner diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5a09fbd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,40 @@ +Open XDMoD Application Kernels Change Log +========================================= + +2016-12-?? v6.5.0 +----------------- + +- Refactors and Miscellaneous + - Spun this module out from the Open XDMoD repository. + +2016-09-21 v6.0.0 +----------------- + +- Updated for compatibility with Open XDMoD 6.0.0. + +2016-05-24 v5.6.0 +----------------- + +- Features + - Added ability to select the 29th-31st of a month as a monthly report + delivery day. + - For months that don't have these days, reports scheduled for those + days will be delivered on the last day of the month. +- Bug Fixes + - Fixed Reports tab not appearing for some authorized users. + - Reduced user authorization requirements for showing certain data. + - Removed "." from tab labels. + - Removed non-functional x-y swap from tabs. + +2015-12-18 v5.5.0 +----------------- + +- Bug Fixes + - Fixed handling of whitespace in XML parsing + - Incorrect database credentials were being used in the app kernel + performance map + +2015-08-19 v5.0.0 +----------------- + +- Initial public release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..65c5ca8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/README.md b/README.md new file mode 100644 index 0000000..a90afef --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Open XDMoD Application Kernels Module + +The Application Kernel Performance Monitoring Module for Open XDMoD is designed +to measure quality of service as well as preemptively identify underperforming +hardware and software by deploying customized, computationally lightweight +“application kernels” that are run frequently (daily to several times per week) +to continuously monitor HPC system performance and reliability from the +application users’ point of view. The term “computationally-lightweight” is used +to indicate that the application kernel requires relatively modest resources for +a given run frequency. Accordingly, through XDMoD, system managers have the +ability to proactively monitor system performance as opposed to having to rely +on users to report failures or underperforming hardware and software. + +For more information, please visit +[the Application Kernels website](http://appkernels.xdmod.org/ak-overview.html). + +## Installation + +Prebuilt packages of the Application Kernels module are available as +[releases on GitHub](https://github.com/ubccr/xdmod-appkernels/releases). + +See [the installation instructions on the Application Kernels website](http://appkernels.xdmod.org/ak-install.html) +for additional information. + +## Contributing + +Feedback is always welcome, and contributions are greatly appreciated! +Before getting started, please see +[our contributing guidelines](.github/CONTRIBUTING.md). + +## Developing + +See [the instructions for Open XDMoD](https://github.com/ubccr/xdmod#developing). + +## Building + +See [the instructions for Open XDMoD](https://github.com/ubccr/xdmod#building). + +## License + +The Open XDMoD Application Kernels module is released under the GNU +Lesser General Public License ("LGPL") Version 3.0. See the [LICENSE](LICENSE) +file for details. diff --git a/appkernel/ak_metrics.csv b/appkernel/ak_metrics.csv new file mode 100644 index 0000000..df2e22e --- /dev/null +++ b/appkernel/ak_metrics.csv @@ -0,0 +1,267 @@ +Amber,, +,Molecular Dynamics Simulation Performance, +,Time Spent in Direct Force Calculation,S +,Time Spent in Non-Bond List Regeneration,S +,Time Spent in Reciprocal Force Calculation,S +,Wall Clock Time,S +,, +Charmm,, +,Molecular Dynamics Simulation Performance, +,Time Spent in External Energy Calculation,S +,Time Spent in Integration,S +,Time Spent in Internal Energy Calculation,S +,Time Spent in Non-Bond List Generation,S +,Time Spent in Waiting (Load Unbalance-ness),S +,User Time,S +,Wall Clock Time,S +,, +CPMD,, +,All-to-All Communication Call,S +,All-to-All Communication Message,S +,All-to-All Communication Time,S +,Broadcast Communication Call,S +,Broadcast Communication Message,S +,Broadcast Communication Time,S +,Global Summation Communication Call,S +,Global Summation Communication Message,S +,Global Summation Communication Time,S +,Per-Process Memory,S +,Point-to-Point Communication Call,S +,Point-to-Point Communication Message,S +,Point-to-Point Communication Time,S +,Time Spent in Fast Fourier Transforms,S +,Wall Clock Time,S +,, +Gamess,, +,Time Spent in MP2 Energy Calculation,S +,Time Spent in Restricted Hartree-Fock Calculation,S +,User Time,S +,Wall Clock Time,S +,, +Graph500,, +,Harmonic Mean TEPS, +,Harmonic Standard Deviation TEPS, +,Mean Validation Time,S +,Median TEPS, +,Median Validation Time,S +,Wall Clock Time,S +,, +HPCC,, +,Average Double-Precision General Matrix Multiplication (DGEMM) Floating-Point Performance, +,Average STREAM 'Add' Memory Bandwidth, +,Average STREAM 'Copy' Memory Bandwidth, +,Average STREAM 'Scale' Memory Bandwidth, +,Average STREAM 'Triad' Memory Bandwidth, +,Fast Fourier Transform (FFTW) Floating-Point Performance, +,High Performance LINPACK Efficiency, +,High Performance LINPACK Floating-Point Performance, +,High Performance LINPACK Run Time,S +,MPI Random Access, +,Parallel Matrix Transpose (PTRANS), +,Wall Clock Time,S +,, +IMB,, +,Max Exchange Bandwidth, +,Max MPI-2 Bidirectional 'Get' Bandwidth (aggregate), +,Max MPI-2 Bidirectional 'Get' Bandwidth (non-aggregate), +,Max MPI-2 Bidirectional 'Put' Bandwidth (aggregate), +,Max MPI-2 Bidirectional 'Put' Bandwidth (non-aggregate), +,Max MPI-2 Unidirectional 'Get' Bandwidth (aggregate), +,Max MPI-2 Unidirectional 'Get' Bandwidth (non-aggregate), +,Max MPI-2 Unidirectional 'Put' Bandwidth (aggregate), +,Max MPI-2 Unidirectional 'Put' Bandwidth (non-aggregate), +,Max PingPing Bandwidth, +,Max PingPong Bandwidth, +,Max SendRecv Bandwidth, +,Min AllGather Latency,S +,Min AllGatherV Latency,S +,Min AllReduce Latency,S +,Min AllToAll Latency,S +,Min AllToAllV Latency,S +,Min Broadcast Latency,S +,Min Gather Latency,S +,Min GatherV Latency,S +,Min MPI-2 'Accumulate' Latency (aggregate),S +,Min MPI-2 'Accumulate' Latency (non-aggregate),S +,Min MPI-2 Window Creation Latency,S +,Min Reduce Latency,S +,Min ReduceScatter Latency,S +,Min Scatter Latency,S +,Min ScatterV Latency,S +,Wall Clock Time,S +,, +IOR,, +,HDF5 Collective N-to-1 Read Aggregate Throughput, +,HDF5 Collective N-to-1 Write Aggregate Throughput, +,HDF5 Independent N-to-1 Read Aggregate Throughput, +,HDF5 Independent N-to-1 Write Aggregate Throughput, +,HDF5 N-to-N Read Aggregate Throughput, +,HDF5 N-to-N Write Aggregate Throughput, +,MPIIO Collective N-to-1 Read Aggregate Throughput, +,MPIIO Collective N-to-1 Write Aggregate Throughput, +,MPIIO Independent N-to-1 Read Aggregate Throughput, +,MPIIO Independent N-to-1 Write Aggregate Throughput, +,MPIIO N-to-N Read Aggregate Throughput, +,MPIIO N-to-N Write Aggregate Throughput, +,POSIX N-to-1 Read Aggregate Throughput, +,POSIX N-to-1 Write Aggregate Throughput, +,POSIX N-to-N Read Aggregate Throughput, +,POSIX N-to-N Write Aggregate Throughput, +,Parallel NetCDF Collective N-to-1 Read Aggregate Throughput, +,Parallel NetCDF Collective N-to-1 Write Aggregate Throughput, +,Parallel NetCDF Independent N-to-1 Read Aggregate Throughput, +,Parallel NetCDF Independent N-to-1 Write Aggregate Throughput, +,Wall Clock Time,S +,, +LAMMPS,, +,Molecular Dynamics Simulation Performance, +,Per-Process Memory,S +,Time Spent in Bond Potential Calculation,S +,Time Spent in Communication,S +,Time Spent in Long-Range Coulomb Potential (K-Space) Calculation,S +,Time Spent in Neighbor List Regeneration,S +,Time Spent in Pairwise Potential Calculation,S +,Wall Clock Time,S +,, +MPI-Tile-IO,, +,2D Array Collective Read Aggregate Throughput, +,2D Array Collective Write Aggregate Throughput, +,2D Array HDF5 Collective Read Aggregate Throughput, +,2D Array HDF5 Collective Write Aggregate Throughput, +,2D Array Independent Read Aggregate Throughput, +,2D Array Independent Write Aggregate Throughput, +,3D Array Collective Read Aggregate Throughput, +,3D Array Collective Write Aggregate Throughput, +,3D Array HDF5 Collective Read Aggregate Throughput, +,3D Array HDF5 Collective Write Aggregate Throughput, +,3D Array Independent Read Aggregate Throughput, +,3D Array Independent Write Aggregate Throughput, +,File Close Time (2D Data Collective Read),S +,File Close Time (2D Data Collective Write),S +,File Close Time (2D Data HDF5 Collective Read),S +,File Close Time (2D Data HDF5 Collective Write),S +,File Close Time (2D Data Independent Read),S +,File Close Time (2D Data Independent Write),S +,File Close Time (3D Data Collective Read),S +,File Close Time (3D Data Collective Write),S +,File Close Time (3D Data HDF5 Collective Read),S +,File Close Time (3D Data HDF5 Collective Write),S +,File Close Time (3D Data Independent Read),S +,File Close Time (3D Data Independent Write),S +,File Open Time (2D Data Collective Read),S +,File Open Time (2D Data Collective Write),S +,File Open Time (2D Data HDF5 Collective Read),S +,File Open Time (2D Data HDF5 Collective Write),S +,File Open Time (2D Data Independent Read),S +,File Open Time (2D Data Independent Write),S +,File Open Time (3D Data Collective Read),S +,File Open Time (3D Data Collective Write),S +,File Open Time (3D Data HDF5 Collective Read),S +,File Open Time (3D Data HDF5 Collective Write),S +,File Open Time (3D Data Independent Read),S +,File Open Time (3D Data Independent Write),S +,Wall Clock Time,S +,Min Barrier Latency,S +,, +NAMD,, +,Memory,S +,Molecular Dynamics Simulation Performance, +,Wall Clock Time,S +,, +NPB,, +,Block Tridiagonal (BT) Floating-Point Performance, +,Block Tridiagonal (BT) Wall Clock Time,S +,Conjugate Gradient (CG) Floating-Point Performance, +,Conjugate Gradient (CG) Wall Clock Time,S +,Fast Fourier Transform (FT) Floating-Point Performance, +,Fast Fourier Transform (FT) Wall Clock Time,S +,LU Solver (LU) Floating-Point Performance, +,LU Solver (LU) Wall Clock Time,S +,Multi Grid (MG) Floating-Point Performance, +,Multi Grid (MG) Wall Clock Time,S +,Scalar Pentadiagonal (SP) Floating-Point Performance, +,Scalar Pentadiagonal (SP) Wall Clock Time,S +,Wall Clock Time,S +,, +NWChem,, +,Global Arrays 'Accumulate' Amount,S +,Global Arrays 'Accumulate' Calls,S +,Global Arrays 'Create' Calls,S +,Global Arrays 'Destroy' Calls,S +,Global Arrays 'Get' Amount,S +,Global Arrays 'Get' Calls,S +,Global Arrays 'Put' Amount,S +,Global Arrays 'Put' Calls,S +,User Time,S +,Wall Clock Time,S +,, +OMB,, +,Max Bandwidth, +,Max Bidirectional Bandwidth, +,Max Multiple Bandwidth / Message Rate, +,Min All-to-All Personalized Exchange Latency,S +,Min Broadcast Latency,S +,Min Latency,S +,Min Multi Latency,S +,Wall Clock Time,S +,, +OSJitter,, +,Mean Involuntary Context Switches (All But One Core in Use),S +,Mean Involuntary Context Switches (All Cores in Use),S +,Mean Involuntary Context Switches (Half of Cores in Use),S +,Mean Noise (All But One Core in Use),S +,Mean Noise (All Cores in Use),S +,Mean Noise (Half of Cores in Use),S +,Median Involuntary Context Switches (All But One Core in Use),S +,Median Involuntary Context Switches (All Cores in Use),S +,Median Involuntary Context Switches (Half of Cores in Use),S +,Median Noise (All But One Core in Use),S +,Median Noise (All Cores in Use),S +,Median Noise (Half of Cores in Use),S +,Stddev Involuntary Context Switches (All But One Core in Use),S +,Stddev Involuntary Context Switches (All Cores in Use),S +,Stddev Involuntary Context Switches (Half of Cores in Use),S +,Stddev Noise (All But One Core in Use),S +,Stddev Noise (All Cores in Use),S +,Stddev Noise (Half of Cores in Use),S +,Wall Clock Time,S +,, +Quantum ESPRESSO,, +,Per-Process Dynamical Memory,S +,Time Spent in Electron Energy Calculation,S +,Time Spent in Force Calculation,S +,Time Spent in Program Initialization,S +,User Time,S +,Wall Clock Time,S +,, +WRF,, +,Average Floating-Point Performance, +,Average Simulation Speed, +,Mean Time To Simulate One Timestep,S +,Output Data Size,S +,Peak Floating-Point Performance, +,Peak Simulation Speed, +,Time Spent on I/O,S +,Wall Clock Time,S +,, +CESM,, +,Atmosphere Component Simulation Performance, +,Coupler Component Simulation Performance, +,Initialization Time,S +,Land Component Simulation Performance, +,Max Per-Process Memory (Resident Set Size),S +,Max Per-Process Memory (Virtual Size),S +,Mean Time To Simulate One Day,S +,Median Time To Simulate One Day,S +,Min Per-Process Memory (Resident Set Size),S +,Min Per-Process Memory (Virtual Size),S +,Ocean Component Simulation Performance, +,Output Data Size,S +,Overall Simulation Performance, +,Sea-Ice Component Simulation Performance, +,Time Spent in Atmosphere Component,S +,Time Spent in Coupler Component,S +,Time Spent in Land Component,S +,Time Spent in Ocean Component,S +,Time Spent in Sea-Ice Component,S +,Wall Clock Time,S diff --git a/background_scripts/appkernel_reports_manager.php b/background_scripts/appkernel_reports_manager.php new file mode 100644 index 0000000..078b0f4 --- /dev/null +++ b/background_scripts/appkernel_reports_manager.php @@ -0,0 +1,243 @@ + + */ + +require_once __DIR__ . '/../configuration/linker.php'; + +use CCR\DB; +use CCR\Log; +use AppKernel\AppKernelDb; +use AppKernel\Report; + +// ================================================================================ +// Parse command line options +$options = array( + array( + "h", + "help", + "Print this help message" + ), + array( + "m:", + "maint-user:", + "Maintenance mode, send report only to specified user" + ), + array( + "e:", + "end-date:", + "Finale day of the report" + ), + array( + "a:", + "app-kernel:", + "Generate report ony for specified app kernel" + ), + array( + "r:", + "resource:", + "Generate report ony for specified resource" + ) +); +$options1 = ""; +$options2 = array(); +foreach ($options as $opt) { + $options1 .= $opt[0]; + $options2[$opt[0]] = $opt[1]; +} +$args = getopt($options1, $options2); + + // default values + // With the '-m' argument passed into this script along with a username, + // reports only associated with the username will be built and sent. +$maint_mode = false; +$maint_user = ''; + +$end_date = new DateTime(date('Y-m-d')); +$end_date->sub(new DateInterval('P1D')); + +$appkernel = null; + +$resource = null; + +foreach ($args as $arg => $value) { + switch ($arg) { + case 'h': + case 'help': + print("Usage: appkernel_reports_manager.php [Options]\n"); + print("Options:\n"); + foreach ($options as $opt) { + print('-' . str_replace(':', '', $opt[0])); + print(' | --' . str_replace(':', '', $opt[1])); + if (strpos($opt[0], ':') !== false) { + print('