CMS progress – IO almost finished

It required some effort to get up with Pascal IO routines but at this moment most of the biggest problems are solved: the sequence to publish a post works, but there is still a bit of tweaking inside debug required: main issue now is handling the state of the file after IO activity: Adding a record leaves the filepointer at EOF so checking STATUS returns -1 — meaning “at end of file”. Obvious because the file is opened in state EXTEND and PUTting a record doesn’t change it.
And after PUtting a record en reading it back requires some activity top put the file in the right mode. But all data is written to the file, only the UPDATE hasn’t been executed.
Once this has been completed, I will create a program to move all published entries in both blogs into the RMS files, and create a program that should be able to present this content the same way as they are presented now. That means: create a text-file copy of the current output and use that as-is to present the content; the big next project will eb creating a toolbox to publish any content using templates – similar to the toolbox I created and used years ago, in one of my jobs.
I already have some thought on how to to do that…

CMS progress

Small progress on the CMS program
Most problems are now related to file access. It takes some time to get re-educated in VMS Pascal but this moment, the (sequential) control-file seems to work, and basic set up for post and meta data are taking shape: the basics seem to be fine now.
It required a redesign of the sequence of events in publishing a post but I figured out what the sequence should be – including prevention of parallel publishing. Not that it is perfect, but it is a beginning.

Numpy redone

There still wasn’t a complete build of Numpy using just lapack and blas as an example., si I had to redo the build – from scratch – on the Linux system. Done that and have output to guide me – but whether it is complete and fit for VMS on Alpha, remains to be seen. Combined with Brett’s DCL-procedure, it should be possible to get on.

Start with Numpy

Now XBLAS and LAPACk are done, I can start with Numpy. Brett Cameron has done this before, I can use that as the base for the command procedures that will be like the one I did with SCipy: part by part. Some files have been added by Brett and I added these files to my environment. But there were still some files to be adapted, where internal definitions in the compilers differ: gcc would use “__alpha__” where my (Compaq) C version (7.3) uses “__alpha” to set the CPU type. Otherwise, the CPU type could not be determined. I guess this will nor be the only one.

Once these changes were included, I could start building core.common – the first one already fails beyond repair (all is the same as defined by Brett – and that seemed to work. I just added /deb/noopt, /lis= and /obj= options because that conforms my environment):

$ cc/accept=novaxc_keywords/noopt/deb/names=(as_is,shortened)/define=(_OSF_SOURCE,_USE_STD_STAT)/include=cc$include/warn=disable=(
QUESTCOMPARE,QUESTCOMPARE1)/lis=NUMPY_LIS:/mach/obj=NUMPY_OBJ:/arch=host array_assign.c

