Multi-threaded FISH

Itasca is currently developing an MPI version of FLAC3D. As work progresses, an immediate benefit has been multi-threading the FISH scripting language, resulting in much faster execution of functions. To take full advantage of multi-threaded FISH, a new LIST data type, SPLITTING syntax, and OPERATORS have been added.

FISH Lists and Splitting

The new LIST type simplifies and accelerates handling object collections (zones, gridpoints, structural elements, etc.), enabling the SPLITTING syntax to perform the same operation on multiple elements of a list. Slower loop-endloop constructions are eliminated. Lists and splitting are automatically executed on all available threads.

For example, to create a list (array passed by value) of pointers to all zones:

  local fred = list(zone.list) ;fred is a LIST of all the zone pointers in the model

Now use splitting to act on all of them in one line across all available threads!

  local yvalues = zone.pos(::zone.list)->y  ;list of the y-position of every zone

Filtering is also available (pass list of booleans as argument):

 local blist = zone.isgroup(‘mygroup’,::zone.list)
 local yin = yvalues(blist)

FISH Operators

Operators are a separate class of FISH functions designed to be called in multiple threads. So in place of:

Use of operator allows for:

The result is performed on all available threads, which greatly reduces FISH-execution bottlenecks during cycling. When FLAC3D MPI is completed, many FISH operators will run on distributed nodes completely unmodified.