1*====================================================================== 2* 3* DISCLAIMER 4* 5* This material was prepared as an account of work sponsored by an 6* agency of the United States Government. Neither the United States 7* Government nor the United States Department of Energy, nor Battelle, 8* nor any of their employees, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR 9* ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, 10* COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, 11* SOFTWARE, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT 12* INFRINGE PRIVATELY OWNED RIGHTS. 13* 14* ACKNOWLEDGMENT 15* 16* This software and its documentation were produced with Government 17* support under Contract Number DE-AC06-76RLO-1830 awarded by the United 18* States Department of Energy. The Government retains a paid-up 19* non-exclusive, irrevocable worldwide license to reproduce, prepare 20* derivative works, perform publicly and display publicly by or for the 21* Government, including the right to distribute to other Government 22* contractors. 23* 24*====================================================================== 25* 26* -- PEIGS routine (version 2.1) -- 27* Pacific Northwest Laboratory 28* July 28, 1995 29* 30*====================================================================== 31 32Installation instructions for PeIGS. 33 34Please read the README file first. If this is what you want please 35follow the installation instructions. The "Makefile" has been tested 36using GNU Make utility. 37 38------------------------------------------------------------------------------- 39 40 41Installation 42 43We currently only support installation on Unix type systems supporting 44csh and GNU make. The library codes and the test 45programs are created using Makefiles. 46All machine specific data is contained in the DEFS file in the main 47PeIGS directory. Each subdirectory has a Makefile which "includes" 48the DEFS file. Because 49the Makefile uses ifeq conditionals, the GNU make version 3.68 or 50higher from the Free Software Foundation is required as the make 51utility. If this is not available to the installer then the installer 52needs to edit DEFS and Makefiles to comment out the ifeq and endif 53and leave the appropriate lines for the intended system. 54@footnote{GNU make is available via anonymous ftp from 55prep.ai.mit.edu:18.71.0.38 in the directory /pub/gnu as 56make###.tar.gz. 57 58Thus, the following software resources are, minimally, needed to make 59the library: 60 611) ANSI C compiler 62 632) ANSI Fortran 77 compiler 64 653) GNU make utility, version 3.68 and higher. (3.62 has problems with 66the ifeq in Make.def ) 67 68We assumed that C subroutines calling Fortran subroutines has a 69trailing underscore at the end of their name, e.g. f77name_. We also 70assume that a Fortran subroutine calls a C subroutine using a 71subroutine name with a trailing underscore at the end of their name, 72e.g. call cname_. Users of IBM AIX RS6000 version 3 systems must add 73the "-qextname" option to the xlf compiler or to the f77 compiler. 74Users of HP9000 HP-UX version 9.0 or higher must add "+ppu" as an 75option to the HP f77 compiler. Users of other dialects of Unix should 76consult their language manuals or system gurus for the appropriate 77options. 78 79In many of the calls to C subroutines from Fortran we assume that the 80C double is the same size as the Fortran double precision. Also, we 81assume that the address to double precision numbers is less than or 82equal to the size of a double precision number. In many of the 83Fortran to C interface codes we re-cast some of the double precision 84scratch spaces as pointers to double precision number. On most 85machines this seems safe since the size of the address space ( longs ) 86divides evenly the size of the double precision number so that data is 87aligned properly. 88 89You will probably obtain this library as a compressed tar 90file named peigsXY.tar.Z, where X.Y is the version number. The steps to 91building PeIGS on a Unix system using csh are: 92 931) type make -v to make sure that you are using the GNU make utility. 94 952) uncompress the file peigsXY.tar.Z by typing uncompress peigsXY.tar.Z 96 which will create a tar file called peigsXY.tar. 97 98% uncompress peigsXY.tar.Z 99 1003) untar the file peigsXY.tar by 101 102% tar xvf peigsXY.tar 103 104 This will create a directory call "peigsX.Y" with a number of 105 subdirectories and a file called DEFS. 106 1074) scan through the file DEFS using your favorite editor to see if 108 your target parallel computer is supported. Make the appropriate 109 changes, if necessary, for the compilers, directory paths, compiler 110 options and library options. If you want to use MPI, rather than 111 the default of TCGMSG or Intel NX, then follow the directions in 112 DEFS about MPI use. If you are using MPI on and IBM SP-1/2, then 113 also check out the additional details at the end of this file. 114 1155) Set the environment variable TARGET for your machine. For example, for 116 the iPSC_860, the installer on a SUN would type 117 118% setenv TARGET iPSC_860. 119 1206) Check the file .../h/blas_lapack.h to make sure that the machine 121 dependent variables are defined for your machine. If not, 122 then type the command 123 124% cd example 125% make teslamach 126 127 and run teslamach to get the machine parameters which need to be inserted 128 in .../h/blas_lapack.h. In most cases the double precision results 129 printed are the desired data (on a few machine like the CRAY the single 130 precision results should be used). 131 On machines that use 8 bytes for single precision calculations, 132 e.g. Cray T3D, the user must also insert CODEOBJ= SINGLE in the 133 DEFS file so that make can build the single precision fortran 134 codes in PEIGSDIR/src/f77. On other machines the user must set 135 CODEOBJ= DBLE. 136 137 1387) Go back to the top level peigs directory and type 139 140% make 141 142Compiler optimization can cause errors and unexpected results in 143certain situations. We tried to set in DEFS and Makefile the files 144that do not optimize well and made them compile only with cc. The 145user is advised that much of our C utility codes fail to function with 146the GNU gcc compiler with the -O2 optimization. Some of the utility 147codes also failed to function correctly with the Portland Group's icc 148compiler with the -O3 optimization option. We are currently trying to 149remedy this situation. 150 151If you are using gcc and f77 on the SUN please carefully read the 152notes in the INSTALL file. Beware of the compiler switch for 153alignment. You may also have to link with the GCC library. This is 154also true if you are using gcc on the DELTA with if77. Data alignment 155is important here. You may get bus errors and memory errors if the 156fortran and the C codes are not compatibly compiled. This is the usual 157problem with Fortran and C interface. 158 159To make the libpeigs.a library type 160 161% make peigs.a 162 163To make the EXAMPLES you must go into the example directory and type 164 165% cd example 166% make 167 168There are C example files there for using the solvers. 169 170To make the MANUAL you go into the ./doc directory and type a make 171 172% cd doc 173 174% make 175 176 177Using MPI on the IBM SP-1,SP-2 178------------------------------ 179All PeIGS code is compiled with the -qEXTNAME option on IBM systems to 180conform to the interface PeIGS uses between C and Fortran. The 181MPI routines linked with PeIGS must conform to this C/Fortran interface. 182 183At this writing the Maui High Performance Computing Center (MHPCC) 184supports MPI via mpich. However, the publically available version 185is inconsistent with the PeIGS C/Fortran interface. In particular, 186the mpich C routines which are called from Fortran do not have trailing 187underscores. Because of this the user must obtain and compile their own 188copy of mpich (see the MHPCCs mpich docuementation for the right ftp site). 189After getting and untarring your version of mpich you must edit the 190configure file and add the line: 191 192FFLAGS="-qEXTNAME" 193 194to the file. An approriate place for this line is immediately before the 195existing line (line 260 in our copy): 196 197CFLAGS="" 198 199After making this change to the configure file just follow mpich's 200installation instructions and you should get a version of mpich which 201will work correctly with PeIGS. 202