Mayavi and Spyder

 Mayavi and Spyder don't seem to get along. I am doing some mlab.points3D plotting. The Mayavi Scene keeps hanging. It works sometimes, but doesn't most of the time. But, if I run the same script from IDLE, it works fine. I'm yet to figure out what's going on.

Resolving FORTRAN 77 Errors

Cannot assign to a named constant at (1)

Probably trying to assign something to an array, e.g. MYARR(I)=5.E0.

The array was not declared in the DIMENSION or COMMON blocks.

Just add MYARR (100) or whatever size to one of the above.


The function result on the lhs of the assignment at (1) must have the pointer attribute.

Seems to be the same as above, maybe for 2D arrays(?)


Type mismatch in argument 'xx' at (1); passed INTEGER(4) to REAL(8)

The variable, XX is an argument in some function. When you are calling the function, you are passing some variable, named say NDIME. If there's this line in your code: IMPLICIT REAL*8(A-H,O-Z), it means all variables whose names start with letter between H and O (not included) are integers. So, either:

  1. Check whether that's the correct variable you want to pass
  2. If so, give a different name, starting with letters A-H, O-Z

More actual than formal arguments in procedure call at (1)

You're function has 2 arguments, but you're calling it, providing 10!


Notes on SPACING:
  1. Continuing a statement in a new line: Make sure the new line is not indented by tabs (happened to me in Notepad++). It has to be all spaces. You might get an error: Invalid character in name at (1)
  2. Variable 'i' at (1) cannot be redefined inside loop beginning at (2): Yes, you might actually be trying to reuse the variable 'i' in a nested loop. But, another possibility is: one of your loops that uses 'i' never actually closed. I had a '150 continue' statement, closing the loop 150. But, there was an extra space in front of it!
  3. Don't go beyond column 73: I don't know what this is, whether it's generic or not, but I suffered. You must continue the statement in the next line.

Here's a link that covers some of these points and more:

Comments

Popular posts from this blog

Using plain Spyder

Wired article on the benefits of 'active rest'