9.0
general documentation
Loading...
Searching...
No Matches
cs_resource.cpp File Reference

Resource allocation management (available time). More...

#include "base/cs_defs.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft/bft_error.h"
#include "bft/bft_printf.h"
#include "base/cs_base.h"
#include "base/cs_timer.h"
#include "base/cs_resource.h"
Include dependency graph for cs_resource.cpp:

Functions

double cs_resource_get_wt_limit (void)
 Get current wall-clock time limit.
void cs_resource_set_wt_limit (double wt)
 Set wall-clock time limit.
void cs_resource_get_max_timestep (int ts_cur, int *ts_max)
 Limit number of remaining time steps if the remaining allocated time is too small to attain the requested number of steps.

Detailed Description

Resource allocation management (available time).

Function Documentation

◆ cs_resource_get_max_timestep()

void cs_resource_get_max_timestep ( int ts_cur,
int * ts_max )

Limit number of remaining time steps if the remaining allocated time is too small to attain the requested number of steps.

Parameters
[in]ts_curcurrent time step number
[in,out]ts_maxmaximum time step number

◆ cs_resource_get_wt_limit()

double cs_resource_get_wt_limit ( void )

Get current wall-clock time limit.

Returns
current wall-time limit (in seconds), or -1

◆ cs_resource_set_wt_limit()

void cs_resource_set_wt_limit ( double wt)

Set wall-clock time limit.

Parameters
[in]wtwall-time limit (in seconds), or -1