Skip to content

Commit

Permalink
remove jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz-h committed Jul 4, 2024
1 parent 5586bfe commit 072eb1d
Show file tree
Hide file tree
Showing 51 changed files with 26 additions and 1,362 deletions.
71 changes: 0 additions & 71 deletions core/include/mmcore/job/AbstractJob.h

This file was deleted.

73 changes: 0 additions & 73 deletions core/include/mmcore/job/AbstractThreadedJob.h

This file was deleted.

62 changes: 0 additions & 62 deletions core/src/job/AbstractJob.cpp

This file was deleted.

68 changes: 0 additions & 68 deletions core/src/job/AbstractThreadedJob.cpp

This file was deleted.

56 changes: 0 additions & 56 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,62 +629,6 @@ It will need to wait if the correct data is not available, yet, which can reduce
-->

<!-- ###################################################################### -->
<!-- TODO: UPDATE or DEPRECATED
## Jobs
This chapter discusses the job concept available in MegaMol.
Especially, how jobs can be used for data conversion.
Examples are based on the project script files available in the installed `examples` directory.
### Job Instance
Jobs are the second type of instances available at the MegaMol runtime (compare view instances in section [Views](#views)).
The primary difference is the `<job>` tag as primary instance tag.
Similarly, to the viewmod attribute, the `<job>` tag specifies a jobmod module as entry module.
```xml
<job name="convjob" jobmod="job">
```
One significant limitation of this release is that the MegaMol Configurator is only able to edit view instance descriptions, see section [Configurator](#configurator).
If you want graphical assistance in creating a job description, the recommended way is to create a view instance description with all required modules and calls.
Use a `DataWriterJob` module as an entry point.
Save the corresponding project file and edit it manually with a text editor.
Replace the `<view>` tags with the similarly behaving `<job>` tags and adjust the corresponding attributes.
### Converting to MMPLD
The MegaMol Particle List Data file format (MMPLD) is a very fast loading binary memory dump of MegaMol meant for small and mid-sized datasets (1-10 mio. particles). MegaMol can convert most of its supported file formats to MMPLD file format. More precisely, all file formats which are loaded by a MegaMol module supporting the `MultiParticleDataCall` can be converted to MMPLD. For this, specify a converter job using a `DataWriterJob` module and a `MMPLDWriter` module. The content of the project file `makemmpld.mmprj` which can be used to convert data into the MMPLD file format, is shown below.
```xml
<?xml version="1.0" encoding="utf-8"?>
<MegaMol type="project" version="1.3">
<job name="convjob" jobmod="job">
<module class="SIFFDataSource" name="data" />
<module class="DataWriterJob" name="job" />
<module class="MMPLDWriter" name="writer" />
<call class="DataWriterCtrlCall" from="job::writer" to="writer::control" />
<call class="MultiParticleDataCall" from="writer::data" to="data::getdata" />
</job>
</MegaMol>
```
The entry module for data conversion is of class `DataWriterJob`, see line 11. This job module controls writing several files into a new data set. The output is implemented in corresponding write modules, like the `MMPLDWriter`, see line 12. This writer module is then connected to a module providing the data. In the simplest scenario, this is directly a data loader module. The above example selects one module from several options, in the same way the data viewing project does (see section [Project Files](#project-files)). The job is instantiated similarly using the command line. The paths for `makemmpld.mmprj` and `inputfile.siff` might need to be adjusted:
$ mmconsole -p makemmpld.mmprj -i convjob j -v j::data::filename inputfile.siff -v j::writer::filename outputfile.mmpld
The input file name and output file name are explicitly specified using the -v arguments.
The job execution starts immediately.
After data is written, MegaMol terminates itself.
To convert from other file formats, for which a corresponding loader does exist, you should be able to adjust this project file.
-->

<!-- ###################################################################### -->
-----
## Reproducibility
Expand Down
7 changes: 2 additions & 5 deletions plugins/cluster/include/cluster/ClusterController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "mmcore/CalleeSlot.h"
#include "mmcore/Module.h"
#include "mmcore/job/AbstractThreadedJob.h"
#include "mmcore/param/ParamSlot.h"
#include "vislib/net/DiscoveryListener.h"
#include "vislib/net/DiscoveryService.h"
Expand All @@ -25,9 +24,7 @@ class ClusterControllerClient;
/**
* Class implementing the cluster rendering master job
*/
class ClusterController : public job::AbstractThreadedJob,
public Module,
public vislib::net::cluster::DiscoveryListener {
class ClusterController : public Module, public vislib::net::cluster::DiscoveryListener {
public:
/** DiscoveryService::PeerHandle */
typedef vislib::net::cluster::DiscoveryService::PeerHandle PeerHandle;
Expand Down Expand Up @@ -113,7 +110,7 @@ class ClusterController : public job::AbstractThreadedJob,
* @return The application dependent return code of the thread. This
* must not be STILL_ACTIVE (259).
*/
DWORD Run(void* userData) override;
DWORD Run(void* userData) /*override*/; // TODO old interfaced used by Jobs, currently has no trigger.

/**
* This method will be called, if a new computer was found
Expand Down
5 changes: 2 additions & 3 deletions plugins/cluster/src/ClusterController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ const char* cluster::ClusterController::DEFAULT_CLUSTERNAME = "MM04RC";
* cluster::ClusterController::ClusterController
*/
cluster::ClusterController::ClusterController()
: job::AbstractThreadedJob()
, Module()
: Module()
, vislib::net::cluster::DiscoveryListener()
, cdsNameSlot("cdsName", "Name of the rendering cluster")
, cdsPortSlot("cdsPort", "The ip port to be used by the cluster discovery service.")
Expand Down Expand Up @@ -227,7 +226,7 @@ void cluster::ClusterController::release() {
DWORD cluster::ClusterController::Run(void* userData) {
const unsigned int sleepTime = 250;

while (!this->shouldTerminate()) {
while (true /*!this->shouldTerminate()*/) { // TODO old interfaced used by Jobs.

// update cluster discovery settings
if (this->cdsNameSlot.IsDirty() || this->cdsPortSlot.IsDirty() || this->cdsRunSlot.IsDirty()) {
Expand Down
6 changes: 0 additions & 6 deletions plugins/datatools/src/CSVWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,3 @@ bool megamol::datatools::CSVWriter::run() {

return true;
}


bool megamol::datatools::CSVWriter::getCapabilities(core::DataWriterCtrlCall& call) {
call.SetAbortable(false);
return true;
}
Loading

0 comments on commit 072eb1d

Please sign in to comment.