Code Monkey home page Code Monkey logo

idefix's People

Contributors

dutta-alankar avatar glesur avatar neutrinoceros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

idefix's Issues

Linting with pre-commit hooks - [merged]

In GitLab by @neutrinoceros on Jan 6, 2021, 20:14

Merges pre-commit-hook_linter -> master

Adopt pre-commit hooks to lint and auto-fix some nitpicky style mistakes instead of a custom bash script + a vendored clone of cpplint.py.

pre-commit simplifies the linting process by

  • lifting the burden of maintaining code-checkers locally
  • automating code-checks on everyone's machine

Some of the hooks used here will also auto-fix mistakes instead of just reporting them (like trailing whitespaces and space-tabs mixing).
Note that pre-commit hooks are installed in isolated environments so they do not interact with the external one.

Note that the following rules originally enforced by test/style/check_idefix_style.sh are currently not reproduced

  • forbid }}
  • left-justify all #pragmas
  • enforcement of std:: before sqrt or cbrt
  • forbid executable source files

However, I the first 2 of those could be auto-fixed with a clang-format hook (which would de facto make cpplint useless).

In the process I did some house keeping to separate linting for actual tests in gitlab's CI config file.

maint: add 4 simple hooks - [merged]

In GitLab by @neutrinoceros on Jan 7, 2021, 19:22

Merges more_hooks -> master

Add:

  • markdown-toc: auto-gen a Table of Content in README.md (after I placed a <!-- toc --> token manually)
  • no-commit-to-branch: forbid direct (accidental) commits to master
  • check-merge-conflict: prevent accidental committing of git-conflict markers
  • check-yaml: check that yaml files (.gitlab-ci.yml) are parseable. This is not a proper validation against gitlab's expectations but it's a first level defense against mistakes.

No executable bits in non executable text files - [merged]

In GitLab by @neutrinoceros on Jan 17, 2021, 12:04

Merges no_executable_bits -> master

Add a pre-commit hook to forbid executable bits are accidentally added to text files without shebang and correct the 22 ones files in question found in the repo.

Because most of them are inifiles, here's how I corrected them in just two lines.

