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.

Lapack 3.9.0 done

Installed Lapack 3.9.0 aside 3.8.0, and merged the changes that I had to make in the MMS files into the files of 3.9.0 – except what I had to remove from those in 3.8.0. No problems in building – except lines that are too long, but after adding option “recl=512” when one of the files is opened; it seems that default maximum length for read function is 256 – or less. After I extended this to 512, the error was gone.

It takes several hours before everything is done – but Lapack 3.9.0 is complete.

LAPACK/BLAS passed – almost

There is still one thing to do in VMS_AUTH64.exe: if a line – typically a comment) exceeds some size (assumed 256 bytes) the program fails on “input line too long”. The answer is to edit the source, limit the comment lines to 128 bytes (or so) so it won’t hurt anymore.

In fact, all will now compile, but in the end of BLAS.TESTING there is a problem to be solved:

link/exec=xblat2s_64.exe sblat2_64.obj,[--]libblas.olb/lib
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM, lsame64__
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SGBMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SGEMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SSBMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SSPMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SSPR2_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SSPR_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SSYMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SSYR2_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__SSYR_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__STBMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__STBSV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__STPMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__STPSV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__STRMV_64__ file USER:[etw.Lapack380]libblas.olb;2
%LINK-W-USEUNDEF, undefined symbol lsame64__ referenced
in psect $LINK$ offset %X00000030
in module DUMMY__STRSV_64__ file USER:[etw.Lapack380]libblas.olb;2
%MMS-F-ABORT, For target xblat2s_64.exe, CLI returned abort status: %X10648268.
%MMS-F-ABORT, For target all, CLI returned abort status: %X10EE8034.

No idea where that comes from. I found one file that defines it: DOPMTR_64.f:
...
* =====================================================================␍
SUBROUTINE DOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,␍
$ INFO )␍
!DEC$ ATTRIBUTES ALIAS:'dlarf64__' :: dlarf
!DEC$ ATTRIBUTES ALIAS:'dopmtr64__' :: dopmtr
!DEC$ ATTRIBUTES ALIAS:'lsame64__' :: lsame
!DEC$ ATTRIBUTES ALIAS:'xerbla64__' :: xerbla
!DEC$ ATTRIBUTES ADDRESS64 :: AII
...

and there are quite a lot of sources that define LSAME – as a logical
* .. External Functions ..␍
COMPLEX*16 ZLARND␍
DOUBLE PRECISION DLARND␍
LOGICAL LSAME␍
EXTERNAL ZLARND, DLARND, LSAME␍

* ..␍

It may be that there was something during build that failed.

Building lapack package once more

Lapack again

Re-installed lapack 3.8.0 from the netlib.org site, via via: the tar.gz file didn’t untar on VMS, so did it on the workstation, zipped the result and transferred that to Diana – and that did indeed unzip properly. Next, unzipped the VMS_Patch.zip onto the machine and copied the files into Lapack3.8.0 – as is done specificly. Started mms to build it all: and ran into the very same issues as before.: It meant I might need to changed sources (comment lines too long, so split them up). But I did have made changes before to cope with that, and that version was not on SSY$LIBRARY as supposed in decrip.mms but in a separate, central directory. I had to make another change in that code, LINK added the full path – including “000000” – to the filespecification in the .MAP file…
One that was done, the second descript.mms file still helt the “make” command – the image was added in the same central directory, downloaded from TU Delft as well and build locally – but that found the Makefile descrtiption that doesn’t hold the ‘lapack’ target so failed. Changed that to mms – and now it builds…

all Fortran done

Finished all “executables” – at least, the fortran compilations. Still need to test the compilations, this hasn’t been done in parallel with translation, as I did with the modules.
All C and C++ compilations and LINK statements need to be checked for all otions, I could use the Numpy compilations by Brett. But include-options, and all files to be used in LINK must be checked by trail and error: most are known but numpy, lapack and blas are needed – and both can be done.
Also, some files need to be located – they are copied to the BUILD environment on Linux – and I need them to be read from the base.