DDL installation notes ---------------------- This file describes some problems (and possible fixes) with DDL installation. Version 2.1.2 (Aug95) --------------------- Existing user programs and DDL routines need to be modified slightly to work with this version (and future versions) of the DDL. This is because all DDL routines have been changed to accept DDL_Object structures as parameters instead of DDL_Vector and DDL_Sparse structures. DDL_Object is just a header record (DDL_Prop) used to identify the attached data structure which may be DDL_Vector or DDL_Sparse or another data structure. The quick-fix changes required are given below. ** FORTRAN programs and DDL routines: - no change ** User programs in C: - change all declarations of DDL objects (ie. types DDL_Sparse and DDL_Vector) to types DDL_Spa or DDL_Vec. ** DDL routines in C: There are 2 cases: 1) If the routine does not access fields of the data structures directly, but uses DDL routines to do this: - change the parameter list to accept type DDL_Object instead of types DDL_Sparse and DDL_Vector. 2) If the routine does access fields directly: - change the parameter list to accept type DDL_Object instead of types DDL_Sparse and DDL_Vector using new names. - declare local variables of type DDL_Sparse and DDL_Vector for these changed parameters using the original names. - assign these local DDL object variables with the value of the data field in the corresponding DDL_Object structure. - for direct access to fields in the DDL_Vector or DDL_Sparse structures use the original name. - for calling DDL routines use the new name. - parameter checking must be changed to refer to DDL_Object types. - See DDL_Free_sparse in base/ddl_sparse.c for an example. Version 2.1.1 (Jun95) --------------------- ***COMPLETELY CHANGED*** Installation now uses a configure script, so should be much easier... But there is not much control over how the configurer works. If the configure script does not work when you set ARCH only, then you can try setting the other environment variables documented in README. If you have trouble get in touch with me so that I can add support for your setup as well. Some comments from previous versions still apply so these are included below. Version 2.1 (Jun95) ------------------- 1) When editing Makefiles and include. files compare with your old customized v2 files. 2) If you want to use the DDL Fortran timing routine gettime in ddl_fortran.f you will need to edit that file to specify which routines to use. Also edit cgettime in ddl_support.c for C timing routine. 3) Since this version is very similar to v2, you may also need to follow notes for that version given below. 4) No support for 64bit operation on SGI yet. 5) You will need to check that the COMM variable in the Makefiles is the same as the MPI -device option you used when compiling MPI. Also, you may need to create links in your mpi lib directory to the different MPI arch types. For example if you use -arch=sun4 when compiling MPI the lib directory will be sun4. The current DDL Makefile.SUN uses SUN as the name for this directory, not sun4. Either edit the DDL Makefiles are create a link from sun4 in mpi/lib. 6) There is a bug in the iterative solver relating to non-unit block sizes and the number of processes. If you want to use tfqmrnc now only use block=1 for safety. Version 2 (Jan95) ----------------- 1) Adding a new ARCH If you use another architecture name eg. ARCH=other not already included then you must also edit ./include/ddl_generic.h. This file specifies whether your F77 compiler adds leading underscores to procedure names. Add another if macro to the file (by copying existing one) for your ARCH. If your f77 compiler adds underscores copy the if block for SUN, else copy the if block for rs6000 eg (with underscores) #ifdef MPI_other #define F77(name) name ## _ #define F77_(name) name ## _ #endif If this is not done then f77 cannot link to C and vice versa. The ARCH variable in all the Makefiles is meant to be the same as the one you use with MPI. Makefile.$(ARCH) then defines MPI_$(ARCH) for you. So...if you use ARCH=SUN for MPI then I intended you to rename Makefile.solaris and include.solaris to Makefile.SUN and include.SUN and edit include.SUN to set ARCH=SUN. Edit Makefile.SUN to include include.SUN. Also, note that you must create the library directory ./lib/$(ARCH) by hand before making ddl. This is a bug in the Makefile...sorry! It will be corrected. ARCH is really a bad name. I have used ARCH to check for **compiler** dependencies not **architecture** dependencies. So different compilers on the same architecture need different ARCH values... I will change this to use an additional variable later. 2) Cray pointer type compile error with f2c One of the demo files declares some Cray pointers. These are not used but may cause your FORTRAN compiler, eg f2c, to choke. The ddl demo doesn't use the Cray pointer type for anything useful. If you wish to use f2c, just delete the pointer declarations from fdemo.f in ./examples and try again. 3) cdemo link problems using gcc on SPARC You need to edit the Makefile in ./examples to link in an addition GNU library when linking the cdemo program with the f77 linker. The FORTRAN programs should work anyway. Change the cdemo rule to something like: cdemo: cdemo.o $(FLINKER) $(OPTFLAGS) -o $@ $? $(LIBS) \ -L/app/gnu/lib/gcc-lib/sparc-sun-sunos4.1.3/2.5.7 -lgcc where -Lpath points to directory in which gcc installed its library libgcc.a. 4) fgetpos and fsetpos with gcc gcc 2.5.7 does not seem to recognize the routines fgetpos and fsetpos which are used in the DDL. Edit ./base/ddl_support.c and ./base/ddl_generic.c to use fseek and ftell for your ARCH (eg ARCH=SUN): #ifdef MPI_SUN /* gcc 2.5.7 compiler not know fgetpos? */ fpos = ftell(file); #else fgetpos(file, &fpos); #endif and #ifdef MPI_SUN /* gcc 2.5.7 compiler not know fsetpos? */ fseek(file, fpos, 0); /* should be SEEK_SET */ #else fsetpos(file, &fpos); #endif 5) tfqmrnc core dumps with Sun FORTRAN and gcc, but other demos work tfqmrnc core dumps with the following message: OK. Starting run... p0_7478: p4_error: interrupt SIGBUS: 10 ./p4run: 7478 Bus error - core dumped The SUN Fortran compiler is not aligning doubles on 8byte boundaries. You need to edit the include.$(ARCH) file as follows. Replace: F77 = f77 with: F77 = f77 -dalign This will align variables correctly.