Re: [Paraview] how to compile it again

2008-09-10 Thread pat marion
Hi Gang,

I noticed a previous post of yours on the mailing list where you said you
wanted to include headers like QPoint and QTime.  Are these the headers
you are trying to add to pvserver.cxx?

Normally, Qt headers like this are not added to files in
ParaView3/Servers/Executables.  The pvserver executable is not linked with
Qt libraries, only the client GUI executable is (files in ParaView3/Qt and
ParaView3/Applications/Client)

Pat

2008/9/10 Moreland, Kenneth [EMAIL PROTECTED]

 The header files you are trying to include are apparently not in the
 include
 path.  You can add paths for the compile to search for include files using
 the INCLUDE_DIRECTORIES CMake command in the
 ParaView3/Servers/Executables/CMakeLists.txt file.

 -Ken


 On 9/9/08 7:07 PM, 吴亚刚 [EMAIL PROTECTED] wrote:

 
   hi , everyone, I was a  little confused about some re-compile
 problems on
  Paraview.
 
   I have added some include files into the original file pvserver.cxx
 for
  some custom usage. (Using VS.Net2005)
 
   When compile it , it said that the include file could not be found.
 And
  If I use the absolute directory, then the lib file would not be found.
 
   Of course that was not a good solutio. How to simplely compile it ?
 
  thanks.
 

 ___
 ParaView mailing list
 ParaView@paraview.org
 http://www.paraview.org/mailman/listinfo/paraview

___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] hdf5 in paraview segfaults on sparc

2008-09-10 Thread Ondrej Certik
On Wed, Sep 10, 2008 at 7:42 PM, Berk Geveci [EMAIL PROTECTED] wrote:
 Which version of hdf5 is Debian using? Maybe we should upgrade the one
 in ParaView...

1.6.6-4

I don't know which version Paraview uses, but the problem is that even
the newest hdf5 from upstream one has the bug, see the bug report in
my original email for details.

Ondrej
___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] vtkScalars used in Paraview?

2008-09-10 Thread Natalie Happenhofer

Hi!
Isn´t the vtk class vtkScalars used in Paraview? I didn´t find the .h or .cxx 
file for it. How can I add it, i.e. where do I place the source and which 
cMakeLists files do I have to alter to get it compiled with the rest?

thx,
Natalie

_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] filterneu

2008-09-10 Thread Natalie Happenhofer



_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/#include vtkHorizontalAverage.h
#include vtkDataSet.h
#include vtkStructuredGrid.h
#include vtkStructuredPoints.h
#include vtkRectilinearGrid.h
#include vtkDataArray.h
#include vtkObjectFactory.h
#include vtkPointData.h
#include vtkFloatArray.h

vtkStandardNewMacro(vtkHorizontalAverage);

vtkHorizontalAverage::vtkHorizontalAverage()
{
	this - Normalize = 0;
}

void vtkHorizontalAverage::PrintSelf(ostream os, vtkIndent indent)
{
	this-Superclass::PrintSelf(os,indent);
	
	os  indent  Normalize:  
  (this-Normalize ? this-Normalize : 0)  endl;
}

