pymad / cpymad

cPyMAD is a python interface to Mad-X using cython and libmadx
http://cern.ch/pymad
Apache License 2.0
3 stars 3 forks source link

fortran runtime error: end of record #80

Closed Landau1908 closed 9 years ago

Landau1908 commented 10 years ago

Hey, Thomas

I have modified the error, using m.twiss() instead of pm.twiss(), but another error occurs.

C:\Users\Administrator>e:

E:\>cd E:\pymad\test

E:\pymad\test>python 2.py

  ++++++++++++++++++++++++++++++++++++++++++++
  +     MAD-X 5.02.02  (32 bit, Windows)     +
  + Support: mad@cern.ch, http://cern.ch/mad +
  + Release   date: 2014.07.04               +
  + Execution date: 2014.08.11 00:26:02      +
  ++++++++++++++++++++++++++++++++++++++++++++
enter Twiss module
Fortran runtime error: End of record
Traceback (most recent call last):
  File "2.py", line 11, in <module>
    twiss, summary = m.twiss()
  File "D:\Program Files\python\lib\site-packages\cern_cpymad-0.8-py2.7-win32.eg
g\cern\cpymad\model.py", line 382, in twiss
    use=use)
  File "D:\Program Files\python\lib\site-packages\cern_cpymad-0.8-py2.7-win32.eg
g\cern\cpymad\madx.py", line 265, in twiss
    **twiss_init)
  File "D:\Program Files\python\lib\site-packages\cern_cpymad-0.8-py2.7-win32.eg
g\cern\cpymad\madx.py", line 113, in __call__
    self.__dispatch(_madx_tools.mad_command(*args, **kwargs))
  File "D:\Program Files\python\lib\site-packages\cern_cpymad-0.8-py2.7-win32.eg
g\cern\cpymad\madx.py", line 167, in input
    self._libmadx.input(text)
  File "D:\Program Files\python\lib\site-packages\cern_cpymad-0.8-py2.7-win32.eg
g\cern\cpymad\_libmadx_rpc.py", line 404, in DeferredMethod
    funcname, args, kwargs)
  File "D:\Program Files\python\lib\site-packages\cern_cpymad-0.8-py2.7-win32.eg
g\cern\cpymad\_libmadx_rpc.py", line 247, in _request
    return self._dispatch(self._conn.recv())
  File "D:\Program Files\python\lib\site-packages\cern_cpymad-0.8-py2.7-win32.eg
g\cern\cpymad\_libmadx_rpc.py", line 165, in recv
    return pickle.load(self._recv)
EOFError
Exception IOError: IOError(22, 'Invalid argument') in <bound method LibMadxClien
t.__del__ of <cern.cpymad._libmadx_rpc.LibMadxClient object at 0x028D0250>> igno
red

E:\pymad\test>
coldfix commented 10 years ago

Hey,

this is an error inside MAD-X not inside pymad. On my machine the lhc machine works without problems.

My first guess is that there is something wrong with the revision you downloaded. The CERN guys do NOT care to break the upstream latest revision. Maybe you want to fallback to the latest development release and check whether the error persists. See also the updated installation docs.

If your problem persists with the last development release (which is not the latest revision), you should contact MAD-X support, as you should generally do for all MAD-X errors. I am not affiliated in any way with MAD-X development and I don't know anything about it's internals.

Remember not to post any pymad code to them, but rather create a minimalistic example with only MAD-X commands. The load_model function has a parameter to create a history file that will be useful for this purpose.

coldfix commented 10 years ago

Before I close this issue:

(There is a small chance, that this is in fact a problem in the way that pymad uses MAD-X.)

Landau1908 commented 10 years ago

1.Maybe Yes. I have succeeded in finishing installation on my other computer. I guess I made something wrong in the setup steps when installed on my current computer. I will try to install from the begining, and I will tell you if there exist any errors that I cann't be able to deal with.

2.Using madx.exe is my next plan, and maybe I begin it after few days.

b.t.w. my major is accelerator physics, so I will always be in trouble when happened these problems as before.

coldfix commented 9 years ago

Closing this, based on the assumption that this is not a pymad problem.