Added new test suite run_inputOutput.py to systematically test I/O.
Can determine if two domains are same with Fourier analysis.
Added new method getNumDataPointsGlobal to return number of DPs of a distributed mesh.
Reading of tags in ReadMeshMPI failed occasionally, should be more robust now.

Test suite fails due to missing arg in call to Finley_Mesh_createMappings.
Added NULL arg, but still need to find proper fix as loadMesh does not work.
Adjusted SConstruct to delete pythonMPI if not compiled for MPI.

This fixes a problem which is typically arising when using reduced order
with MPI and a "small" number of elements per processor. In this case it
can happen that the couple matrix is not using all entries sent to the
processor. The old implementations assumed that the indices will cover
the entire input. This assumption has been removed.

This fixes a bug in the callculation of communication tables in
particular for the data to be send away. The problem was that the
previously used method based on the idea to use the elements stored on a
processor to decide what to send away is not suitable for the reduced
DOF. Now each processor sends a list of the DOFs it is expecting to its
naighbours.

Fixed nightly tests for savanna (no longer running in PBS cause can't
compile on compute node).
Modified domain.print_mesh_info() to tell how many elements are owned by
a node and how many are in the overlap.
Instrumented the preconditioner step.

A problem with VTK writer and MPI is fixed: Apparently MPI_file_open does not "delete" the file which has the effect that
if less date are written into the file as the file contained when opened bits of the previous containt remains in the file. This problem is fixed
by deleting the file if it exists before open it with MPI. The additional function Paso_existFile needed to be added as there is no standart C
function to test the exists of a file.

Install() on Mac OS was naming shared libs file.dylib...not OK for our
libraries for python calling C++ (escriptcpp.so and finleycpp.so).
This is because python's dlopen() calls only look for .so files.

Make operator=() on exception non-virtual. Should silence the Altix compiler.
However, if an exception is cast to another parent type, and
operator=() is called when the exception so cast is an l-value in the assignment,
an "incomplete" assignment will occur, copying only the parent class members of the
l-value in the assignmnet.

linux_gcc_eg_options.py:
remove the std99 option, it is no longer needed as the code compiles without
C 1999 extension (need for these extensions elinminated in windows port).
Turn on all warnings except unknown pragmas. Should catch a lot of stuff.
SConstruct:
Impassioned plea
system_dep.h:
Add the standard incantation for dealing with const declarations
in C code called from C and C++
blocktimer:
Get the calling interface right for C code called from C and C++
and use __const as defined in system_dep.h
(Should be re-factored into compiler_dep.h file).
MeshAdapterFactory.cpp:
Since we have (effectively) no control over netCDF policy,
cast const char *'s to char *'s

Merge in /branches/windows_from_1456_trunk_1620_merged_in branch.
You will find a preserved pre-merge trunk in tags under tags/trunk_at_1625.
That will be useful for diffing & checking on my stupidity.
Here is a list of the conflicts and their resolution at this
point in time.
=================================================================================
(LLWS == looks like white space).
finley/src/Assemble_addToSystemMatrix.c - resolve to branch - unused var. may be wrong.....
finley/src/CPPAdapter/SystemMatrixAdapter.cpp - resolve to branch - LLWS
finley/src/CPPAdapter/MeshAdapter.cpp - resolve to branch - LLWS
paso/src/PCG.c - resolve to branch - unused var fixes.
paso/src/SolverFCT.c - resolve to branch - LLWS
paso/src/FGMRES.c - resolve to branch - LLWS
paso/src/Common.h - resolve to trunk version. It's omp.h's include... not sure it's needed,
but for the sake of saftey.....
paso/src/Functions.c - resolve to branch version, indentation/tab removal and return error
on bad unimplemented Paso_FunctionCall.
paso/src/SolverFCT_solve.c - resolve to branch version, unused vars
paso/src/SparseMatrix_MatrixVector.c - resolve to branch version, unused vars.
escript/src/Utils.cpp - resloved to branch, needs WinSock2.h
escript/src/DataExpanded.cpp - resolved to branch version - LLWS
escript/src/DataFactory.cpp - resolve to branch version
=================================================================================
This currently passes tests on linux (debian), but is not checked on windows or Altix yet.
This checkin is to make a trunk I can check out for windows to do tests on it.
Known outstanding problem is in the operator=() method of exceptions
causing warning messages on the intel compilers.
May the God of doughnuts have mercy on my soul.

Merge of branches/windows_from_1431_trunk.
Revamp of the exception system.
Fix unused vars and signed/unsigned comparisons.
defined a macro THROW(ARG) in the system_dep.h's to
deal with the expectations of declarations on different architectures.
Details in the logs of branches/windows_from_1431_trunk.
pre-merge snapshot of the trunk in tags/trunk_at_1452

inserted sys.exit(1) into the tests so scons can detect the failure of the test.
A similar statement has been removed from an earlier as it produces problems on 64bit Linux. Previously exit(0) was called in case of success but now this is not done in order to avoid a fatal end of the program. in the case of an error in the test there could be a fatal error so but I guess that this not really a problem.
PS: the fact that signal 0 was returned even for the case of an error lead to the illusion that all tests have been completed successfully.

Completed mesh.dump(file) and mesh=LoadMesh(file) by adding TagMap and
implementing MPI parallelism.
Now allocating ElementFile for ContactElements even if there are none.
Removed file Mesh_dump.c since dump/loadMesh are in CPPAdapter/MeshAdapter*.cpp.