void vtkHorizontalAverage::Execute()
{vtkDataSet *input = this - GetInput();
 vtkStructuredGrid *output = this -GetOutput();

 int DataSetType;
 DataSetType = input - GetDataObjectType();

 int dims[3],i,j,k;
 // pointer for casting
 vtkRectilinearGrid *rect_input = vtkRectilinearGrid::New();
 vtkStructuredGrid *structgrid_input = vtkStructuredGrid::New();

 vtkPointData *iPtr,*oPtr;
 double *inPtr, *outPtr;

 vtkDataArray *scaldat;
 vtkDataArray *new_scaldat;

 vtkFloatArray *scalars = vtkFloatArray::New();
 vtkFloatArray *new_scalars = vtkFloatArray::New();

 int numPts = input - GetNumberOfPoints();
 output - Allocate(numPts);


 if((DataSetType == VTK_RECTILINEAR_GRID)  (rect_input = vtkRectilinearGrid::SafeDownCast(input)))
  {
   rect_input - GetDimensions(dims);

   //get the scalar attribute Data
 iPtr = rect_input-GetPointData();
 scaldat = iPtr - GetScalars();
 oPtr = output-GetPointData();
 new_scaldat = oPtr - GetScalars();

 scalars = vtkFloatArray::SafeDownCast(scaldat);
 new_scalars = vtkFloatArray::SafeDownCast(new_scaldat);

 if(!scaldat  !new_scaldat) vtkErrorMacro(Downcast to vtkFloatArray failed);

//  inPtr = rect_input-GetPoint(0);
//  outPtr = output-GetPoint(0);
 }

 else if((DataSetType == VTK_STRUCTURED_GRID ) (structgrid_input = vtkStructuredGrid::SafeDownCast(input)))
 {vtkPointData *iPtr = structgrid_input-GetPointData();
  vtkPointData *oPtr = output-GetPointData();

  iPtr = structgrid_input-GetPointData();
 scaldat = iPtr - GetScalars();
 oPtr = output-GetPointData();
 new_scaldat = oPtr - GetScalars();

 scalars = vtkFloatArray::SafeDownCast(scaldat);
 new_scalars = vtkFloatArray::SafeDownCast(new_scaldat);

 if(!scaldat  !new_scaldat) vtkErrorMacro(Downcast to vtkFloatArray failed);

 structgrid_input-GetDimensions(dims);
 }

 else vtkErrorMacro(unsupported Dataset Format);

 double *horizontal = new double[dims[0]];
  	double *horizontal_sigma = new double[dims[0]];
  	int index;
  	// compute the horizontal average
for (i=0; idims[0]; i++) { 
	horizontal[i] = 0.0;
		for (j=0; jdims[1]; j++) {
			for (k=0; kdims[2]; k++) {
index = k*(dims[1]*dims[0]) + j*dims[0] + i;
horizontal[i] += scalars - GetComponent(index, 1); //horizontal[i] += inPtr[index];
			}
		}
		horizontal[i] = horizontal[i]/(dims[1]*dims[2]);
}

	//subtract horizontal average
for (i=0; idims[0]; i++) { 
	for (j=0; jdims[1]; j++) {
			for (k=0; kdims[2]; k++) {
index = k*(dims[1]*dims[0]) + j*dims[0] + i;
new_scalars - InsertNextTuple ((scalars - GetScalar(index)) - horizontal[i]);
			}
		}
}

	if (this-GetNormalize()) {
		// compute sigma
	for (i=0; idims[0]; i++) { 
			horizontal_sigma[i] = 0.0;
 			for (j=0; jdims[1]; j++) {
for (k=0; kdims[2]; k++) {
	 index = k*(dims[1]*dims[0]) + j*dims[0] + i;
   	horizontal_sigma[i] += (scalars - GetComponent(index, 1))*(GetComponent(index, 1));
}
		}
  			horizontal_sigma[i] /= (dims[1]*dims[2]-1);
  			horizontal_sigma[i] = sqrt(horizontal_sigma[i]);	
		}
		
		// now normalize
	for (i=0; idims[0]; i++) { 
 			for (j=0; jdims[1]; j++) {
for (k=0; kdims[2]; k++) {
	 index = k*(dims[1]*dims[0]) + j*dims[0] + i;
   	//outPtr[index] /= horizontal_sigma[i];
	new_scalars - InsertNextTuple((new_scalars - GetScalar(index)) /= horizontal_sigma[i])
}
		}
 		}
	}

	delete [] horizontal;
	delete [] horizontal_sigma;
	
	//now set output
	output - CopyStructure(input);
	output - SetScalars (new_scalars);

		
	
	iPtr-Delete();
oPtr-Delete();
delete [] inPtr;
delete [] outPtr;


}

#ifndef __vtkHorizontalAverage_h
#define __vtkHorizontalAverage_h