static NPY_INLINE int PyInt_Check(PyObject *op) {
......................^
%CC-E-CLOSEPAREN, Missing ")".
at line number 35 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

if (!PyLong_Check(op)) {
.........^
%CC-E-BADEXPR, Invalid expression.
at line number 37 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

#define PyInt_AS_LONG PyLong_AsLong
......................^
%CC-W-MACROREDEF, The redefinition of the macro "PyInt_AS_LONG" conflicts with a current definition because one is object-like and t
he other is function-like. The redefinition is now in effect.
at line number 46 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

#define PyString_Check PyBytes_Check
.......................^
%CC-W-MACROREDEF, The redefinition of the macro "PyString_Check" conflicts with a current definition because one is object-like and
the other is function-like. The redefinition is now in effect.
at line number 89 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

#define PyString_AS_STRING PyBytes_AS_STRING
...........................^
%CC-W-MACROREDEF, The redefinition of the macro "PyString_AS_STRING" conflicts with a current definition because one is object-like
and the other is function-like. The redefinition is now in effect.
at line number 93 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

#define PyString_GET_SIZE PyBytes_GET_SIZE
..........................^
%CC-W-MACROREDEF, The redefinition of the macro "PyString_GET_SIZE" conflicts with a current definition because one is object-like a
nd the other is function-like. The redefinition is now in effect.
at line number 99 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

PyUnicode_ConcatAndDel(PyObject **left, PyObject *right)
................................^
%CC-E-NOTEXPECTING, Error parsing parameter list. Found "*" when expecting one of: ",", ")".
at line number 152 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_SETREF(*left, PyUnicode_Concat(*left, right));
....^
%CC-E-BADEXPR, Invalid expression.
at line number 154 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_SETREF(*left, PyUnicode_Concat(*left, right));
....^
%CC-E-BADSTMT, Invalid statement.
at line number 154 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(right);
....^
%CC-E-BADEXPR, Invalid expression.
at line number 155 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(right);
....^
%CC-E-BADSTMT, Invalid statement.
at line number 155 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

PyUnicode_Concat2(PyObject **left, PyObject *right)
...........................^
%CC-E-NOTEXPECTING, Error parsing parameter list. Found "*" when expecting one of: ",", ")".
at line number 159 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_SETREF(*left, PyUnicode_Concat(*left, right));
....^
%CC-E-BADEXPR, Invalid expression.
at line number 161 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_SETREF(*left, PyUnicode_Concat(*left, right));
....^
%CC-E-BADSTMT, Invalid statement.
at line number 161 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

npy_PyFile_Dup2(PyObject *file, char *mode, npy_off_t *orig_pos)
.........................^
%CC-E-NOTEXPECTING, Error parsing parameter list. Found "*" when expecting one of: ",", ")".
at line number 172 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(ret);
....^
%CC-E-BADEXPR, Invalid expression.
at line number 191 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(ret);
....^
%CC-E-BADSTMT, Invalid statement.
at line number 191 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(os);
....^
%CC-E-BADEXPR, Invalid expression.
at line number 206 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(os);
....^
%CC-E-BADSTMT, Invalid statement.
at line number 206 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(ret);
....^
%CC-E-BADEXPR, Invalid expression.
at line number 211 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(ret);
....^
%CC-E-BADSTMT, Invalid statement.
at line number 211 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io);
........^
%CC-E-BADEXPR, Invalid expression.
at line number 236 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io);
........^
%CC-E-BADSTMT, Invalid statement.
at line number 236 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io_raw);
........^
%CC-E-BADEXPR, Invalid expression.
at line number 242 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io_raw);
........^
%CC-E-BADSTMT, Invalid statement.
at line number 242 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(ret);
....^
%CC-E-BADEXPR, Invalid expression.
at line number 261 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(ret);
....^
%CC-E-BADSTMT, Invalid statement.
at line number 261 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

npy_PyFile_DupClose2(PyObject *file, FILE* handle, npy_off_t orig_pos)
..............................^
%CC-E-NOTEXPECTING, Error parsing parameter list. Found "*" when expecting one of: ",", ")".
at line number 278 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io);
........^
%CC-E-BADEXPR, Invalid expression.
at line number 314 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io);
........^
%CC-E-BADSTMT, Invalid statement.
at line number 314 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io_raw);
........^
%CC-E-BADEXPR, Invalid expression.
at line number 319 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(io_raw);
........^
%CC-E-BADSTMT, Invalid statement.
at line number 319 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

Py_DECREF(ret);
....^
%CC-E-BADEXPR, Invalid expression.
at line number 340 in file NUMPY_ROOT:[numpy.core.include.numpy]npy_3kcompat.h;1

%CC-F-TOOMANYERR, More than 30 errors were encountered in the course of compilation.

Here I must consult Bret on how to get around this – he must have mastered this before.

XBLAS – requirement for some LAPACK images – built and used

Downloaded xblas and accompanying VMSPATCH container from TU Delft, and installed it after setting up the environment. Again, the content of the patch file was put into the package itself, because including the intended structure would require quite a lot of changes in the VMS build-files.
Started the building process, the only changes needed were (again) splitting some lines that cases problems with LIBR commands – lines exceeding the maximum length of 1091 bytes. Also, one more change was added to VMS_Auto64: reading the sourcefile (unit 42) would fail if the linesize exceeded some length (128?). It was solved by adding recordsize of 512 in the OPEN statement.

XBLAS built without problems in the end.

Now I could finish LAPACK built – one of the link commands required XBLAS…

To make things easy, I created subdirectories for each system – XBLAS, LAPACK, NUMPY and SCIPY – under VMSBuild. Each of these hold the structure:

  • [.EXE] to hoild executables (and shared images)
  • [.LIS] to hold list and mapfiles
  • [.LIB] to hold libraries
  • [.OBJ] to hold .OBJ files
  • and after building the subsystem, al files that are to be used elsewhere, are placed in this structure. Files that are only local will be kept within the package.

    It also meant changes in the procedure creating the environment, and in the procedures that build the subsystem.

    Also, I reversed the usage of symbol vms_auto64 – where the mms-files state “sys$library:vms_auto64” that I commented-out in favour of “vms_auto64”. Main reason for this is that both LAPACK and XBLAS referred to sys$library: for the local object-library, but that resides within the sy=ubsystem itself. It meant I had to redefine sys$library anyway, so the [.EXE] directory that is within VMSBuild – and holds vms_aut64.exe – could be added as well.

    All files will be added to the repository