Commit 00d887f9 authored by sebastien's avatar sebastien
Browse files

Various cleanups related to new options "bytecode" and "block"


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2879 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 0b986771
......@@ -27,8 +27,8 @@ using namespace std;
#include "ComputingTasks.hh"
#include "Statement.hh"
SteadyStatement::SteadyStatement(const OptionsList &options_list_arg, StaticDllModel::mode_t mode_arg) :
options_list(options_list_arg), mode(mode_arg)
SteadyStatement::SteadyStatement(const OptionsList &options_list_arg) :
options_list(options_list_arg)
{
}
......@@ -41,9 +41,6 @@ void
SteadyStatement::writeOutput(ostream &output, const string &basename) const
{
options_list.writeOutput(output);
/*if (mode == StaticDllModel::eSparseDLLMode)
output << "oo_.steady_state=simulate('steady');" << endl;
else*/
output << "steady;\n";
}
......@@ -82,8 +79,8 @@ void ModelInfoStatement::writeOutput(ostream &output, const string &basename) co
}
SimulStatement::SimulStatement(const OptionsList &options_list_arg, DynamicModel::mode_t mode_arg, bool block_arg, bool byte_code_arg) :
options_list(options_list_arg), mode(mode_arg), byte_code(byte_code_arg), block(block_arg)
SimulStatement::SimulStatement(const OptionsList &options_list_arg, bool block_arg, bool byte_code_arg) :
options_list(options_list_arg), byte_code(byte_code_arg), block(block_arg)
{
}
......@@ -97,7 +94,7 @@ void
SimulStatement::writeOutput(ostream &output, const string &basename) const
{
options_list.writeOutput(output);
if ((mode == DynamicModel::eStandardMode || mode == DynamicModel::eDLLMode) && !block)
if (!block)
output << "simul(oo_.dr);\n";
else
{
......@@ -119,10 +116,10 @@ SimulStatement::writeOutput(ostream &output, const string &basename) const
StochSimulStatement::StochSimulStatement(const SymbolList &symbol_list_arg,
const OptionsList &options_list_arg,
DynamicModel::mode_t mode_arg) :
bool block_arg) :
symbol_list(symbol_list_arg),
options_list(options_list_arg),
mode(mode_arg)
block(block_arg)
{
}
......@@ -150,7 +147,7 @@ StochSimulStatement::writeOutput(ostream &output, const string &basename) const
{
options_list.writeOutput(output);
symbol_list.writeOutput("var_list_", output);
if (mode == DynamicModel::eStandardMode || mode == DynamicModel::eDLLMode)
if (!block)
output << "info = stoch_simul(var_list_);" << endl;
else
output << "info = stoch_simul_sparse(var_list_);" << endl;
......
......@@ -32,9 +32,8 @@ class SteadyStatement : public Statement
{
private:
const OptionsList options_list;
const StaticDllModel::mode_t mode;
public:
SteadyStatement(const OptionsList &options_list_arg, StaticDllModel::mode_t mode_arg);
SteadyStatement(const OptionsList &options_list_arg);
virtual void checkPass(ModFileStructure &mod_file_struct);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -53,11 +52,10 @@ class SimulStatement : public Statement
{
private:
const OptionsList options_list;
const DynamicModel::mode_t mode;
const bool byte_code;
const bool block;
public:
SimulStatement(const OptionsList &options_list_arg, DynamicModel::mode_t mode_arg, bool block_arg, bool byte_code_arg);
SimulStatement(const OptionsList &options_list_arg, bool block_arg, bool byte_code_arg);
virtual void checkPass(ModFileStructure &mod_file_struct);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -77,11 +75,11 @@ class StochSimulStatement : public Statement
private:
const SymbolList symbol_list;
const OptionsList options_list;
const DynamicModel::mode_t mode;
bool block;
public:
StochSimulStatement(const SymbolList &symbol_list_arg,
const OptionsList &options_list_arg,
DynamicModel::mode_t mode_arg);
bool block_arg);
virtual void checkPass(ModFileStructure &mod_file_struct);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......
......@@ -42,7 +42,6 @@ DynamicModel::DynamicModel(SymbolTable &symbol_table_arg,
max_exo_lag(0), max_exo_lead(0),
max_exo_det_lag(0), max_exo_det_lead(0),
dynJacobianColsNbr(0),
mode(eStandardMode),
cutoff(1e-15),
markowitz(0.7),
mfs(0),
......@@ -1131,7 +1130,7 @@ DynamicModel::writeDynamicMFile(const string &dynamic_basename) const
<< "% Warning : this file is generated automatically by Dynare" << endl
<< "% from model file (.mod)" << endl << endl;
writeDynamicModel(mDynamicModelFile);
writeDynamicModel(mDynamicModelFile, false);
mDynamicModelFile.close();
}
......@@ -1159,7 +1158,7 @@ DynamicModel::writeDynamicCFile(const string &dynamic_basename) const
<< "#include \"mex.h\"" << endl;
// Writing the function body
writeDynamicModel(mDynamicModelFile);
writeDynamicModel(mDynamicModelFile, true);
// Writing the gateway routine
mDynamicModelFile << "/* The gateway routine */" << endl
......@@ -1325,7 +1324,7 @@ DynamicModel::Write_Inf_To_Bin_File(const string &dynamic_basename, const string
}
void
DynamicModel::writeSparseDynamicMFile(const string &dynamic_basename, const string &basename, const int mode) const
DynamicModel::writeSparseDynamicMFile(const string &dynamic_basename, const string &basename) const
{
string sp;
ofstream mDynamicModelFile;
......@@ -1681,14 +1680,14 @@ DynamicModel::writeSparseDynamicMFile(const string &dynamic_basename, const stri
}
void
DynamicModel::writeDynamicModel(ostream &DynamicOutput) const
DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll) const
{
ostringstream model_output; // Used for storing model equations
ostringstream jacobian_output; // Used for storing jacobian equations
ostringstream hessian_output; // Used for storing Hessian equations
ostringstream third_derivatives_output;
ExprNodeOutputType output_type = (mode != eDLLMode ? oMatlabDynamicModel : oCDynamicModel);
ExprNodeOutputType output_type = (use_dll ? oCDynamicModel : oMatlabDynamicModel);
writeModelLocalVariables(model_output, output_type);
......@@ -1810,7 +1809,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput) const
k += k2;
}
if (mode == eStandardMode)
if (!use_dll)
{
DynamicOutput << "%" << endl
<< "% Model equations" << endl
......@@ -1890,22 +1889,8 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput) const
}
void
DynamicModel::writeOutput(ostream &output, const string &basename, bool block) const
DynamicModel::writeOutput(ostream &output, const string &basename, bool block, bool byte_code, bool use_dll) const
{
output << "options_.model_mode = " << mode << ";" << endl;
// Erase possible remnants of previous runs
if (mode != eStandardMode || block)
output << "delete('" << basename << "_dynamic.m');" << endl;
if (mode != eDLLMode)
output << "erase_compiled_function('" + basename + "_dynamic');" << endl;
// Special setup for DLL or Sparse modes
if (mode == eDLLMode)
output << "mex -O LDFLAGS='-pthread -shared -Wl,--no-undefined' " << basename << "_dynamic.c" << endl;
if (block)
output << "addpath " << basename << ";" << endl;
/* Writing initialisation for M_.lead_lag_incidence matrix
M_.lead_lag_incidence is a matrix with as many columns as there are
endogenous variables and as many rows as there are periods in the
......@@ -1937,8 +1922,8 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block) c
output << ";";
}
output << "]';" << endl;
//In case of sparse model, writes the block structure of the model
//In case of sparse model, writes the block structure of the model
if (block)
{
//int prev_Simulation_Type=-1;
......@@ -2137,13 +2122,6 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block) c
<< "M_.NNZDerivatives(3) = " << NNZDerivatives[2] << ";" << endl;
}
void
DynamicModel::writeOutputPostComputing(ostream &output, const string &basename, bool block) const
{
if (block)
output << "rmpath " << basename << ";" << endl;
}
void
DynamicModel::evaluateJacobian(const eval_context_type &eval_context, jacob_map *j_m, bool dynamic)
{
......@@ -2301,7 +2279,7 @@ DynamicModel::collect_first_order_derivatives_endogenous()
void
DynamicModel::computingPass(bool jacobianExo, bool hessian, bool thirdDerivatives, bool paramsDerivatives,
const eval_context_type &eval_context, bool no_tmp_terms, bool block)
const eval_context_type &eval_context, bool no_tmp_terms, bool block, bool use_dll)
{
assert(jacobianExo || !(hessian || thirdDerivatives || paramsDerivatives));
......@@ -2372,11 +2350,11 @@ DynamicModel::computingPass(bool jacobianExo, bool hessian, bool thirdDerivative
}
else
if (!no_tmp_terms)
computeTemporaryTerms(mode == eStandardMode);
computeTemporaryTerms(!use_dll);
}
void
DynamicModel::writeDynamicFile(const string &basename, bool block, bool bytecode) const
DynamicModel::writeDynamicFile(const string &basename, bool block, bool bytecode, bool use_dll) const
{
int r;
if(block && bytecode)
......@@ -2408,57 +2386,15 @@ DynamicModel::writeDynamicFile(const string &basename, bool block, bool bytecode
perror("ERROR");
exit(EXIT_FAILURE);
}
writeSparseDynamicMFile(basename + "_dynamic", basename, mode);
writeSparseDynamicMFile(basename + "_dynamic", basename);
block_triangular.Free_Block(block_triangular.ModelBlock);
block_triangular.incidencematrix.Free_IM();
//block_triangular.Free_IM_X(block_triangular.First_IM_X);
}
else if (mode == eDLLMode)
else if (use_dll)
writeDynamicCFile(basename + "_dynamic");
else if (mode == eStandardMode)
writeDynamicMFile(basename + "_dynamic");
/*switch (mode)
{
case eStandardMode:
else
writeDynamicMFile(basename + "_dynamic");
break;
case eSparseMode:
#ifdef _WIN32
r = mkdir(basename.c_str());
#else
r = mkdir(basename.c_str(), 0777);
#endif
if (r < 0 && errno != EEXIST)
{
perror("ERROR");
exit(EXIT_FAILURE);
}
writeSparseDynamicMFile(basename + "_dynamic", basename, mode);
block_triangular.Free_Block(block_triangular.ModelBlock);
block_triangular.incidencematrix.Free_IM();
//block_triangular.Free_IM_X(block_triangular.First_IM_X);
break;
case eDLLMode:
writeDynamicCFile(basename + "_dynamic");
break;
case eSparseDLLMode:
// create a directory to store all the files
#ifdef _WIN32
r = mkdir(basename.c_str());
#else
r = mkdir(basename.c_str(), 0777);
#endif
if (r < 0 && errno != EEXIST)
{
perror("ERROR");
exit(EXIT_FAILURE);
}
writeModelEquationsCodeOrdered(basename + "_dynamic", block_triangular.ModelBlock, basename, map_idx);
block_triangular.Free_Block(block_triangular.ModelBlock);
block_triangular.incidencematrix.Free_IM();
//block_triangular.Free_IM_X(block_triangular.First_IM_X);
break;
}*/
}
void
......
......@@ -32,14 +32,6 @@ using namespace std;
class DynamicModel : public ModelTree
{
public:
//! The modes in which DynamicModel can work
enum mode_t
{
eStandardMode, //!< Standard mode (dynamic file in Matlab)
//eSparseMode, //!< Sparse mode (dynamic file in Matlab with block decomposition)
eDLLMode //!< DLL mode (dynamic file in C)
//eSparseDLLMode //!< Sparse DLL mode (dynamic file in C with block decomposition plus a binary file)
};
private:
typedef map<pair<int, int>, int> deriv_id_table_t;
//! Maps a pair (symbol_id, lag) to a deriv ID
......@@ -88,10 +80,10 @@ private:
/*! \todo add third derivatives handling */
void writeDynamicCFile(const string &dynamic_basename) const;
//! Writes dynamic model file when SparseDLL option is on
void writeSparseDynamicMFile(const string &dynamic_basename, const string &basename, const int mode) const;
void writeSparseDynamicMFile(const string &dynamic_basename, const string &basename) const;
//! Writes the dynamic model equations and its derivatives
/*! \todo add third derivatives handling in C output */
void writeDynamicModel(ostream &DynamicOutput) const;
void writeDynamicModel(ostream &DynamicOutput, bool use_dll) const;
//! Writes the Block reordred structure of the model in M output
void writeModelEquationsOrdered_M(Model_Block *ModelBlock, const string &dynamic_basename) const;
//! Writes the code of the Block reordred structure of the model in virtual machine bytecode
......@@ -146,8 +138,6 @@ private:
public:
DynamicModel(SymbolTable &symbol_table_arg, NumericalConstants &num_constants);
//! Mode in which the ModelTree is supposed to work (Matlab, DLL or SparseDLL)
mode_t mode;
//! Adds a variable node
/*! This implementation allows for non-zero lag */
virtual NodeID AddVariable(const string &name, int lag = 0);
......@@ -174,18 +164,17 @@ public:
\param no_tmp_terms if true, no temporary terms will be computed in the dynamic files
*/
void computingPass(bool jacobianExo, bool hessian, bool thirdDerivatives, bool paramsDerivatives,
const eval_context_type &eval_context, bool no_tmp_terms, bool block);
const eval_context_type &eval_context, bool no_tmp_terms, bool block, bool use_dll);
//! Writes model initialization and lead/lag incidence matrix to output
void writeOutput(ostream &output, const string &basename, bool block) const;
//! Write statements to be added to the main M-file, after computational tasks
void writeOutputPostComputing(ostream &output, const string &basename, bool block) const;
void writeOutput(ostream &output, const string &basename, bool block, bool byte_code, bool use_dll) const;
//! Complete set to block decompose the model
BlockTriangular block_triangular;
//! Adds informations for simulation in a binary file
void Write_Inf_To_Bin_File(const string &dynamic_basename, const string &bin_basename,
const int &num, int &u_count_int, bool &file_open, bool is_two_boundaries) const;
//! Writes dynamic model file
void writeDynamicFile(const string &basename, bool block, bool bytecode) const;
void writeDynamicFile(const string &basename, bool block, bool bytecode, bool use_dll) const;
//! Writes file containing parameters derivatives
void writeParamsDerivativesFile(const string &basename) const;
//! Converts to static model (only the equations)
......
......@@ -446,19 +446,12 @@ histval_list : histval_list histval_elem
histval_elem : symbol '(' signed_integer ')' EQUAL expression ';' { driver.hist_val($1, $3, $6); };
/*model_block_options_list : model_block_options_list COMMA model_block_options
| model_block_options
;
model_block_options : o_cutoff
| o_mfs
;
*/
model_options : BLOCK {driver.block(); }
model_options : BLOCK { driver.block(); }
| o_cutoff
| o_mfs
| BYTECODE {driver.byte_code();}
| BYTECODE { driver.byte_code(); }
| USE_DLL { driver.use_dll(); }
| o_linear
;
model_options_list : model_options_list COMMA model_options
......@@ -467,10 +460,6 @@ model_options_list : model_options_list COMMA model_options
model : MODEL ';' { driver.begin_model(); }
equation_list END { driver.reset_data_tree(); }
| MODEL '(' o_linear ')' ';' { driver.begin_model(); }
equation_list END { driver.reset_data_tree(); }
| MODEL '(' USE_DLL ')' ';' { driver.begin_model(); driver.use_dll(); }
equation_list END { driver.reset_data_tree(); }
| MODEL '(' model_options_list ')' ';' { driver.begin_model(); }
equation_list END { driver.reset_data_tree(); }
;
......
......@@ -27,10 +27,9 @@ ModFile::ModFile() : expressions_tree(symbol_table, num_constants),
static_model(symbol_table, num_constants),
static_dll_model(symbol_table, num_constants),
dynamic_model(symbol_table, num_constants),
linear(false)
linear(false), block(false), byte_code(false),
use_dll(false)
{
block = false;
byte_code = false;
}
ModFile::~ModFile()
......@@ -119,6 +118,18 @@ ModFile::checkPass()
exit(EXIT_FAILURE);
}
if (use_dll && (block || byte_code))
{
cerr << "ERROR: In 'model' block, 'use_dll' option is not compatible with 'block' or 'bytecode'" << endl;
exit(EXIT_FAILURE);
}
if (byte_code && !block)
{
cerr << "ERROR: In 'model' block, can't use option 'bytecode' without option 'block'" << endl;
exit(EXIT_FAILURE);
}
// Freeze the symbol table
symbol_table.freeze();
......@@ -159,7 +170,7 @@ ModFile::computingPass(bool no_tmp_terms)
// Set things to compute for dynamic model
if (mod_file_struct.simul_present)
dynamic_model.computingPass(false, false, false, false, global_eval_context, no_tmp_terms, block);
dynamic_model.computingPass(false, false, false, false, global_eval_context, no_tmp_terms, block, use_dll);
else
{
if (mod_file_struct.order_option < 1 || mod_file_struct.order_option > 3)
......@@ -170,7 +181,7 @@ ModFile::computingPass(bool no_tmp_terms)
bool hessian = mod_file_struct.order_option >= 2;
bool thirdDerivatives = mod_file_struct.order_option == 3;
bool paramsDerivatives = mod_file_struct.identification_present;
dynamic_model.computingPass(true, hessian, thirdDerivatives, paramsDerivatives, global_eval_context, no_tmp_terms, false);
dynamic_model.computingPass(true, hessian, thirdDerivatives, paramsDerivatives, global_eval_context, no_tmp_terms, false, use_dll);
}
}
......@@ -235,15 +246,31 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all) const
if (linear == 1)
mOutputFile << "options_.linear = 1;" << endl;
mOutputFile << "options_.block=" << block << ";" << endl
<< "options_.bytecode=" << byte_code << ";" << endl;
// Erase possible remnants of previous runs
if (block || byte_code)
mOutputFile << "delete('" << basename << "_dynamic.m');" << endl;
if (byte_code)
mOutputFile << "delete('" << basename << "_static.m');" << endl;
if (!use_dll)
mOutputFile << "erase_compiled_function('" + basename + "_dynamic');" << endl;
// Compile the dynamic MEX file for use_dll option
if (use_dll)
mOutputFile << "mex -O LDFLAGS='-pthread -shared -Wl,--no-undefined' " << basename << "_dynamic.c" << endl;
// Add path for block option with M-files
if (block && !byte_code)
mOutputFile << "addpath " << basename << ";" << endl;
if (dynamic_model.equation_number() > 0)
{
if (mod_file_struct.simul_present)
dynamic_model.writeOutput(mOutputFile, basename, block);
else
dynamic_model.writeOutput(mOutputFile, basename, false);
if(byte_code)
static_dll_model.writeOutput(mOutputFile, basename, block);
else
dynamic_model.writeOutput(mOutputFile, basename, block, byte_code, use_dll);
if (!byte_code)
static_model.writeOutput(mOutputFile, block);
}
......@@ -252,13 +279,9 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all) const
it != statements.end(); it++)
(*it)->writeOutput(mOutputFile, basename);
if (dynamic_model.equation_number() > 0)
{
if (mod_file_struct.simul_present)
dynamic_model.writeOutputPostComputing(mOutputFile, basename, block);
else
dynamic_model.writeOutputPostComputing(mOutputFile, basename, false);
}
// Remove path for block option with M-files
if (block && !byte_code)
mOutputFile << "rmpath " << basename << ";" << endl;
mOutputFile << "save('" << basename << "_results.mat', 'oo_', 'M_', 'options_');" << endl
<< "diary off" << endl
......@@ -273,10 +296,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all) const
static_dll_model.writeStaticFile(basename, block);
else
static_model.writeStaticFile(basename, block);
if (mod_file_struct.simul_present)
dynamic_model.writeDynamicFile(basename, block, byte_code);
else
dynamic_model.writeDynamicFile(basename, false, false);
dynamic_model.writeDynamicFile(basename, block, byte_code, use_dll);
dynamic_model.writeParamsDerivativesFile(basename);
}
......
......@@ -60,6 +60,8 @@ public:
//! Is the model stored in baytecode format (byte_code=true) or in a M-file (byte_code=false)
bool byte_code;
//! Deprecated option use_dll
bool use_dll;
//! Global evaluation context
/*! Filled using initval blocks and parameters initializations */
......
......@@ -347,7 +347,7 @@ ParsingDriver::forecast()
void
ParsingDriver::use_dll()
{
dynamic_model->mode = DynamicModel::eDLLMode;
mod_file->use_dll = true;
}
void
......@@ -586,7 +586,7 @@ ParsingDriver::add_to_row(NodeID v)
void
ParsingDriver::steady()
{
mod_file->addStatement(new SteadyStatement(options_list, mod_file->static_dll_model.mode));
mod_file->addStatement(new SteadyStatement(options_list));
options_list.clear();
}
......@@ -685,7 +685,7 @@ void ParsingDriver::rplot()
void ParsingDriver::stoch_simul()
{
mod_file->addStatement(new StochSimulStatement(symbol_list, options_list, mod_file->dynamic_model.mode));
mod_file->addStatement(new StochSimulStatement(symbol_list, options_list, mod_file->block));
symbol_list.clear();
options_list.clear();
}
......@@ -693,7 +693,7 @@ void ParsingDriver::stoch_simul()
void
ParsingDriver::simul()
{
mod_file->addStatement(new SimulStatement(options_list, mod_file->dynamic_model.mode, mod_file->block, mod_file->byte_code));
mod_file->addStatement(new SimulStatement(options_list, mod_file->block, mod_file->byte_code));
options_list.clear();
}
......
......@@ -30,9 +30,7 @@ ModFileStructure::ModFileStructure() :
order_option(0),
bvar_density_present(false),
bvar_forecast_present(false),
identification_present(false),
steady_block_mfs_option(false),
steady_block_mfs_dll_option(false)
identification_present(false)
{
}
......
......@@ -60,10 +60,6 @@ public:
bool ms_sbvar_present;
//! Whether an identification statement is present
bool identification_present;
//! Whether the option "block_mfs" is used on steady statement
bool steady_block_mfs_option;
//! Whether the option "block_mfs_dll" is used on steady statement
bool steady_block_mfs_dll_option;
};
class Statement
......
......@@ -42,7 +42,6 @@ StaticDllModel::StaticDllModel(SymbolTable &symbol_table_arg,
max_exo_lag(0), max_exo_lead(0),
max_exo_det_lag(0), max_exo_det_lead(0),
dynJacobianColsNbr(0),
mode(eStandardMode),
cutoff(1e-15),
markowitz(0.7),
mfs(0),
......@@ -822,34 +821,6 @@ StaticDllModel::writeSparseStaticMFile(const string &static_basename, const stri
chdir("..");
}
void
StaticDllModel::writeOutput(ostream &output, const string &basename, bool block) const
{
output << "options_.block=" << block << ";" << endl;
output << "options_.bytecode=1;" << endl;
output << "options_.model_mode = " << mode << ";" << endl;
// Erase possible remnants of previous runs
if (mode != eStandardMode)
output << "delete('" << basename << "_static.m');" << endl;
if (mode != eDLLMode)
output << "erase_compiled_function('" + basename + "_static');" << endl;
// Special setup for DLL or Sparse modes
if (mode == eDLLMode)
output << "mex -O LDFLAGS='-pthread -shared -Wl,--no-undefined' " << basename << "_static.c" << endl;
if (block)
output << "addpath " << basename << ";" << endl;
}
void
StaticDllModel::writeOutputPostComputing(ostream &output, const string &basename, bool block) const
{
if (block)
output << "rmpath " << basename << ";" << endl;
}
void
StaticDllModel::evaluateJacobian(const eval_context_type &eval_context, jacob_map *j_m, bool dynamic)
{
......@@ -1008,6 +979,7 @@ StaticDllModel::collect_first_order_derivatives_endogenous()
void
StaticDllModel::computingPass(const eval_context_type &eval_context, bool no_tmp_terms, bool block)
{
assert(block);
// Computes static jacobian columns
computeStatJacobianCols();
......@@ -1027,8 +999,7 @@ StaticDllModel::computingPass(const eval_context_type &eval_context, bool no_tmp
<< " - order 1" << endl;
computeJacobian(vars);
//cout << "mode=" << mode << " eSparseDLLMode=" << eSparseDLLMode << " eSparseMode=" << eSparseMode << "\n";
if (block)
{
BuildIncidenceMatrix();