#include vtkDataSetToStructuredGridFilter.h

class VTK_EXPORT vtkHorizontalAverage : public vtkDataSetToStructuredGridFilter 
{ public:
  static vtkHorizontalAverage *New();
 // vtkStandardNewMacro(vtkHorizontalAverage);
  vtkTypeMacro(vtkHorizontalAverage,vtkDataSetToStructuredGridFilter);
  vtkSetMacro(Normalize,int);
  vtkGetMacro(Normalize,int);
  vtkBooleanMacro(Normalize, int);
  void PrintSelf(ostream, vtkIndent);

  protected: vtkHorizontalAverage();
		~vtkHorizontalAverage(){};
			
		 int Normalize;
 
			 void operator=(const vtkHorizontalAverage) {};
			 void Execute();
};

Re: [Paraview] vtkScalars used in Paraview?

2008-09-10 Thread Utkarsh Ayachit
vtkScalars? Even VTK doesn't have such a class. Are you sure you have 
the correct name for the class you are looking for?


Utkarsh

Natalie Happenhofer wrote:

Hi!
Isn´t the vtk class vtkScalars used in Paraview? I didn´t find the .h 
or .cxx file for it. How can I add it, i.e. where do I place the source 
and which cMakeLists files do I have to alter to get it compiled with 
the rest?


thx,
Natalie


Express yourself instantly with MSN Messenger! MSN Messenger 
http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/





___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview

___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] vtkScalars used in Paraview?

2008-09-10 Thread Berk Geveci
You probably have a code that depends on old VTK. Look at:
http://www.vtk.org/Wiki/VTK_FAQ#Changes_in_VTK_between_3.2_and_4.0

-berk

On Wed, Sep 10, 2008 at 4:05 PM, Natalie Happenhofer
[EMAIL PROTECTED] wrote:
 Hi!
 Isn´t the vtk class vtkScalars used in Paraview? I didn´t find the .h or
 .cxx file for it. How can I add it, i.e. where do I place the source and
 which cMakeLists files do I have to alter to get it compiled with the rest?

 thx,
 Natalie

 
 Express yourself instantly with MSN Messenger! MSN Messenger
 ___
 ParaView mailing list
 ParaView@paraview.org
 http://www.paraview.org/mailman/listinfo/paraview


___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] slow rendering speed

2008-09-10 Thread Biao She
Hi Ken. Thanks for reply again.I have tried this command, but the error is
still the same: DISPLAY is not accessible on the server side.
In the wiki, there are three things to do with X Connections:

   1. Have xdm run on each cluster node at startup. Although xdm is almost
   always run at startup on workstation installations, it is not as commonplace
   to be run on cluster nodes. Talk to your system administrators for help in
   setting this up.
   2. Disable all security on the X server. That is, allow any process to
   open a window on the x server without having to log in. Again, talk to your
   system administrators for help.
   3. Make sure each process is run with the DISPLAY environment variable
   set to localhost:0 (or just :0).

I have talked to system administrator about the first two things. The guy
said that both are ok on the cluster, but he isn't 100 percent sure about
the second thing. I try to run the glxgeasr program but it doesn't work. The
error I got is couldn't open display '(null)' 
Could the problem result from the first two configurations? What do you
think?

Thanks,

Aaron

