| 1 | ------------------------------------------------------------------------- |
|---|
| 2 | NeXus - a common format for neutron and X-ray scattering data |
|---|
| 3 | http://www.nexusformat.org/ |
|---|
| 4 | ------------------------------------------------------------------------- |
|---|
| 5 | |
|---|
| 6 | Installation Instructions |
|---|
| 7 | ========================= |
|---|
| 8 | |
|---|
| 9 | Unix (including Mac OS X) |
|---|
| 10 | ------------------------- |
|---|
| 11 | |
|---|
| 12 | We have recently changed the installation procedure to use the GNU autoconf |
|---|
| 13 | system. This will automatically check for the relevant HDF and other libraries |
|---|
| 14 | and adjust the configuration scripts accordingly. |
|---|
| 15 | |
|---|
| 16 | 1) Ensure that you have current versions of the HDF4 and/or the HDF5 |
|---|
| 17 | libraries. It is now possible to link the NeXus libraries against |
|---|
| 18 | either or both libraries, depending on the selected make option. |
|---|
| 19 | |
|---|
| 20 | The libraries, which are available as precompiled binaries for a wide |
|---|
| 21 | range of systems, may be downloaded from: |
|---|
| 22 | |
|---|
| 23 | http://www.hdfgroup.org/ |
|---|
| 24 | |
|---|
| 25 | 2) At present it is necessary to run the autogen shell script to produce the |
|---|
| 26 | correct configure file. |
|---|
| 27 | |
|---|
| 28 | sh autogen.sh |
|---|
| 29 | |
|---|
| 30 | 3) Run 'configure' and 'make'. |
|---|
| 31 | |
|---|
| 32 | ./configure |
|---|
| 33 | ./make |
|---|
| 34 | |
|---|
| 35 | If there are any problems, try different configure options to see if one |
|---|
| 36 | will work. You can see what switches are available by typing |
|---|
| 37 | |
|---|
| 38 | ./configure --help |
|---|
| 39 | |
|---|
| 40 | 4) Install the files in the default location (usually /usr/local/nexus) using |
|---|
| 41 | |
|---|
| 42 | make install |
|---|
| 43 | |
|---|
| 44 | 5) Test the installation using |
|---|
| 45 | |
|---|
| 46 | make test |
|---|
| 47 | |
|---|
| 48 | The standard test procedures produce the following output: |
|---|
| 49 | |
|---|
| 50 | Number of global attributes: 4 |
|---|
| 51 | NeXus_version = 2.0.0. |
|---|
| 52 | file_name = NXtest.nx5 |
|---|
| 53 | HDF5_Version = 1.4.3 |
|---|
| 54 | file_time = 2002-05-17 14:40:24-0600 |
|---|
| 55 | Group: entry(NXentry) contains 8 items |
|---|
| 56 | ch_data( 4) |
|---|
| 57 | Values : NeXus data |
|---|
| 58 | Subgroup: data(NXdata) |
|---|
| 59 | i1_data(20) |
|---|
| 60 | Values : 1 2 3 4 |
|---|
| 61 | i2_data(22) |
|---|
| 62 | Values : 1000 2000 3000 4000 |
|---|
| 63 | i4_data(24) |
|---|
| 64 | Values : 1000000 2000000 3000000 4000000 |
|---|
| 65 | r4_data( 5) |
|---|
| 66 | Values : 1.00 2.00 3.00 4.00 |
|---|
| 67 | : 5.00 6.00 7.00 8.00 |
|---|
| 68 | : 9.00 10.00 11.00 12.00 |
|---|
| 69 | : 13.00 14.00 15.00 16.00 |
|---|
| 70 | : 17.00 18.00 19.00 20.00 |
|---|
| 71 | r8_data( 6) |
|---|
| 72 | Values : 1.00 2.00 3.00 4.00 |
|---|
| 73 | : 5.00 6.00 7.00 8.00 |
|---|
| 74 | : 9.00 10.00 11.00 12.00 |
|---|
| 75 | : 13.00 14.00 15.00 16.00 |
|---|
| 76 | : 17.00 18.00 19.00 20.00 |
|---|
| 77 | ch_attribute : NeXus |
|---|
| 78 | i4_attribute : 42 |
|---|
| 79 | r4_attribute : 3.141593 |
|---|
| 80 | Subgroup: sample(NXsample) |
|---|
| 81 | Link Check OK |
|---|
| 82 | |
|---|
| 83 | There are small differences in the formatting of the C and Fortran |
|---|
| 84 | files. All of them may be viewed by NXbrowse using, e.g.: |
|---|
| 85 | |
|---|
| 86 | ./NXbrowse NXtest.nxs |
|---|
| 87 | |
|---|
| 88 | Windows |
|---|
| 89 | ------- |
|---|
| 90 | See README.WIN32. |
|---|
| 91 | |
|---|
| 92 | Mac OS X |
|---|
| 93 | -------- |
|---|
| 94 | See README.macosx |
|---|
| 95 | |
|---|
| 96 | VMS |
|---|
| 97 | --- |
|---|
| 98 | 1) There is no VMS version of HDF5, so it is only possible to link to |
|---|
| 99 | the HDF4 libraries. Ensure that you have the current versions, |
|---|
| 100 | which are available as precompiled binaries at: |
|---|
| 101 | |
|---|
| 102 | http://www.hdfgroup.org/ |
|---|
| 103 | |
|---|
| 104 | The NeXus libraries link against the following libraries: |
|---|
| 105 | |
|---|
| 106 | 2) Edit MAKE_VMS.COM to specify the correct location of the HDF |
|---|
| 107 | libraries, and comment out either the F77 or F90 options if necessary. |
|---|
| 108 | |
|---|
| 109 | 3) If you are installing the Fortran 90 library, edit NXtest.f90 to |
|---|
| 110 | replace NXACC_CREATE5 with NXACC_CREATE4 in the first call to NXopen. |
|---|
| 111 | |
|---|
| 112 | 4) Run MAKE_VMS.COM (i.e. type @MAKE_VMS) to build the NeXus libraries |
|---|
| 113 | and utilities. |
|---|
| 114 | |
|---|
| 115 | 5) Run the test programs to check the installation. |
|---|
| 116 | |
|---|
| 117 | $ RUN NAPI4_TEST (Tests C creation of NXtest.nx4) |
|---|
| 118 | $ RUN NAPIF_TEST or NXtest (Tests Fortran creation of NXtest.nxs) |
|---|
| 119 | |
|---|
| 120 | 6) Install the NeXus libraries NEXUS.OLB and/or NEXUS90.OLB, and the |
|---|
| 121 | include (or module) files in a standard location for building other |
|---|
| 122 | NeXus programs. |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | Comments to : ROsborn@anl.gov |
|---|
| 126 | |
|---|
| 127 | Argonne National Laboratory is operated by The University of Chicago for |
|---|
| 128 | the U.S. Department of Energy under contract W-31-109-ENG-38. |
|---|
| 129 | LEGAL POSTLUDE |
|---|
| 130 | -------------- |
|---|
| 131 | The NeXus API is free software; you can redistribute it and/or modify |
|---|
| 132 | it under the terms of the GNU Lesser General Public License as published |
|---|
| 133 | by the Free Software Foundation; either version 2.1 of the License, or |
|---|
| 134 | (at your option) any later version. |
|---|
| 135 | |
|---|
| 136 | The NeXus API is distributed in the hope that it will be useful, |
|---|
| 137 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 138 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 139 | GNU Lesser General Public License for more details. |
|---|
| 140 | |
|---|
| 141 | You should have received a copy of the GNU Lesser General Public License |
|---|
| 142 | along with this program; if not, write to the Free Software |
|---|
| 143 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 144 | |
|---|
| 145 | DISCLAIMER OF LIABILITY: This document was prepared as an account of |
|---|
| 146 | work sponsored by an agency of the U.S. Government. Neither the U.S. |
|---|
| 147 | Government nor any agency thereof, nor the University of Chicago, nor |
|---|
| 148 | any of their employees or officers, makes any warranty, express or |
|---|
| 149 | implied, or assumes any legal liability or responsibility for the |
|---|
| 150 | accuracy, completeness, or usefulness of any information, apparatus, |
|---|
| 151 | product, or process disclosed, or represents that its use would not |
|---|
| 152 | infringe privately owned rights. |
|---|
| 153 | |
|---|
| 154 | DISCLAIMER OF ENDORSEMENT: Reference to any specific commercial |
|---|
| 155 | product, process, or service by trade name, trademark, manufacturer, |
|---|
| 156 | or otherwise does not necessarily constitute or imply its endorsement, |
|---|
| 157 | recommendation, or favoring by the U.S. Government or any agency |
|---|
| 158 | thereof. The views and opinions of document authors do not necessarily |
|---|
| 159 | state or reflect those of the U.S. Government or any agency thereof, |
|---|
| 160 | Argonne National Laboratory, or the University of Chicago. |
|---|
| 161 | |
|---|
| 162 | COPYRIGHT STATUS: Documents authored by Argonne National Laboratory |
|---|
| 163 | employees resulted from work under U.S. Government contract |
|---|
| 164 | W-31-109-ENG-38 and are subject to the following license: the |
|---|
| 165 | Government is granted for itself and others acting on its behalf a |
|---|
| 166 | paid-up, nonexclusive, irrevokable worldwide license in these |
|---|
| 167 | documents to reproduce, prepare derivative works, and perform publicly |
|---|
| 168 | and display publicly by or on behalf of the Government. |
|---|
| 169 | |
|---|
| 170 | ---------------------------------------------------------------------------- |
|---|
| 171 | |
|---|
| 172 | $Id$ |
|---|