/[escript]/trunk/pythonMPI/src/ScriptMPI.cpp
ViewVC logotype

Diff of /trunk/pythonMPI/src/ScriptMPI.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 759 by bcumming, Thu Jun 29 01:53:23 2006 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1    
2    /* $Id$ */
3    
4    /*******************************************************
5     *
6     *           Copyright 2003-2007 by ACceSS MNRF
7     *       Copyright 2007 by University of Queensland
8     *
9     *                http://esscc.uq.edu.au
10     *        Primary Business: Queensland, Australia
11     *  Licensed under the Open Software License version 3.0
12     *     http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16  #include <Python.h>  #include <Python.h>
17  #include <mpi.h>  #include <mpi.h>
18  #include <iostream>  #include <iostream>
19  #include <stdexcept>  #include <stdexcept>
20    
21  extern "C"{  extern "C"{
22  #include "paso/Paso.h"  #include "paso/Paso_MPI.h"
 #include "finley/Finley.h"  
23  }  }
24  #ifdef PASO_MPI  #ifdef PASO_MPI
25    
# Line 27  int main( int argc, char **argv ) { Line 41  int main( int argc, char **argv ) {
41      if( mpi_info->rank )      if( mpi_info->rank )
42      {      {
43        char fname[256];        char fname[256];
44          sprintf( fname, "stdout_cpu_%04d.out", mpi_info->rank );
45        sprintf( fname, "log_P%d.txt", mpi_info->rank );        FILE *fp_out = freopen( fname, "w+", stdout );
46        FILE *fp = freopen( fname, "w+", stdout );        sprintf( fname, "stdout_cpu_%04d.err", mpi_info->rank );
47          FILE *fp_err = freopen( fname, "w+", stderr );
48      }      }
49      /*      /*
50       * Start the python parser       * Start the python parser
# Line 41  int main( int argc, char **argv ) { Line 56  int main( int argc, char **argv ) {
56       */       */
57      MPI_Finalize();      MPI_Finalize();
58    
59      Paso_MPIInfo_dealloc( mpi_info );      Paso_MPIInfo_free( mpi_info );
60    }    }
61    catch (std::runtime_error &e)    catch (std::runtime_error &e)
62    {    {

Legend:
Removed from v.759  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26