On Wed, Sep 10, 2008 at 1:37 PM, Moreland, Kenneth [EMAIL PROTECTED]wrote:

 It sounds like you are using the env program wrong.  The env program runs a
 command, specified on its command line, with a modified environment, but
 does not modify the environment of the calling program.  To use env, you
 need to use it within your mpirun command:

 mpirun -np 4 /usr/bin/env DISPLAY=localhost:0 ./pvserver

 -Ken


 On 9/10/08 11:32 AM, Biao She [EMAIL PROTECTED] wrote:

  Thanks your help again, Ken.
  You figure out my problem. I indeed connect to localhost:10.0. I am a
 newbie
  of Linux and ssh, I don't know how to connect to localhost:0.0 instead of
  10.0. After I ssh to the cluster, the DISPLAY automatically set to
  localhost:10.0. I use /usr/bin/env DISPLAY=localhost:0 command to set
 it
  back. Then, when I try to connect to the paraview server, I get an error
 like
  this DISPLAY is not accessible on the server side.
  I know that if I start pvserver from the cluster directly, the DISPLAY is
  localhost:0, but the cluster doesn't have any keyboard and monitor.
  How can I connect to localhost:0 remotely?
  Thanks!
 
  Aaron
 
 
  On Wed, Sep 10, 2008 at 7:09 AM, Moreland, Kenneth [EMAIL PROTECTED]
 wrote:
  First, let me just say that you should not expect the parallel rendering
 of
  such a small data set to be faster than just rendering it locally.  The
  parallel rendering has a constant overhead involving the readback of
 pixels,
  the transfer of data, and the computation of compositing operations.
 
  That said, based on the error it looks like your DISPLAY environment is
 set
  wrong.  You should be connecting to localhost:0.0, not localhost:10.0.
  You
  are probably forwarding all of your rendering commands back to the
 desktop
  you logged in from though ssh forwarding.  That, of course, will really
 slow
  things down because all the rendering commands are being shoved through
 the
  network and all are being processed on a single machine.
 
  Make sure that you are actually rendering to the local GPU.  See the
  ParaView Wiki for more advice.
 
http://www.paraview.org/Wiki/Setting_up_a_ParaView_Server
 
  -Ken
 
 
  On 9/9/08 4:24 PM, Biao She [EMAIL PROTECTED] wrote:
 
  Hi there.
  I use the client/server mode of paraview to render a small data(about
 4M),
   but
  the speed is very slow.
  Below is how I do it:
  I first ssh to the cluster and start the pvserver by this command:
 mpirun
   -np
  4 ./pvserver. The cluster is SGI Altix 4000. The operating system on
 the
  cluster is SUSe linux, 64 bits system.
  Then, I launch the paraview client on my local windows computer. After
 the
  client connected to the server, there are two types of errors:
  1. Xlib: extension XFree86-DRI missing on display localhost:10.0
  2. unaligned access to 0x6197a1bc, ip=0x23568e0
  Paraview works regardless of these errors, but the problem is that the
  rendering speed is way too slow.
  I am wondering what could cause the slow down? Maybe the paraview
 doesn't
   use
  GPU on the clusters at all? How could I tell if the paraveiw use GPU
 or
  not?
  Or the unaligned access slow down the speed? These errors keep on
 repeating
  whenever I change the viewplane.
  I have stalled by this problem for days, any idea would be highly
  appreciated.
 
  Thanks!
 
  Aaron
 
 
 
 
 


___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] slow rendering speed

2008-09-10 Thread pat marion
Hi Aaron,

Here are some things to try.  Ssh to the cluster and run glxgears.  You
should not see a glxgears window appear on your screen (if you do, it is
using X forwarding).  The command should appear to hang, and you will kill
it with control-c.  If glxgears fails, try different values of DISPLAY until
it works, for example:

export DISPLAY=:0.0

some shells set environment variables like this-

setenv DISPLAY :0.0


Once glxgears works on the main node, try it with mpirun.  Some versions of
mpirun have a command line option -x, this will export a local environment
variable to all the mpi processes:

mpirun -np 4 -x DISPLAY glxgears

or

mpirun -np 4 -x DISPLAY=:0.0 glxgears


If glxgears doesn't work for you, here is a simple debugging program I have
used in the past-

/* main.c */
#include mpi.h
#include stdio.h
#include stdlib.h

int main (int argc, char *argv[])
{
  int rank, size;
  MPI_Init (argc, argv);  /* starts MPI */
  MPI_Comm_rank (MPI_COMM_WORLD, rank);/* get current process id */
  MPI_Comm_size (MPI_COMM_WORLD, size);/* get number of processes
*/
  printf( I am process %d of %d.  DISPLAY=%s\n, rank, size,
getenv(DISPLAY) );
  MPI_Finalize();
  return 0;
}

