Ignore:
Timestamp:
05/01/12 17:28:47 (13 years ago)
Author:
cborstad
Message:

merged trunk-jpl into branch through revision 12167

Location:
issm/branches/trunk-jpl-damage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-jpl-damage

  • issm/branches/trunk-jpl-damage/src/c/modules/Dakotax/Dakotax.cpp

    r12004 r12168  
    5151#endif
    5252
    53 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    54 void Dakotax(mxArray* femmodel){
    55 #else
    5653void Dakotax(FemModel* femmodel){
    57 #endif
    5854
    5955
     
    6965
    7066        /*Retrieve parameters: */
    71         #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    72         FetchData((Parameters**)&parameters,mxGetField((mxArray*)femmodel,0,"parameters"));
    73         #else
    7467        parameters=femmodel->parameters;
    75         #endif
    7668
    7769        /*Recover dakota_input_file, dakota_output_file and dakota_error_file, in the parameters dataset in parallel */
     
    8072        parameters->FindParam(&dakota_error_file,QmuErrNameEnum);
    8173
    82         #ifdef _PARALLEL_
    8374        if(my_rank==0){
    84         #endif
    8575       
    8676                // Instantiate/initialize the parallel library and problem description
    8777                // database objects.
    88                 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    89                         Dakota::ParallelLibrary parallel_lib; //use Dakota's standard library mode constructor
    90                 #else
    91                         Dakota::ParallelLibrary parallel_lib("serial"); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0.
    92                 #endif
     78                Dakota::ParallelLibrary parallel_lib("serial"); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0.
    9379                Dakota::ProblemDescDB problem_db(parallel_lib);
    9480
     
    123109                selected_strategy.run_strategy();
    124110               
    125                 #ifdef _PARALLEL_
    126111                //Warn other cpus that we are done running the dakota iterator, by setting the counter to -1:
    127112                SpawnCore(NULL,0, NULL,NULL,0,femmodel,-1);
    128                 #endif
    129113
    130         #ifdef _PARALLEL_
    131114        }
    132115        else{
     
    136119                }
    137120        }
    138         #endif //#ifdef _PARALLEL_
    139121
    140122        /*Free ressources:*/
     
    143125        xfree((void**)&dakota_output_file);
    144126
    145         #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    146         delete parameters;
    147         #endif
    148 
    149127        #endif //#ifdef _HAVE_DAKOTA_
    150128}
Note: See TracChangeset for help on using the changeset viewer.