Skip to content

Commit 97e2c67

Browse files
committed
add note to describe the purpose of DESTDIR
1 parent 4238222 commit 97e2c67

File tree

1 file changed

+70
-58
lines changed

1 file changed

+70
-58
lines changed

DEVELOPER_NOTES.md

Lines changed: 70 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
### Tasks immediately before a new release (must run in the following order)
55

6-
1. Sync with NetCDF header file, `netcdf.h`, for defined constants and error codes.
7-
PnetCDF uses the same constants and error codes as NetCDF. See
6+
1. Sync with NetCDF4 header file, `netcdf.h`, for defined constants and error
7+
codes. PnetCDF uses the same constants and error codes as NetCDF. See
88
"Conform with netCDF" below.
99

1010
2. Set the release version
@@ -33,11 +33,13 @@
3333
```
3434
svn commit -m "set release date of version 1.6.1 to today"
3535
```
36+
3637
5. Commit all changes to repo servers
3738
* 1.8.1 and priors -- run `svn commit` to upload changes to SVN server.
38-
* 1.9.0 and after -- run `git push origin master` to upload changes to github.com.
39+
* 1.9.0 and after -- run `git push origin master` to upload changes to
40+
github.com.
3941
40-
6. Generate release tar ball
42+
6. Generate release tar ball (use it for testing)
4143
* Generate a new `configure` file
4244
+ Run command `autoreconf` to generate file `configure` to be included
4345
in the release (but ignored by the SVN/Git repo).
@@ -48,16 +50,18 @@
4850
+ Run command `./configure` to create all Makefiles, so in the next step
4951
we can run command `make dist` to create the tar balls.
5052
* Create tar ball
51-
+ Run command `make dist` to produce the tar ball for PnetCDF release, such as
52-
`pnetcdf-1.11.0.tar.gz`. (Version 1.9.0 and later will only create .gz file.)
53+
+ Run command `make dist` to produce the tar ball for PnetCDF release,
54+
such as `pnetcdf-1.11.0.tar.gz`. (Version 1.9.0 and later will only
55+
create .gz file.)
5356
+ Starting from 1.9.0, the release date will be the date running command
5457
`make dist`. This setting will be done automatically, unlike step 4
5558
above that manually update the release date.
5659
57-
7. Build the new release tar ball (not source codes from the repo)
60+
7. Test the new release tar ball (not source codes from the repo)
5861
* build under the same directory as source
59-
- run `configure` (with command-line options: `--enable-strict`, `--enable-coverage`,
60-
`--disable-cxx`, `--disable-fortran` and their combinations)
62+
- run `configure` (with command-line options: `--enable-strict`,
63+
`--enable-coverage`, `--disable-cxx`, `--disable-fortran` and their
64+
combinations)
6165
- For C only, run address sanitizer build (gcc and clang) by adding
6266
```
6367
--disable-fortran \
@@ -79,17 +83,22 @@
7983
TESTMPIRUN="mpiexec -n NP libtool --mode=execute valgrind --quiet --leak-check=full"
8084
```
8185
- run `make ptests` to test programs in parallel runs
82-
- run `make ptests` with valgrind, by setting TESTSEQRUN and TESTMPIRUN as described above.
86+
- run `make ptests` with valgrind, by setting TESTSEQRUN and TESTMPIRUN
87+
as described above.
8388
- run `make distcheck`
8489
```
8590
make -s V=1 LIBTOOLFLAGS=--silent distcheck \
8691
DISTCHECK_CONFIGURE_FLAGS="--silent --enable-shared"
8792
```
8893
- check Building Binary Packages Using DESTDIR (automake chapter 2.2.10)
8994
```
90-
make DESTDIR=$HOME/inst install
95+
make install DESTDIR=$HOME/inst prefix=
9196
```
92-
This creates a folder under $HOME/inst with name equal to $prefix.
97+
This creates a folder under $HOME/inst without prefix.
98+
The purpose of using DESTDIR is to install a library in a temporary
99+
folder, so they can be tared and copied to multiple hosts (i.e. install
100+
the same copy of library on different machines without running make
101+
install each there.)
93102
94103
- test if file system type prefix added to file name is acceptable.
95104
For example, "ufs:" added to file name. Note this ROMIO convention may
@@ -107,7 +116,7 @@
107116
* build benchmarks/FLASH-IO separately from PnetCDF (it has its own build
108117
script, i.e. configure.ac)
109118
110-
* build netCDF latest release with --enable-pnetcdf using this newly build
119+
* build NetCDF4 latest release with --enable-pnetcdf using this newly build
111120
of PnetCDF
112121
113122
8. Create a checkpoint
@@ -146,9 +155,11 @@
146155
* See http://semver.org/
147156
* Given a version number MAJOR.MINOR.PATCH, increment the:
148157
1. MAJOR version when you make incompatible API changes,
149-
2. MINOR version when you add functionality in a backwards-compatible manner, and
158+
2. MINOR version when you add functionality in a backwards-compatible
159+
manner, and
150160
3. PATCH version when you make backwards-compatible bug fixes.
151-
* Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
161+
* Additional labels for pre-release and build metadata are available as
162+
extensions to the MAJOR.MINOR.PATCH format.
152163
153164
* For shared library versioning
154165
1. For libtool ABI versioning rules see:
@@ -173,24 +184,24 @@
173184
libtool Chapter 7.1 What are library interfaces?
174185
Interfaces for libraries may be any of the following (and more):
175186
global variables: both names and types
176-
global functions: argument types and number, return types, and function names
177-
standard input, standard output, standard error, and file formats
187+
global functions: argument types and number, return types, and function
188+
names standard input, standard output, standard error, and file formats
178189
sockets, pipes, and other inter-process communication protocol formats
179190