Compile it and run it:

$ mpicc -o main main.c
$ mpirun -np 4 ./main
I am process 0 of 4.  DISPLAY=:0.0
I am process 1 of 4.  DISPLAY=:0.0
I am process 2 of 4.  DISPLAY=:0.0
I am process 3 of 4.  DISPLAY=:0.0


Pat


On Wed, Sep 10, 2008 at 5:02 PM, Biao She [EMAIL PROTECTED] wrote:

 Hi Ken. Thanks for reply again.I have tried this command, but the error is
 still the same: DISPLAY is not accessible on the server side.
 In the wiki, there are three things to do with X Connections:

1. Have xdm run on each cluster node at startup. Although xdm is almost
always run at startup on workstation installations, it is not as 
 commonplace
to be run on cluster nodes. Talk to your system administrators for help in
setting this up.
2. Disable all security on the X server. That is, allow any process to
open a window on the x server without having to log in. Again, talk to your
system administrators for help.
3. Make sure each process is run with the DISPLAY environment variable
set to localhost:0 (or just :0).

 I have talked to system administrator about the first two things. The guy
 said that both are ok on the cluster, but he isn't 100 percent sure about
 the second thing. I try to run the glxgeasr program but it doesn't work. The
 error I got is couldn't open display '(null)' 
 Could the problem result from the first two configurations? What do you
 think?

 Thanks,

 Aaron

 On Wed, Sep 10, 2008 at 1:37 PM, Moreland, Kenneth [EMAIL PROTECTED]wrote:

 It sounds like you are using the env program wrong.  The env program runs
 a
 command, specified on its command line, with a modified environment, but
 does not modify the environment of the calling program.  To use env, you
 need to use it within your mpirun command:

 mpirun -np 4 /usr/bin/env DISPLAY=localhost:0 ./pvserver

 -Ken


 On 9/10/08 11:32 AM, Biao She [EMAIL PROTECTED] wrote:

  Thanks your help again, Ken.
  You figure out my problem. I indeed connect to localhost:10.0. I am a
 newbie
  of Linux and ssh, I don't know how to connect to localhost:0.0 instead
 of
  10.0. After I ssh to the cluster, the DISPLAY automatically set to
  localhost:10.0. I use /usr/bin/env DISPLAY=localhost:0 command to set
 it
  back. Then, when I try to connect to the paraview server, I get an error
 like
  this DISPLAY is not accessible on the server side.
  I know that if I start pvserver from the cluster directly, the DISPLAY
 is
  localhost:0, but the cluster doesn't have any keyboard and monitor.
  How can I connect to localhost:0 remotely?
  Thanks!
 
  Aaron
 
 
  On Wed, Sep 10, 2008 at 7:09 AM, Moreland, Kenneth [EMAIL PROTECTED]
 wrote:
  First, let me just say that you should not expect the parallel
 rendering of
  such a small data set to be faster than just rendering it locally.  The
  parallel rendering has a constant overhead involving the readback of
 pixels,
  the transfer of data, and the computation of compositing operations.
 
  That said, based on the error it looks like your DISPLAY environment is
 set
  wrong.  You should be connecting to localhost:0.0, not localhost:10.0.
  You
  are probably forwarding all of your rendering commands back to the
 desktop
  you logged in from though ssh forwarding.  That, of course, will really
 slow
  things down because all the rendering commands are being shoved through
 the
  network and all are being processed on a single machine.
 
  Make sure that you are actually rendering to the local GPU.  See the
  ParaView Wiki for more advice.
 
http://www.paraview.org/Wiki/Setting_up_a_ParaView_Server
 
  -Ken
 
 
  On 9/9/08 4:24 PM, Biao She [EMAIL PROTECTED] wrote:
 
  Hi there.
  I use the client/server mode of paraview to render a small data(about
 4M),
   but
  the speed is very slow.