ug4
Lua Utility Scripts

Modules

 common Utility
 
 Domain Discretization Utility
 functions to create DomainDiscs using a string disc-type identifier
 
 Domain Distribution Utility
 creates partition maps of different structure and provides some easy to use domain distribution methods.
 
 GNUPlot Utility
 
 Load Balancing Utility
 Parses parameters related to load-balancing and creates a load-balancer accordingly.
 
 Metaprogramming Utility
 Meta Programming Functions for Lua Scripts.
 
 Lua Utility Scripts
 Helpers for profiling output.
 
 Solver Util
 Table based solver creation.
 
 Statistics Utility
 
 Table Utility
 
 Tests Utility
 
 Timestep Utility
 
 UserData Utility
 

Files

file  scaling_analyzer.lua
 lua script to compare profiling outputs from different runs of one problem
 

Functions

function util FileDummy close () end
 
function FillSpaces (str, minSize)
 
function FindEntry (entryList, name, guessInd)
 
function util ParallelMaxMinAvg (s)
 
function util FileDummy read (...) error("io.open_0 does not support read.") end
 
function util FileDummy write (...) end
 

Detailed Description

General Lua utility scripts for ug4.

Function Documentation

◆ close()

function util FileDummy close ( )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts / ug_util.lua :178

function util.FileDummy.close() end

Referenced by available_terminals(), and ug::bridge::RegisterDegeneratedLayerManager().

◆ FillSpaces()

function FillSpaces ( str  ,
minSize   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/tools / scaling_analyzer.lua :79-85

function FillSpaces(str, minSize)
local strLen = string.len(str)
if strLen < minSize then
return str .. string.rep(" ", minSize - strLen)
end
return str
end
function FillSpaces(str, minSize)
int local(bglp_vertex_descriptor p)
Definition: parallel_matrix.h:57

◆ FindEntry()

function FindEntry ( entryList  ,
name  ,
guessInd   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/tools / scaling_analyzer.lua :92-140

◆ ParallelMaxMinAvg()

function util ParallelMaxMinAvg ( s  )

io.open_ONE opens the file on exactly one core all other cores get dummy file objects (FileDummy)

/** ParallelMaxMinAvg prints "min: (minimum), max: (maximum), avg: (average)" for parallel different integers s

location: /home/runner/work/docs/docs/ug4/ugcore/scripts / ug_util.lua :194-198

function util.ParallelMaxMinAvg(s)
return "min: "..ParallelMin(s)..", max: "..ParallelMax(s)..", avg: ".. ParallelSum(s)/NumProcs()
end
end
static T ParallelMax(T t)
Definition: pcl_bridge.cpp:79
static T ParallelSum(T t)
Definition: pcl_bridge.cpp:86
static T ParallelMin(T t)
Definition: pcl_bridge.cpp:72
int NumProcs()
returns the number of processes
Definition: pcl_base.cpp:91

◆ read()

function util FileDummy read (   ...)

◆ write()

function util FileDummy write (   ...)

returns the standard path at which grids are stored

/** perhaps move this to bridge, and use function

/** perhaps move this to file_util*

/** pairsSortedByKeys the normal pairs(table) function returns elements unsorted this function goes through elements sorted. see http://www.lua.org/pil/19.3.html use it like e.g. for name,arg in pairsSortedByKeys(util.args) do f can be nil (= std sort)

/** adds writeln

/**

/**

/** fsize returns the filesize of a file (http://www.lua.org/pil/21.3.html)

Parameters
file
Returns
filesize

/**

/**

/** WARNING: Parallel File open is REALLY slow on clusters this function overwrite io.open and prints a warning if you use it on a core which is not 0 to remove this warning

  1. check if you want to open the file on ALL cores if not, use if ProcRank()==0 open, write,close end
  2. if you're really sure you want to do that, use io.open_ALL.

/** location: /home/runner/work/docs/docs/ug4/ugcore/scripts / ug_util.lua :176

function util.FileDummy.write(...) end

Referenced by available_terminals().