Modified scons target release_src to include lib/ and include/ since
their presence is required for a build. Modified
mydomain.print_mesh_info(True) to include more useful info about a
distributed domain. Added mypde.getOperator().print_matrix_info(True)
to tell about a distributed matrix.

The MPI branch is hereby closed. All future work should be in trunk.
Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

Added new methods for integration of Tri's and Tet's For Order 2 and 3.
NB: There is a conflict in the testing of the getNormal() function. On consultation with Lutz, we have concluded this is an issue with the test rather than the new methods.

Some changes to make things run on windows. There is still a problem with netcdf an long file names on windows but there is the suspicion that this is a bigger problem related to boost (compiler options). In fact runs with large numbers of iteration/time steps tend to create seg faults.

Changes needed for windows. This still does not work on and has not run on linux and the altix.
There are a few changes in names in the scons script, in particular _libs is used rather than _lib and _libs is always a list. By default on windows MSVC is used. The location of python is at C:\Program Files\python<version>, boost at C:\Program Files\boost and netcdf at C:\Program Files\netcdf.

Added explicit destructors to all Exception classes.
Fixed an ifdef in TestCase.cpp
Made the conditional definition of M_PI in LocalOps.h
depend only on M_PI being undefined.
Replace dynamically dimensioned arrays in DataFactory & DataTagged with malloc.
sort() method of list does not take a named argument
(despite the manual's claims to the contary).

The set/getRefVal functions of Data objects have been removed (mainly to avoid later problems with MPI).
Moreover, a faster access to the reference id of samples has been introduced. I don't think that anybody will
profit form this at this stage but it will allow a faster dump of data objects.

escript data objects can now be saved to netCDF files, see http://www.unidata.ucar.edu/software/netcdf/.
Currently only constant data are implemented with expanded and tagged data to follow.
There are two new functions to dump a data object
s=Data(...)
s.dump(<filename>)
and to recover it
s=load(<filename>, domain)
Notice that the function space of s is recovered but domain is still need.
dump and load will replace archive and extract.
The installation needs now the netCDF installed.

coordinates, element size and normals returned by corresponding
FunctionSpace mesthods are now protected against updates. So
+=, -=, *=, /=, setTaggedValue, fillFromNumArray will through an
excpetion.
The FunctionSpace class does nut buffer the oordinates, element size and
normals yet.

Large number of changes to Finley for meshing in MPI.
- optimisation and neatening up of rectcanglular mesh generation code
- first and second order 1D, 2D and 3D rectangular meshes are now
available in finley and escript using MPI.
- reduced meshes now generated in MPI, and interpolation to and from
reduced data types now supported.

+ Updated compilation options for Cognac to squeeze out a bit more performance
+ Now compiles using the Intel Math headers (mathimf.h) rather than plain math.h on both Win32 and Linux platforms when using the Intel compiler. Gives a small boost to performance on Altix and is essential on Windows

The test for the contact normal has been modified to take in cosideration the fact that the normal is unique up to the factor +/-1.
Now the test checks the kllength of the normal for 1 and the angle to the reference normal.

- added directory pythonMPI to the source tree. this directory contains
the c++ wrapper that is used to run python scripts in parallel for the
MPI version of escript/finley
- updated the SConstruct and ./scons/ess_options.py for conditional MPI
compilation. To compile the MPI version on ESS uncomment the #define
PASO_MPI in ./paso/src/Paso.h and add the command line option
useMPI=yes when running scons.
- fixed a compile time error in the MPI build in
finley/src/CPPAdapter/MeshAdapterFactory.cpp

Changes relating to the MPI version of escript
The standard OpenMP version of escript is unchanged
- updated data types (Finley_Mesh, Finley_NodeFile, etc) to store meshes
over multiple MPI processes.
- added CommBuffer code in Paso for communication of Data associated
with distributed meshes
- updates in Finley and Escript to support distributed data and operations
on distributed data (such as interpolation).
- construction of RHS in MPI, so that simple explicit schemes (such as
/docs/examples/wave.py without IO and the Locator) can run in MPI.
- updated mesh generation for first order line, rectangle and brick
meshes and second order line meshes in MPI.
- small changes to trunk/SConstruct and trunk/scons/ess_options.py to
build the MPI version, these changes are turned off by default.

A few changes in the build mechanism and the file structure so scons can build release tar files:
* paso/src/Solver has been moved to paso/src
* all test_.py are now run_.py files and are assumed to be passing python tests. they can run by
scons py_tests and are part of the release test set
* escript/py_src/test_ are moved to escript/test/python and are installed in to the build directory
(rather then the PYTHONPATH).
* all py files in test/python which don't start with run_ or test_ are now 'local_py_tests'. they are installed i
by not run automatically.
* CppUnitTest is now treated as a escript module (against previous decisions).
* scons realse builds nor tar/zip files with relvant source code (src and tests in seperate files)
the python tests don't pass yet due to path problems.

+ NEW BUILD SYSTEM
This commit contains the new build system with cross-platform support.
Most things work are before though you can have more control.
ENVIRONMENT settings have changed:
+ You no longer require LD_LIBRARY_PATH or PYTHONPATH to point to the
esysroot for building and testing performed via scons
+ ACcESS altix users: It is recommended you change your modules to load
the latest intel compiler and other libraries required by boost to match
the setup in svn (you can override). The correct modules are as follows
module load intel_cc.9.0.026
export
MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6
module load boost/1.33.0/python-2.4.1
module load python/2.4.1
module load numarray/1.3.3

The sparse solver can be called by paso now.
the building has been change to reduce some code redundancy:
now all scons SCscripts are importing scons/esys_options.py which
imports platform specific settings.