git ls-files **/*.ini | xargs chmod -x
chmod -x idefix_pytools/sod.py

human readable completion message

In GitLab by @neutrinoceros on Jan 26, 2021, 23:20

Currently idefix prints the total runtime in seconds, like for instance

Completed in 8064.1 seconds and 644094 cycles

it'd be nicer to get it in a %d%h%m%s format

Doc - [merged]

In GitLab by @neutrinoceros on Jan 5, 2021, 10:53

Merges doc -> master

minor improvements to README.md
Most notably, add the url for compiled docs.

feature idea: auto restart

In GitLab by @neutrinoceros on Jan 26, 2021, 11:20

-restart is especially useful when a walltime was set on the job scheduler. Currently, this option takes an int argument to represent the output number to restart from. However, when chaining jobs, it is not necessarily trivial to predict which output number is going to be last outputted. Detecting it at runtime is a simple enough task, but copy-pasting the required code in jobs submission scripts seems like a poor choice (in particular if it's buggy). I suggest we implement such a feature in idefix itself so that -restart implicitly targets the latest existing output when the number is unspecified.

Doc setup - [merged]

Merges docSetup -> master

some additional information regarding the code. Still a lot to write, but the programming guide might be helpful

Python testing framework - [merged]

In GitLab by @neutrinoceros on Jan 14, 2021, 17:39

Merges python_testing_framework -> master

Currently the repo shows up as 25% Python while it's really just a handful of lines duplicated over and over
Screen_Shot_2021-01-14_at_17.31.45

I propose a to unify the python testing framework into a single reusable module.

maint: workflow optimisations - [closed]

In GitLab by @neutrinoceros on Jan 7, 2021, 19:11

Merges ci-conf -> master

Add the following rules to avoid unnecessary CI queuing

  • only deploy the docs if they are updated
  • only run integration tests if either src/, test/ or .gitlab-ci.yml is updated.

Note: maybe it's preferable to run integration test no matter what on master... I will think about this.

performance indication overflown when the grid is large

When the grid size is large, the total number of grid points computed by TimeIntegrator to display the performance during the last integration gets an overflow, leading to negative perfs. The bug is here:

double rawperf = (timer.seconds()-lastLog) / (data.mygrid->np_int[IDIR]*data.mygrid->np_int[JDIR]*data.mygrid->np_int[KDIR]*cyclePeriod);

WIP: Pre commit.clang format - [closed]

In GitLab by @neutrinoceros on Jan 7, 2021, 14:37

Merges pre-commit.clang-format -> master

  • Replace cpplint hook with clang-format
  • format the whole code base
  • add .git-blame-ignore-revs to keep git-blame usable
  • add "contributing" docs

Contrib docs - [merged]

In GitLab by @neutrinoceros on Jan 7, 2021, 22:17

Merges contrib-docs -> master

  • add contributing guidelines (introduce pre-commit)
  • add a .git-blame-ignore-revs file to keep git blame useful.

Hotfix deploy ci - [merged]

In GitLab by @neutrinoceros on Jan 7, 2021, 11:48

Merges hotfix_deploy_ci -> master

fix #4

solution was documented on stack-overflow

while I'm at it I added a pre-commit hook to validate .gitlab-ci.yml locally

edit: taking this back. The hook in question is broken because it doesn't automatically install one of its deps.

HAVE_ENERGY is ill-defined

HAVE_ENERGY is set in definitions.hpp by user, but there is nothing checking that it is actually 1. Worse: if HAVE_ENERGY is defined to 0, then the code is inconsistent since there are #ifdef HAVE_ENERGY in the Hydro class (which assumes energy is defined), but at the same time, PRS is absent from Vc since HAVE_ENERGY=0.

New output Class - [merged]

Merges refurbOutputs -> master

This push introduces a new global Output class, which manage Vtk, dumps, user analysis and user-defined fields in vtk files.

Most notably, it changes the Setup class: Output is given as an argument of the constructor, and there is no MakeAnalysis method anymore. Analysis should now be enrolled by the Output object.

Analysis is now performed, and is used in the HallWhistler test as an example.

This push also cleans up dependencies and moves signal handling to the Input class, which is more logical (a signal is just another type of input).

Should also be coming later in this push the handling of user-def fields in vtk outputs.

maint: pin kokkos version to 3.1.01 - [merged]

In GitLab by @neutrinoceros on Jan 12, 2021, 22:04

Merges pin_kokkos -> master

This is intended to solve the issue of not having a properly pinned version for Kokkos as submodule.
Judging by how the diff looks, it seems to me that we already have a pinned version. Note that this change is technically a backpedalling move to Kokkos 3.1.01, which is exactly one commit earlier than the previously pinned version. My bet is that it won't break anything on Idedfix's side, and the benefit is that this version has a well identified release number attached, which is always preferable to a somewhat unstable and impossible-to-recall git sha (IMHO).

Warning noise from Kokkos

In GitLab by @neutrinoceros on Jan 25, 2021, 14:23

Compiling idefix generates a lot of occurrences of this warning on my machine

warning: argument unused during compilation: '--gcc-toolchain=/usr' [-Wunused-command-line-argument]

I think this comes from Kokkos. I think it'd be worth disabling it if there's nothing else we can do about it because it tends to shadow more important warnings and errors.
I'm noting this down for later reference, when/if I find a solution to this.

Pipeline broken due to bash errors in checks.sh

Pipeline won’t run on several machines because of checks.sh which have been modified to automatically detect idefix path. (See error last night in the pipeline)

This should be fixed so that it is more robust, or reverted to previous checks.sh.

one-liner log entries ?

In GitLab by @neutrinoceros on Jan 26, 2021, 23:40

Currently, a single TimeIntegrator log entry is printed in the following format

TimeIntegrator: t=999.851 Cycle 644000 dt=0.00159374
	 3.41014e+06 cell updates/second

It would be cleaner to log in fixed-width columns such as

Timeintegrator:      t     |    Cycle    |      dt     |  cell updates/s
Timeintegrator:    999.851 |    644000   |  0.00159374 |   3.41014e+06

such that the final log file could easily be reduced to a csv-compatible form, for instance

./idefix > run.log
cat run.log | grep Timeintegrator | awk -F ":" '{print $2}'

Run tests from anywhere - [merged]

In GitLab by @neutrinoceros on Dec 4, 2020, 12:20

Merges test_from_anywhere -> master

WIP (don't merge this yet)
Changes to test/checks.sh so that it's not required to run cd $IDEFiX_DIR/test to run the script.

I also want to add a warning there in case the env var ($IDEFiX_DIR) has an external and different def.

how is gamma set?

The examples have both gamma set explicitely in setup.cpp calling Hydro::SetGamma(), and examples using gamma in input.ini which is initialized by Hydro constructor.

We should have only one method to initialise gamma.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.