This page concerns the ongoing development of the Nek5000 plugins for ICE.
Disclaimer: This is a rough draft page for development of the plugins with Nek5000 for ICE. The number of items, the item's descriptions, parameters, and profiling may change.
Types of Plugins
Currently there are 3 types of "Items" planned for:
- Nek5000 Model Builder Plugin
- Nek5000 Launcher Plugin
- Nek5000 Output Analyzer
Nek5000 Model Builder
There is one fundamental difference between using this code rather than any other. The nek5000 piece must be built (makenek) before it can be executed in the launcher. In essence, there will be several system calls (or a shell script created) to handle this process correctly. Nevertheless, the model builder will have to take an intricate approach to grab all associated file types and include the parameters for running genmap prior to building.
The REA, USR, and SIZE files are very intricate and require a lot of manipulation on the user's side. From an initial standpoint, it would become extremely complicated to break down the REA file in ICE. It might be better for files like REA to be openable with a file editor within ICE instead of trying to parameterize it within a Form. This may seem tacky at first, but it will help solve some of the dependency issues within ICE for the model and provide more flexibility to the end user of ICE. Even so, if the parameters need to be added into ICE, a separate Form might be beneficial for generating the REA file. However, brainstorming into a page segment for KV pairs might be a good tactic as well (A dedicated page in ICE where Keys and blanks are provided).
Nevertheless, REA, USR, and RE2 need to be the same name. Therefore, it will probably be best if the following pieces are in the model builder:
- An undefined Entry to represent the name of the project/operation. Folder name and first names for REA, USR, RE2. The folder path should represent the name of the model, and inside the model, the name of the folder with the contained files (within ICEFiles).
- Absolute path to SIZE. This file should only be in the project space AND be copied into the appropriate folder before runtime if its not there already.
- Location of makenek - might be a hidden entry or taken care of on the launcher statically.
- Mesh tolerance for genmap (Entry continuous, 0.0001-1)
The SESSION.NAME will be generated AFTER the item has been processed (in the model). This may need to be moved to the nek5_svn directory.
This launcher will differ slightly from the normal launcher configuration because it requires much better dependency handling, file movement, and several operations to run (genmap, make) before the launcher will execute the code. There should probably be 4 types of Item. Process operations on the Nek5000 Launcher.
- Genmap, build, execute.
I suspect this will create a two-way dynamic approach for executing the simulation and providing a way to diagnose issues with the execution order for nek5000 when an error occurs.
Also, there are a few dependencies that have to be taken care of prior to executing the process operations.
- nek5_svn is installed in /home/<user>/. This is not a dependency on ICE, but nek5.
- A build directory created in /home/<user>/nek5_svn/trunk/build.
- ALL of the utilities to be installed. Like Genmap, for example.
- A direct path to makefile. This file should be copied into the build directory.
- A direct path to the makenek file (to change compiler settings and enable MPI).
Many of these dependencies should be streamlined within the nek5_svn directory. Although the nek5_svn can be in different directories if configured correctly, for temporary purposes this should be the norm until we get a better grasp of the nek5_svn product. Nevertheless, this should be taken into consideration when designing the appropriate absolute path locations.
Also, we will need to remember that this can be run locally or remotely!
Breakdown of Item Operations:
The genmap operation will execute via command line. It will require two sets of input. The first one is the name of the project, the second one being the mesh threshold. This generates a map file. A discovered quirk is that genmap must be run in the local directory.
The build operation will run make on the makefile in the build directory. This generates a file that needs to be put in the build directory.
The execution will run the generated nek5000 executable. This will be located in the build directory. This execution (if successful) will create a list of visIT files which should be viewable via the analyzer piece.