180191
The following explanation may help to understand the above rules a bit
181192
better: consider that there are three possible kinds of reactions from
182193
users of your library to changes in a shared library:
183194
1. Programs using the previous version may use the new version as drop-in
184-
replacement, and programs using the new version can also work with the
185-
previous one. In other words, no recompiling nor relinking is needed. In
186-
this case, bump revision only, don't touch current nor age.
195+
replacement, and programs using the new version can also work with the
196+
previous one. In other words, no recompiling nor relinking is needed.
197+
In this case, bump revision only, don't touch current nor age.
187198
2. Programs using the previous version may use the new version as drop-in
188-
replacement, but programs using the new version may use APIs not present
189-
in the previous one. In other words, a program linking against the new
190-
version may fail with 'unresolved symbols' if linking against the old
191-
version at runtime: set revision to 0, bump current and age.
199+
replacement, but programs using the new version may use APIs not
200+
present in the previous one. In other words, a program linking against
201+
the new version may fail with 'unresolved symbols' if linking against
202+
the old version at runtime: set revision to 0, bump current and age.
192203
3. Programs may need to be changed, recompiled, and relinked in order to
193-
use the new version. Bump current, set revision and age to 0.
204+
use the new version. Bump current, set revision and age to 0.
194205
```
195206
---
196207
### Note on adding new MPI compiler candidates
@@ -258,43 +269,44 @@
258269
259270
---
260271
### Note on netCDF text APIs and variables of external data type NC_CHAR
261-
* All netCDF external data types are considered numerical data types, except for
262-
NC_CHAR. Numerical data types can be converted to different numerical data
263-
types. However, no numerical datatype is allowed to converted to NC_CHAR and
264-
vice versa. Given these limitations, note the followings.
272+
* All netCDF external data types are considered numerical data types, except
273+
for NC_CHAR. Numerical data types can be converted to different numerical
274+
data types. However, no numerical datatype is allowed to converted to NC_CHAR
275+
and vice versa. Given these limitations, note the followings.
265276
266277
* For attribute APIs, only text API, ncmpi_put_att_text(), can create/write
267-
attributes in NC_CHAR data type. Note that ncmpi_put_att_text() does not take
268-
an argument of external data type like other attribute APIs, because the
269-
attribute to be created/written will be of NC_CHAR type. For reading, only text
270-
API, ncmpi_get_att_text(), can read attributes of NC_CHAR type from file,
271-
otherwise NC_ECHAR error code will return. Non-text APIs are not allowed to
272-
put/get attributes of NC_CHAR type.
273-
274-
* For variable get/put APIs, only text APIs, for example nc_put_vara_text(), can
275-
read/write a variable defined as NC_CHAR type. Trying to use non-text APIs to
276-
read/write a NC_CHAR variable will result in NC_ECHAR error code returned.
278+
attributes in NC_CHAR data type. Note that ncmpi_put_att_text() does not take
279+
an argument of external data type like other attribute APIs, because the
280+
attribute to be created/written will be of NC_CHAR type. For reading, only
281+
text API, ncmpi_get_att_text(), can read attributes of NC_CHAR type from
282+
file, otherwise NC_ECHAR error code will return. Non-text APIs are not
283+
allowed to put/get attributes of NC_CHAR type.
284+
285+
* For variable get/put APIs, only text APIs, for example nc_put_vara_text(),
286+
can read/write a variable defined as NC_CHAR type. Trying to use non-text
287+
APIs to read/write a NC_CHAR variable will result in NC_ECHAR error code
288+
returned.
277289
278290
* There is no NC_ERANGE error code possibly returned from text APIs.
279291
280292
* In netCDF, NC_CHAR is designed purely for storing text data. NC_CHAR is
281-
considered by netCDF as unsigned 8-bit integer, but not for used to store a
282-
numerical value. Others netCDF external numerical data types and their
283-
numerical meanings:
284-
```
285-
NC_BYTE is considered as a signed 1-byte integer
286-
NC_UBYTE is considered as a unsigned 1-byte integer
287-
NC_SHORT is considered as a signed 2-byte integer
288-
NC_USHORT is considered as a unsigned 2-byte integer
289-
NC_INT is considered as a signed 4-byte integer
290-
NC_UINT is considered as a unsigned 4-byte integer
291-
NC_INT64 is considered as a signed 8-byte integer
292-
NC_UINT64 is considered as a unsigned 8-byte integer
293-
NC_FLOAT is considered as a signed 4-byte floating point
294-
NC_DOUBLE is considered as a signed 8-byte double precision floating point
295-
```
296-
All external data types, their byte sizes, sign-ness, and numerical ranges are
297-
independent from the systems running PnetCDF/netCDF.
293+
considered by netCDF as unsigned 8-bit integer, but not for used to store a
294+
numerical value. Others netCDF external numerical data types and their
295+
numerical meanings:
296+
```
297+
NC_BYTE is considered as a signed 1-byte integer
298+
NC_UBYTE is considered as a unsigned 1-byte integer
299+
NC_SHORT is considered as a signed 2-byte integer
300+
NC_USHORT is considered as a unsigned 2-byte integer
301+
NC_INT is considered as a signed 4-byte integer
302+
NC_UINT is considered as a unsigned 4-byte integer
303+
NC_INT64 is considered as a signed 8-byte integer
304+
NC_UINT64 is considered as a unsigned 8-byte integer
305+
NC_FLOAT is considered as a signed 4-byte floating point
306+
NC_DOUBLE is considered as a signed 8-byte double precision floating point
307+
```
308+
All external data types, their byte sizes, sign-ness, and numerical ranges
309+
are independent from the systems running PnetCDF/netCDF.
298310
299311
---
300312
### config.guess, config.sub, install-sh in directory scripts
@@ -334,8 +346,8 @@ src/libf90 (1.8.1 and prior) src/binding/f90 (1.9.0 and later):
334346
---
335347
### Note on adding a new configure command-line option
336348
* Files need updated
337-
* `configire.ac` -- The AC_OUTPUT section, add "enabled" on screen if the new
338-
feature is enabled. No output when disabled. For example,
349+
* `configire.ac` -- The AC_OUTPUT section, add "enabled" on screen if the
350+
new feature is enabled. No output when disabled. For example,
339351
```
340352
if test "x${enable_netcdf4}" = xyes; then
341353
echo "\

0 commit comments

Comments
 (0)