Skip to content

use consistent copyright text banner #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

check:
cd test && make check
cd examples && make check
Expand All @@ -10,8 +15,8 @@ clean:
cd test && make clean
cd examples && make clean

build-clean:
rm -rf build/
build-clean: clean
rm -rf build
rm -rf src/pnetcdf.egg-info/
rm -rf src/pnetcdf/_Dimension.c
rm -rf src/pnetcdf/_Dimension.*.so
Expand All @@ -24,3 +29,6 @@ build-clean:
rm -rf src/pnetcdf/__pycache__/
rm -rf test/__pycache__/

install-clean: build-clean
rm -rf dist

4 changes: 4 additions & 0 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

check_PROGRAMS = collective_write.py \
create_open.py \
Expand Down
5 changes: 2 additions & 3 deletions examples/Pytorch_DDP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ Distributed Data Parallel (DDP) module and MPI to run on multiple MPI processes
in parallel. Detailed information describing the example programs is provided
at the beginning of each file.

## torch_ddp_skeleton_py
[torch_ddp_skeleton.py](./torch_ddp_skeleton.py) shows how to set up the MPI and DDP
environment to run a program in parallel.
## [torch_ddp_skeleton.py](./torch_ddp_skeleton.py) shows how to set up the MPI
and DDP environment to run a program in parallel.

Command usage:
```sh
Expand Down
4 changes: 4 additions & 0 deletions examples/Pytorch_DDP/torch_ddp_skeleton.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.

# This is a skeleton program to show how to run Pytorch distributed environment
# with MPI

Expand Down
11 changes: 5 additions & 6 deletions examples/collective_write.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
This example mimics the coll_perf.c from ROMIO. It creates a netcdf file and
writes a number of 3D integer non-record variables. The measured write bandwidth
Expand Down
11 changes: 5 additions & 6 deletions examples/create_open.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
This example shows how to use `File` class constructor to create a netCDF file and to
open the file for read only.
Expand Down
11 changes: 5 additions & 6 deletions examples/fill_mode.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
This example shows how to use `Variable` class methods and `File` class methods
to set the fill mode of variables and fill values.
Expand Down
11 changes: 5 additions & 6 deletions examples/flexible_api.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example shows how to use `Variable` method put_var() and iput_var() to write a 2D 4-byte
Expand Down
11 changes: 5 additions & 6 deletions examples/get_info.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""

Example commands for MPI run and outputs from running ncmpidump on the
Expand Down
11 changes: 5 additions & 6 deletions examples/get_vara.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example is the read counterpart of example put_vara.py. It shows how to
Expand Down
11 changes: 5 additions & 6 deletions examples/ghost_cell.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example shows how to use `Variable` method to write a 2D array buffer with
Expand Down
11 changes: 5 additions & 6 deletions examples/global_attribute.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example shows how to use `File` API to write a 2D 4-byte
Expand Down
11 changes: 5 additions & 6 deletions examples/hints.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
* This example sets two PnetCDF hints: nc_header_align_size and nc_var_align_size
and prints the hint values as well as the header size, header extent, and two variables'
Expand Down
11 changes: 5 additions & 6 deletions examples/nonblocking_write.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
This example is similar to collective_write.py but using nonblocking APIs.
It creates a netcdf file in CDF-5 format and writes a number of
Expand Down
11 changes: 5 additions & 6 deletions examples/nonblocking_write_def.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
This example is the same as nonblocking_write.py expect all nonblocking
write requests (calls to iput and bput) are posted in define mode.
Expand Down
11 changes: 5 additions & 6 deletions examples/put_vara.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example shows how to use `Variable` method put_var() to write a 2D 4-byte
Expand Down
11 changes: 5 additions & 6 deletions examples/put_varn_int.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example shows how to use a single call of `Variable` method put_var() to
Expand Down
11 changes: 5 additions & 6 deletions examples/transpose.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example shows how to use `Variable` method put_var() to write six 3D integer array
Expand Down
11 changes: 5 additions & 6 deletions examples/transpose2D.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
####################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

"""
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This example shows how to use `Variable` method put_var() write a 2D integer array
Expand Down
7 changes: 6 additions & 1 deletion include/PnetCDF.pxi
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

# # size_t, ptrdiff_t are defined in stdlib.h
# cdef extern from "stdlib.h":
# ctypedef long size_t
Expand Down Expand Up @@ -313,4 +318,4 @@ cdef extern from "numpy/arrayobject.h":
void* PyArray_DATA(ndarray) nogil
char* PyArray_BYTES(ndarray) nogil
npy_intp* PyArray_STRIDES(ndarray) nogil
void import_array()
void import_array()
8 changes: 5 additions & 3 deletions include/mpi-compat.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* Author: Lisandro Dalcin */
/* Contact: [email protected] */
/*
* Copyright (C) 2024, Northwestern University and Argonne National Laboratory
* See COPYRIGHT notice in top-level directory.
*/

#ifndef MPI_COMPAT_H
#define MPI_COMPAT_H
Expand All @@ -16,4 +18,4 @@ typedef void *PyMPI_MPI_Session;
#define MPI_Session PyMPI_MPI_Session
#endif

#endif/*MPI_COMPAT_H*/
#endif /*MPI_COMPAT_H*/
10 changes: 4 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
###############################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
###############################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

# Follow instructions below for editing.
[options]
Expand Down
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
###############################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
###############################################################################
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

import os
import sys
Expand Down
4 changes: 4 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

check_PROGRAMS = tst_atts.py \
tst_default_format.py \
Expand Down
5 changes: 5 additions & 0 deletions test/tst_atts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

import math
import subprocess
import sys
Expand Down
6 changes: 2 additions & 4 deletions test/tst_default_format.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# This file is part of pnetcdf, a Python interface to the PnetCDF library.
#
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory
# License:
# See COPYRIGHT notice in top-level directory.
#

"""
This test program is intended to illustrate the use of the pnetCDF python API.
Expand Down
5 changes: 5 additions & 0 deletions test/tst_dims.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

import sys
import unittest
import os
Expand Down
6 changes: 2 additions & 4 deletions test/tst_file_fill.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# This file is part of pnetcdf, a Python interface to the PnetCDF library.
#
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory
# License:
# See COPYRIGHT notice in top-level directory.
#

"""
This example program is intended to illustrate the use of the pnetCDF python API. The
Expand Down
Loading
Loading