Giter Site home page Giter Site logo

cpl's People

Contributors

cnsidero avatar sayerhs avatar

Watchers

 avatar  avatar  avatar  avatar

cpl's Issues

Allow user to configure MPI execution

Users must be able to submit parallel jobs using the following workflows:

  • Local MPI execution (no queues and single machine)
  • MPI execution using hostfiles for local networking
  • MPI job execution via SLURM/PBS queues

The following MPI implementations must be supported

  • OpenMPI
  • MPICH
  • MSMPI

Add multiple version support in caelus scripts

CPL can handled multiple versions but that functionality is only accessible through the CPL module in a custom Python script. Running multiple versions through the caelus run or caelus tasks should be supported with, for example, a cmd option:

caelus --cml-version="8.04-dev" run

where "8.04-dev" would be a version specified in the configuration file.

Add task groupings

To facilitate workflows that require collaboration between case directories, a mechanism to group tasks based on the case directory should be added.

A suggested solution would be to add a new task called task_group where the case directory is used by all sub-tasks. E.g. yaml

tasks:
   - task_group:
        case_dir: <coarse mesh case dir>
        - clean_case:
             remove_zero: no
             remove_mesh: no
        - run_command:
            cmd_name: simpleSolver
   - task_group:
        case_dir: <fine mesh case dir>
        - run_command:
            cmd_name: mapFields
            cmd_args: "<coarse mesh case dir> -consistent -sourceTime latestTime"
        - run_command:
            cmd_name: decomposePar
            cmd_args: "-force"
        - run_command:
            cmd_name: simpleSolver
            parallel: True

Add CPL to CML installer

Add an option in CML installer to allow user to install CPL alongside during installation process.

Add CPL action scripts to tutorials

For CPL release, we should be able to run tutorials through CPL interface. The following tasks must be completed for this

  • Create replacements of Allrun.py in tutorials that can be run with caelus_tutorials
  • Implement ability to replace Allclean.py with caelus_tutorials
  • Test complete tutorial suite execution on all major platforms

Add event handler

The current method to stop CPL actions, is to kill it with CTRL+C. It would be helpful if CPL had a simple event handler to more gracefully stop actions.

I suppose for the cfg, env, clone, logs, and clean actions nothing particularly special needs to done under the hood, other than not proceeding past the next "operation". What constitutes an operation would have to be determined.

For the run and tasks actions, the proper signal would need to be passed to the CML application. CML applications can be aborted with the abort function object whereby the application can perform various abort types if a particular file name exists in the case directory. E.g. in the controlDict

functions
{
    controlOnNext
    {
        type abort;
        functionObjectLibs ( "libjobControl.so" );
        action nextWrite;
        fileName "snapshot";
    }
 
    killNow
    {
        type abort;
        functionObjectLibs ( "libjobControl.so" );
        action noWriteNow;
        fileName "killrun";
    }
 
    suspendNow
    {
        type abort;
        functionObjectLibs ( "libjobControl.so" );
        action writeNow;
        fileName "suspend";
    }
}

Perhaps CPL could automatically add a template version of the above example to the controlDict for the run or tasks actions. Then upon receiving a particular event, e.g. CTRL+C would correspond to the noWriteNow action, CPL would create the specific file in the case direction. The function object automatically deletes the file so no further action would be required. Other keyboard events could be used for nextWrite and writeNow.

This would require some discussion about design before any implementation would occur,

Add ability to monitor logs during a run

For long runs, especially submitted on a queue it is desirable to allow user to monitor logs as the run progresses.

  • Enhance logs processor to be able to watch a log file during run
  • Add capability to update residual plots real-time with updates

caelus_tutorials exclude patterns not working correctly

Multiple invocations of the -e (--exclude-patterns) option with the caelus_tutorials script does not work correctly. It causes the script to find all the tutorials for each time -e is used and excludes the patterns for one instance of each tutorial. E.g.

caelus_tutorials --clean -d incompressible/simpleSolver/ras -e "*pitzDaily*" -e "*turbineSiting*"

Should clean all the tutorials in the incompressible/simpleSolver/ras directory except those with pitzDaily and turbineSiting in the path name. However, each tutorial is cleaned twice except the those matching the patterns are cleaned once.

Can't exclude fields with watch option with caelus logs

When using the -w option with caelus logs, excluding certain fields with -e option is ignored. E.g.

caelus logs -w -c -e "pCorr" simpleSolver.log

will still plot the pCorr residual. It works correctly when creating a plot.

caelus logs -p -c -e "pCorr" simpleSolver.log

Use following log file for debugging.
simpleSolver.log

Error in LogProcessor

When testing log processing on a log file from the VOF solver, CPL returns the following error:

Traceback (most recent call last):
  File "/home/cnsidero/.virtualenv/bin/caelus", line 11, in <module>
    load_entry_point('caelus', 'console_scripts', 'caelus')()
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/scripts/caelus.py", line 414, in main
    cmd()
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/scripts/core.py", line 133, in __call__
    self.args.func()
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/scripts/caelus.py", line 383, in process_logs
    logfile=args.log_file)
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/post/logs.py", line 309, in __init__
    logs()
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/post/logs.py", line 101, in __call__
    self._process_file(patterns)
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/post/logs.py", line 126, in _process_file
    pat.send(line)
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/utils/coroutines.py", line 49, in grep
    tgt.send(mat)
  File "/home/cnsidero/Development/AppliedCCM/caelus/caelus-python/caelus/post/logs.py", line 238, in continuity_processor
    "\t".join(x for x in rexp.groups()) + "\n")
AttributeError: 'LogProcessor' object has no attribute 'time_str'

Reproduce by using the attached log file:
vofSolver-test.log

$> caelus logs vofSolver-test.log

Add user app and lib path to environment

No support to use applications or libraries that exist in CAELUS_USER_APPBIN and CAELUS_USER_LIBBIN, respectively.

Additionally, caelus env does not add the aforementioned environment variables the output file.

SLURM mpi setup

Set mpiexec as the default instead of srun for SLURM queue submits.

CPL plotting utility for logs

Create a utility to quickly plot QoIs from log files

  • Residuals - provide option to select specific fields or all fields
  • Force and force coefficients

caelus logs won't process after last time step upon stopping plot watcher

Upon stopping the log plot watcher before the solver has finished, e.g.

$> caelus logs -w simpleSolver.log

further processing of the log files, e.g.

$> caelus logs -p simpleSolver.log

won't process the log file past the time-step/iteration at which the plot watcher was stopped unless the .logs_state.json file is removed from the logs dir.

Test CPL on Windows

Ensure that all features work on Windows OS.

  • Detect and load CPL config from several locations
    • caelus.yaml in APPDATA
    • caelus.yaml in USERPROFILE
    • caelus.yaml in current working directory
    • Files pointed to by CAELUSRC_SYSTEM and CAELUSRC
  • Creation of caelus-environment.cmd
  • MPICH and MSMPI settings, execution in parallel
  • Installation process (user docs) for conda and virtualenv (See #2)
  • Run tutorials to test execution in parallel and serial modes

custom log file name not working

When specifying a custom log file name either in a task file with log_file option or with the run action (e.g. caelus run simpleSolver -l test.log), the default log file is always used, e.g. simpleSolver.log for simpleSolver.

Plot forces and other data from function objects

Add support for generating plots of forces and other data written by function objects during simulation runs. Some obvious ones to support might be:

  • forces
  • forceCoeffs
  • probes
  • fieldMinMax
  • patchMassFlow
  • patchAverage
  • patchIntegrate

They may be others to consider

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.