open_config_file Subroutine

public subroutine open_config_file(L, filename, ErrCode, ErrString, buffer)

Subroutine to load and execute a script from a file.

If you are using MPI for parallelization, have a look at the tem_open_distconf routine in the treelm library instead.

Arguments

TypeIntentOptionalAttributesName
type(flu_State) :: L

Handle to the Lua script

character(len=*), intent(in) :: filename

Name of file to load the Lua code from

integer, intent(out), optional :: ErrCode

Error code returned by Lua during loading or executing the file.

This optional parameter might be used to react on errors in the calling side. If neither ErrCode nor ErrString are given, this subroutine will stop the program execution and print the error message from Lua to the stdout.

character(len=*), intent(out), optional :: ErrString

Obtained error description from the Lua stack.

This optional argument holds the Lua error message in case somehting went wrong. It can be used to provide some feedback to the user in the calling routine. If neither ErrCode nor ErrString are provided, open_config() will print the error message and stop program execution.

type(cbuf_type), intent(out), optional :: buffer

Optional argument to return the compiled script after loading it to the caller.

It might be handy to reuse the loaded script later on, this argument allows you to obtain the script in compiled form, before it is executed. The buffer will be allocated and filled with the Lua data. It contains the actual string in buffer%buffer which is a character pointer, and the original c_ptr to this


Calls

proc~~open_config_file~~CallsGraph proc~open_config_file open_config_file proc~flu_isopen flu_isopen proc~open_config_file->proc~flu_isopen flul_newstate flul_newstate proc~open_config_file->flul_newstate proc~aot_err_handler aot_err_handler proc~open_config_file->proc~aot_err_handler flul_openlibs flul_openlibs proc~open_config_file->flul_openlibs flul_loadfile flul_loadfile proc~open_config_file->flul_loadfile proc~flu_pcall flu_pcall proc~open_config_file->proc~flu_pcall interface~flu_dump flu_dump proc~open_config_file->interface~flu_dump proc~flu_tolstring flu_tolstring proc~aot_err_handler->proc~flu_tolstring interface~lua_pcallk lua_pcallk proc~flu_pcall->interface~lua_pcallk proc~flu_dump_tobuf flu_dump_toBuf interface~flu_dump->proc~flu_dump_tobuf interface~lua_tolstring lua_tolstring proc~flu_tolstring->interface~lua_tolstring dump_lua_tobuf dump_lua_tobuf proc~flu_dump_tobuf->dump_lua_tobuf

Called by

proc~~open_config_file~~CalledByGraph proc~open_config_file open_config_file proc~aot_path_open_table aot_path_open_table proc~aot_path_open_table->proc~open_config_file interface~aot_path_open aot_path_open interface~aot_path_open->proc~aot_path_open_table proc~aot_path_open_fun aot_path_open_fun interface~aot_path_open->proc~aot_path_open_fun proc~aot_path_open_fun->proc~aot_path_open_table

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: err
integer, private :: length