You are on page 1of 39

Modern Fortran: Building Efficient

Parallel Applications 1st Edition Milan


Curcic
Visit to download the full and correct content document:
https://textbookfull.com/product/modern-fortran-building-efficient-parallel-applications-
1st-edition-milan-curcic/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Modern Fortran Building efficient parallel applications


1st Edition Milan Curcic

https://textbookfull.com/product/modern-fortran-building-
efficient-parallel-applications-1st-edition-milan-curcic-2/

Fortran 2018 with Parallel Programming 1st Edition


Subrata Ray (Author)

https://textbookfull.com/product/fortran-2018-with-parallel-
programming-1st-edition-subrata-ray-author/

Modern Fortran Explained: Incorporating Fortran 2018


Michael Metcalf

https://textbookfull.com/product/modern-fortran-explained-
incorporating-fortran-2018-michael-metcalf/

Modern Fortran Explained Michael Metcalf

https://textbookfull.com/product/modern-fortran-explained-
michael-metcalf/
Laser Additive Manufacturing. Materials, Design,
Technologies, and Applications 1st Edition Milan Brandt

https://textbookfull.com/product/laser-additive-manufacturing-
materials-design-technologies-and-applications-1st-edition-milan-
brandt/

Pro Tbb: C++ Parallel Programming with Threading


Building Blocks 1st Edition Michael Voss

https://textbookfull.com/product/pro-tbb-c-parallel-programming-
with-threading-building-blocks-1st-edition-michael-voss/

PostgreSQL Query Optimization: The Ultimate Guide to


Building Efficient Queries 1st Edition Henrietta
Dombrovskaya

https://textbookfull.com/product/postgresql-query-optimization-
the-ultimate-guide-to-building-efficient-queries-1st-edition-
henrietta-dombrovskaya/

Building Serverless Architectures learn the intricacies


and nuances of building efficient serverless
architectures First Published Edition Gurturk

https://textbookfull.com/product/building-serverless-
architectures-learn-the-intricacies-and-nuances-of-building-
efficient-serverless-architectures-first-published-edition-
gurturk/

Parallel programming for modern high performance


computing systems Czarnul

https://textbookfull.com/product/parallel-programming-for-modern-
high-performance-computing-systems-czarnul/
Building efficient parallel applications

Milan Curcic
Foreword by Damian Rouson

MANNING
program foo

implicit none
The main program is the integer :: a, b, n The main program can declare
fundamental Fortran unit. real :: x data, have executable code,
It is the only unit that can as well as invoke other units,
n = 1, 10
be invoked as an executable such as functions and
do n = 1, 10
from the operating system. call add(a, n)
subroutines.
end do
end program foo

Like programs, functions function sum(a, b) Functions can take any number
can also declare data and of input arguments, but always
have executable code. integer, intent(in) :: a, b return only one result.
Unlike programs, they integer :: sum
can only be invoked in
expressions; for example, sum = a + b Use functions for side
total = 2 * sum(3, 5). effect-free calculations.
end function sum

The intent attribute determines


Subroutines receive input whether an input argument can
subroutine add(a, b)
arguments, modify them be modified in-place (in out)
in-place, and return any or not (in)
.
integer, intent(in out) :: a
number of output arguments. integer, intent(in) :: b
Subroutines can only be
invoked with a call statement; a=a+b Use subroutines when you need
for example, call add(a, 3). print ∗, ‘a = ‘, a
to modify input arguments in
place, or write data to screen
end subroutine add
or external files.

An overview of a Fortran program, function, and subroutine


Modern Fortran
BUILDING EFFICIENT PARALLEL APPLICATIONS

MILAN CURCIC
FOREWORD BY DAMIAN ROUSON

MANNING
SHELTER ISLAND
For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: orders@manning.com

©2020 by Manning Publications Co. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in


any form or by means electronic, mechanical, photocopying, or otherwise, without prior written
permission of the publisher.

Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in the book, and Manning Publications
was aware of a trademark claim, the designations have been printed in initial caps or all caps.

Recognizing the importance of preserving what has been written, it is Manning’s policy to have
the books we publish printed on acid-free paper, and we exert our best efforts to that end.
Recognizing also our responsibility to conserve the resources of our planet, Manning books
are printed on paper that is at least 15 percent recycled and processed without the use of
elemental chlorine.

Development editor: Lesley Trites


Technical development editor: Michiel Trimpe
Manning Publications Co. Review editor: Aleksandar Dragosavljević
20 Baldwin Road Production editor: Lori Weidert
PO Box 761 Copy editor: Frances Buran
Shelter Island, NY 11964 Proofreader: Melody Dolab
Technical proofreader: Maurizio Tomasi
Typesetter: Dennis Dalinnik
Cover designer: Marija Tudor

ISBN: 9781617295287
Printed in the United States of America
contents
foreword xi
preface xiii
acknowledgments xiv
about this book xvi
about the author xxii
about the cover illustration xxiii

PART 1 GETTING STARTED WITH MODERN FORTRAN ........1

1 Introducing Fortran 3
1.1 What is Fortran? 4
1.2 Fortran features 6
1.3 Why learn Fortran? 8
1.4 Advantages and disadvantages 10
Side-by-side comparison with Python 10
1.5 Parallel Fortran, illustrated 12
1.6 What will you learn in this book? 13
1.7 Think parallel! 14
Copying an array from one processor to another 17

iii
iv CONTENTS

1.8 Running example: A parallel tsunami simulator 22


Why tsunami simulator? 22 Shallow water equations

23
What we want our app to do 24
1.9 Further reading 25

2 Getting started: Minimal working app


2.1 Compiling and running your first program
26
27
2.2 Simulating the motion of an object 28
What should our app do? 29 ■
What is advection? 30
2.3 Implementing the minimal working app 31
Implementation strategy 32 Defining the main program 33

Declaring and initializing variables 34 Numeric data types 35


Declaring the data to use in our app 37 Branching with an if


block 40 Using a do loop to iterate 42 Setting the initial


■ ■

water height values 44 Predicting the movement of the


object 45 Printing results to the screen 47 Putting it


■ ■

all together 47
2.4 Going forward with the tsunami simulator 51
2.5 Answer key 52
Exercise: Cold front propagation 52
2.6 New Fortran elements, at a glance 52
2.7 Further reading 52

PART 2 CORE ELEMENTS OF FORTRAN ...........................55

3 Writing reusable code with functions and subroutines


3.1 Toward higher app complexity 58
Refactoring the tsunami simulator 58 Revisiting the cold front

57

problem 61 An overview of Fortran program units 63


3.2 Don’t repeat yourself, use procedures 65


Your first function 65 Expressing finite difference as a function

in the tsunami simulator 70


3.3 Modifying program state with subroutines 72
Defining and calling a subroutine 72 When do you use a

subroutine over a function? 74 Initializing water height in


the tsunami simulator 75


CONTENTS v

3.4 Writing pure procedures to avoid side effects 76


What is a pure procedure? 76 Some restrictions on pure

procedures 77 Why are pure functions important? 77


3.5 Writing procedures that operate on both scalars


and arrays 77
3.6 Procedures with optional arguments 79
3.7 Tsunami simulator: Putting it all together 81
3.8 Answer key 82
Exercise 1: Modifying state with a subroutine 82 Exercise 2: ■

Writing an elemental function that operates on both scalars


and arrays 83
3.9 New Fortran elements, at a glance 83
3.10 Further reading 84

4 Organizing your Fortran code using modules


4.1 Accessing a module 86
Getting compiler version and options 86 ■
85

Using portable
data types 89
4.2 Creating your first module 91
The structure of a custom module 92 Defining a module 93

Compiling Fortran modules 95 Controlling access to variables


and procedures 97 Putting it all together in the tsunami


simulator 98
4.3 Toward realistic wave simulations 99
A brief look at the physics 101 Updating the finite difference

calculation 102 Renaming imported entities to avoid name


conflict 104 The complete code 105


4.4 Answer key 107


Exercise 1: Using portable type kinds in the tsunami simulator 107
Exercise 2: Defining the set_gaussian subroutine in a module 107
4.5 New Fortran elements, at a glance 108
4.6 Further reading 108

5 Analyzing time series data with arrays


5.1 Analyzing stock prices with Fortran arrays
Objectives for this exercise 111 ■
110
111
About the data 112
Getting the data and code 114
vi CONTENTS

5.2 Finding the best and worst performing stocks 114


Declaring arrays 116 Array constructors 118 Reading stock
■ ■

data from files 121 Allocating arrays of a certain size or


range 122 Allocating an array from another array 123


Automatic allocation on assignment 123 Cleaning up after ■

use 124 Checking for allocation status 126 Catching


■ ■

allocation and deallocation errors 126 Implementing the CSV


reader subroutine 127 Indexing and slicing arrays 129


5.3 Identifying risky stocks 132


5.4 Finding good times to buy and sell 135
5.5 Answer key 139
Exercise 1: Convenience (de)allocator subroutines 139 Exercise 2: ■

Reversing an array 140 Exercise 3: Calculating moving average


and standard deviation 140


5.6 New Fortran elements, at a glance 141
5.7 Further reading 141

6 Reading, writing, and formatting your data


6.1 Your first I/O: Input from the keyboard and
output to the screen 144
143

The simplest I/O 144 Reading and writing multiple variables at


once 147 Standard input, output, and error 148


6.2 Formatting numbers and text 151


Designing the aircraft dashboard 151 Formatting strings,

broken down 152 Format statements in legacy Fortran


code 157
6.3 Writing to files on disk: A minimal note-taking app 157
Opening a file and writing to it 158 Opening a file 159

Writing to a file 161 Appending to a file 162 Opening


■ ■

files in read-only or write-only mode 163 Checking whether ■

a file exists 164 Error handling and closing the file 167

6.4 Answer key 168


Exercise: Redirect stdout and stderr to files 168
6.5 New Fortran elements, at a glance 169
CONTENTS vii

PART 3 ADVANCED FORTRAN USE ................................171

7 Going parallel with Fortran coarrays


7.1 Why write parallel programs? 174
173

7.2 Processing real-world weather buoy data 175


About the data 176 Getting the data and code 178

Objectives 178 Serial implementation of the program 179


7.3 Parallel processing with images and coarrays 181


Fortran images 182 Getting information about the images 183

Telling images what to do 184 Gathering all data to a single


image 186
7.4 Coarrays and synchronization, explained 187
Declaring coarrays 188 Allocating dynamic coarrays 188

Sending and receiving data 189 Controlling the order of


image execution 191


7.5 Toward the parallel tsunami simulator 192
Implementation strategy 192 Finding the indices of neighbor

images 194 Allocating the coarrays 195 The main


■ ■

time loop 196


7.6 Answer key 199
Exercise 1: Finding the array subranges on each image 199
Exercise 2: Writing a function that returns the indices
of neighbor images 200
7.7 New Fortran elements, at a glance 201
7.8 Further reading 201

8 Working with abstract data using derived types


8.1 Recasting the tsunami simulator with derived types 203
202

8.2 Defining, declaring, and initializing derived types 206


Defining a derived type 209 Instantiating a derived type 210

Accessing derived type components 212 Positional vs. keyword


arguments in derived type constructors 212 Providing default■

values for derived type components 214 Writing a custom type


constructor 215 Custom type constructor for the Field type 218

8.3 Binding procedures to a derived type 220


Your first type-bound method 220 Type-bound methods for the

Field type 221 Controlling access to type components and


methods 222 Bringing it all together 224



viii CONTENTS

8.4 Extending tsunami to two dimensions 224


Going from 1-D to 2-D arrays 225 Updating the equation

set 226 Finite differences in x and y 226 Passing a class


■ ■

instance to diffx and diffy functions 228 Derived type ■

implementation of the tsunami solver 229


8.5 Answer key 231
Exercise 1: Working with private components 231 Exercise 2: ■

Invoking a type-bound method from an array of instances 233


Exercise 3: Computing finite difference in y direction. 233
8.6 New Fortran elements, at a glance 234
8.7 Further reading 235

9 Generic procedures and operators for any data type


9.1 Analyzing weather data of different types
About the data 238 ■ Objectives 241 ■
237
Strategy for this
236

exercise 242
9.2 Type systems and generic procedures 242
Static versus strong typing 242
9.3 Writing your first generic procedure 243
The problem with strong typing 243 Writing the specific

functions 244 Writing the generic interface 247 Results


■ ■

and complete program 251


9.4 Built-in and custom operators 253
What’s an operator? 253 Things to do with operators 253

Fortran’s built-in operators 255 Operator precedence 257


Writing custom operators 257 Redefining built-in


operators 258
9.5 Generic procedures and operators in the tsunami
simulator 259
Writing user-defined operators for the Field type 259
9.6 Answer key 260
Exercise 1: Specific average function for a derived type 260
Exercise 2: Defining a new string concatenation operator 262
9.7 New Fortran elements, at a glance 263

10 User-defined operators for derived types


10.1 Happy Birthday! A countdown app 265
Some basic specification 265 ■
264

Implementation strategy 266


CONTENTS ix

10.2 Getting user input and current time 266


Your first datetime class 266 Reading user input

267
Getting current date and time 271
10.3 Calculating the difference between two times 272
Modeling a time interval 273 Implementing a custom

subtraction operator 273 Time difference algorithm 275


The complete program 280


10.4 Overriding operators in the tsunami simulator 282
A refresher on the Field class 283 Implementing the arithmetic

for the Field class 284 Synchronizing parallel images on


assignment 286
10.5 Answer key 288
Exercise 1: Validating user input 288 Exercise 2: Leap year in

the Gregorian calendar 289 Exercise 3: Implementing the


addition for the Field type 289


10.6 New Fortran elements, at a glance 290

PART 4 THE FINAL STRETCH ........................................291

11 Interoperability with C: Exposing your app to the web


11.1 Interfacing C: Writing a minimal TCP client and
server 294
293

Introducing networking to Fortran 295 ■


Installing libdill 297
11.2 TCP server program: Receiving network
connections 297
IP address data structures 299 Initializing the IP address

structure 301 Checking IP address values 306 Intermezzo:


■ ■

Matching compatible C and Fortran data types 308 Creating a ■

socket and listening for connections 310 Accepting incoming ■

connections to a socket 311 Sending a TCP message to the


client 312 Closing a connection 315


11.3 TCP client program: Connecting to a remote server 317


Connecting to a remote socket 317 ■
Receiving a message 319
The complete client program 321
11.4 Some interesting mixed Fortran-C projects 322
11.5 Answer key 322
Exercise 1: The Fortran interface to ipaddr_port 322 Exercise 2: ■

Fortran interfaces to suffix_detach and tcp_close 323


x CONTENTS

11.6 New Fortran elements, at a glance 324


11.7 Further reading 324

12 Advanced parallelism with teams, events, and collectives


12.1 From coarrays to teams, events, and collectives 327
326

12.2 Grouping images into teams with common tasks 328


Teams in the tsunami simulator 329 Forming new teams 331

Changing execution between teams 332 Synchronizing teams


and exchanging data 335


12.3 Posting and waiting for events 338
A push notification example 339 Posting an event 341

Waiting for an event 341 ■


Counting event posts 342
12.4 Distributed computing using collectives 343
Computing the minimum and maximum of distributed arrays 343
Collective subroutines syntax 345 Broadcasting values to

other images 346


12.5 Answer key 347
Exercise 1: Hunters and gatherers 347 Exercise 2: Tsunami time

step logging using events 350 Exercise 3: Calculating the global


mean of water height 351


12.6 New Fortran elements, at a glance 353
12.7 Further reading 353

appendix A Setting up the Fortran development environment 355


appendix B From calculus to code 361
appendix C Concluding remarks 366
index 381
foreword
I was immediately excited to find out that Milan Curcic would be writing a modern
Fortran book. Almost weekly, I meet people who express surprise that Fortran
remains in use more than 60 years after its creation, so any signs of new life in a lan-
guage so often written off as dead or dying are cause for celebration. I usually
explain that Fortran has its strongest footholds in fields that embraced computing
early. I go on to tell them that they almost certainly use the results of Fortran pro-
grams daily when checking weather forecasts. What makes Milan’s work intriguing is
the extent to which it connects established domains, where Fortran has long held
sway, and emerging domains, where Fortran is rare. This book grew out of the
unique perspective Milan brings from having been involved in bridging the divides
that prevent many disciplines from writing Fortran and prevent most Fortran pro-
grammers from exploiting programming paradigms that have come into widespread
use in other languages.
To Milan’s credit, the book focuses on teaching Fortran programming rather than
promoting the intriguing software libraries and applications to which he has contrib-
uted. The lucky reader who follows the links to his work and that of others will gain
more than just an understanding of Fortran programming. Such a reader will embark
on a journey that connects numerical weather prediction, a subject as old as comput-
ing, and cloud computing, a twenty-first-century innovation. Such a reader will also
discover how to incorporate aspects of functional programming, a paradigm around
which whole languages have been built, in Fortran, the language that’s the ultimate
ancestor of all high-level programming languages. And such a reader will be exposed

xi
xii FOREWORD

to neural networks, a subject undergoing explosive growth and impacting technolo-


gies as disparate as autonomous driving and cancer diagnosis.
Milan has led or contributed to popular software in each of these areas, and some
of the packages grew out of this book or vice versa. Cloudrun (https://cloudrun.co), a
service he develops with others, for example, pioneered numerical weather prediction
software-as-a-service (SaaS) using cloud computing platforms. The open source func-
tional-fortran library (http://mng.bz/vxy1) provides utilities supporting a program-
ming paradigm that hasn’t penetrated the Fortran world as much as I would like. The
open source Fortran Standard Library (https://github.com/fortran-lang/stdlib) aims
to put Fortran on more even standing with other languages that benefit from large
libraries considered part of the language. His neural-fortran (https://github.com/
modern-fortran/neural-fortran), which grew out of his work on one chapter of this
book, demonstrates the application of Fortran’s scalable parallel programming model
in a domain dominated by languages that lack built-in parallel programming models
able to exploit distributed-memory platforms. Collectively, these projects are used by
hundreds of developers worldwide, and the interplay between his work on this book
and work on these projects informs and inspires the book’s coverage of the language.
For the reader seeking proof of life for modern Fortran, Milan’s work provides
ample evidence of the language’s ongoing role in technological modernity. This book
is one of the more vibrant buds growing out of his work, and the interested reader will
learn the features of the language that have proven useful in the aforementioned
broad portfolio of Milan’s projects.

—DAMIAN ROUSON,
PhD, P.E. President, Sourcery Institute, Oakland, California, USA
preface
When Mike Stephens from Manning first reached out to me in the summer of 2017,
he wrote, “We saw some of your forum posts and GitHub repositories; would you con-
sider writing a Fortran book with Manning?” Writing a book had never crossed my
mind, nor did I believe I was cut out for the job. I closed my eyes and took a leap of
faith. “Of course, I’d love to! Where do I send a proposal?” By the end of the summer,
we had a contract and a tentative table of contents in place. Two development editors,
two technical editors, four peer reviews, three chapter rewrites, two hurricanes, and
almost three years later, we have the finished book.
Welcome to Modern Fortran: Building Efficient Parallel Applications! If you’re holding
this book, chances are you either want to learn Fortran programming for school or
work, or you’re an experienced Fortran programmer looking to brush up on the latest
developments in the language. Either way, you’ve come to the right place. If you’re
just starting to learn, my goal with this book is to give you a straightforward, hands-on,
practical approach to Fortran programming. If you have prior experience with the
language, I want this to be a handy survival guide in the Fortran world. Forgot how to
write functions that operate on both scalars and arrays? Wondering how to write your
program for parallel execution? Practical projects and exercises with solutions are
here to show you how.
I’m happy to have the opportunity to share with you what I’ve learned over the
past 14 years. Thank you in advance for trusting me with your time and money.
Modern Fortran is my way of giving back to dozens of you who taught me and helped
me along the way. I hope you use this book to teach the next generation of Fortran
programmers.

xiii
acknowledgments
It takes a village to make a great book. Mike Stephens was the acquisitions editor—he
brought me on board and helped work out the table of contents, as well as getting clear
on who this book is for. My development editors, Kristen Watterson and Lesley Trites,
guided me along the way and diligently pushed me forward. Kristen worked with me on
the initial drafts of nine of the chapters; then Lesley took over for the remainder and
putting it all together. Technical editors Michiel Trimpe and Alain Couniot made sure
to point out any mistakes in the code and confusing paragraphs that didn’t make sense.
Bert Bates chimed in on occasion to help me pull out the concrete from the abstract.
Maurizio Tomasi was the technical proofreader and made sure that all the code in the
book works as advertised. Melody Dolab was the final proofreader and Lori Weidert was
the production editor. Also, the rest of the Manning staff who worked with me: Candace
Gillhoolley, Ana Romac, Rejhana Markanovic, Aleksandar Dragosavljević, Matko Hrvatin,
and others. Thank you all—I’ve learned a lot from you.
I also want to thank all of the reviewers: Anders Johansson, Anton Menshov,
Bridger Howell, David Celements, Davide Cadamuro, Fredric Ragnar, Jan Pieter
Herweijer, Jose San Leandro, Joseph Ian Walker, Kanak Kshetri, Ken W. Alger, Konrad
Hinsen, Kyle Mandli, Leonardo Costa Prauchner, Lottie Greenwood, Luis Moux-
Domínguez, Marcio Nicolau, Martin Beer, Matthew Emmett, Maurizio Tomasi,
Michael Jensen, Michal Konrad Owsiak, Mikkel Arentoft, Ondřej Čertík, Patrick
Seewald, Richard Fieldsend, Ryan B. Harvey, Srdjan Santic, Stefano Borini, Tiziano
Müller, Tom Gueth, Valmiky Arquissandas, and Vincent Zaballa. Your suggestions
helped make this a better book.

xiv
ACKNOWLEDGMENTS xv

Arjen Markus provided thorough reviews and suggestions on every chapter as they
became available in the Manning Early Access Program. Izaak Beekman, Jacob Williams,
Marcus Van Lier-Walqui, and Steve Lionel provided helpful comments on early drafts
of the book. Damian Rouson and his own books were an inspiration, and he encour-
aged me further along the way. Michael Hirsch helped with continuous integration of
some of the GitHub repositories associated with the book. Finally, all my readers who
trusted me and bought the book while still in the works—you helped me to keep at it
and finish the job.
Last but not least, to my wife, family, and friends who supported me and were
proud of me—I couldn’t have done it without your love and help.
Introducing Fortran

This chapter covers


 What is Fortran and why learn it?
 Fortran’s strengths and weaknesses
 Thinking in parallel
 Building a parallel simulation app from scratch

This is a book about Fortran, one of the first high-level programming languages
in history. It will teach you the language by guiding you step-by-step through
the development of a fully featured, parallel physics simulation app. Notice the
emphasis on parallel. Parallel programming allows you to break your problem down
into pieces and let multiple processors each work on only part of the problem,
thus reaching the solution in less time. By the end, you’ll be able to recognize
problems that can be parallelized, and use modern Fortran techniques to solve
them.
This book is not a comprehensive reference manual for every Fortran feature—
I’ve omitted significant parts of the language on purpose. Instead, I focus on the
most practical features that you’d use to build a real-world Fortran application. As
we work on our app chapter by chapter, we’ll apply modern Fortran features and
software design techniques to make our app robust, portable, and easy to use and

3
Another random document with
no related content on Scribd:
GEORGIA: Mr. Allan Sweat, Treasurer, Savannah, Ga.
HAWAII: Mrs. W. W. Hall, Secretary, Honolulu, Hawaii.
ILLINOIS: Mr. Chas. H. Ravell, Secretary, 135 Adams Street
Chicago, Ill.
INDIANA: Mr. Rowland Evans, Secretary, Indianapolis, Ind.
IOWA: Mr. Charles Hutchinson, Secretary, 916 Fleming Building,
Des Moines, Iowa.
KANSAS: Mrs. B. B. Smyth, Secretary, Room 8, 4th floor, State
House, Topeka, Kan.
MAINE: Capt. F. J. Morrow, U. S. A., 478½ Congress Street,
Portland, Me.
MARYLAND: Mr. George Norbury Mackenzie, Secretary, 1243
Calvert Building, Baltimore, Md.
MASSACHUSETTS: Miss Katharine P. Loring, Secretary, Prides
Crossing, Mass.
MICHIGAN: Mr. Ralph M. Dyar, Secretary, 818 Penobscot Building,
Detroit, Mich.
MINNESOTA: Mr. Edward C. Stringer, Secretary, St. Paul, Minn.
MISSOURI: Mr. Leighton Shields, Secretary, 1200 Third National
Bank Building, St Louis, Mo.
NEW HAMPSHIRE: Address of Branch, Mr. Wm. F. Thayer, First
National Bank, Concord, N. H.
NEW JERSEY: Mr. W. E. Speakman, Secretary, Woodbury, N. J.
NEW YORK: Mrs. William K. Draper, Secretary, 500 Fifth Avenue,
New York City.
NORTH CAROLINA: Mrs. Theodore F. Davidson, Secretary,
Asheville, N. C.
OHIO: Mr. R. Grosvenor Hutchins, Secretary, Columbus, O.
OKLAHOMA: Dr. Fred. S. Clinton, Secretary, Tulsa, Okla.
PENNSYLVANIA: Mr. Joseph Allison Steinmetz, Secretary,
Independence Hall Building, Philadelphia, Pa.
PHILIPPINE ISLANDS: Mrs. Victorino Mapa, Secretary, Manila, P. I.
PORTO RICO: Miss Josefina Noble, Secretary, No. 9 Tetuan Street,
San Juan, P. R.
RHODE ISLAND: Professor George Grafton Wilson, Secretary, care
Brown University, Providence, R. I.
SOUTH CAROLINA: Mr. A. W. Litschgi, Secretary, 187 King Street,
Charleston, S. C.
TEXAS: Mr. Raymond D. Allen, Secretary, 483 Bryan Street, Dallas,
Texas.
VERMONT: Mr. Chas. S. Forbes, Secretary, St. Albans, Vt.
WASHINGTON: Rev. M. A. Matthews, Seattle, Wash.
WEST VIRGINIA: Miss Elizabeth Van Rensselaer, Secretary,
Berkeley Springs, W. Va.
WYOMING: Mr. Chas. F. Mallin, Secretary, Cheyenne, Wyo.
Chinosol
(Pronounced Kinnosol)
THE ONLY
NON-POISONOUS, NON-IRRITATING, NON-ALCOHOLIC
ANTISEPTIC
WHICH IS
“MUCH STRONGER THAN CARBOLIC ACID AND AT LEAST THE
EQUAL OF BICHLORIDE OF MERCURY.”
(Extract from Bacteriological Report from the Lederle Laboratories.)
A THOROUGHLY RELIABLE DISINFECTANT
SAFE EVEN IN THE HANDS OF CHILDREN.
There is no longer any excuse for running the risk of poisoning by
carbolic acid or corrosive sublimate.
PARTIAL LIST OF AUTHORITIES.

Imperial Board of Health of Germany.


Royal Scientific Commission for Therapeutics of Prussia.
Hygienic Institute of the University of Munich.
Royal University Clinics, Halle a. S.
Dr. Vogelius, Bacteriologist Laboratory University, Copenhagen.

In use in hospitals throughout all Europe.

Chinosol
DOES NOT INJURE MEMBRANES.
FREE FROM DISAGREEABLE ODOR.
Every physician approves of the prompt application of a proper
antiseptic to a bruise, cut, wound or burn, thus insuring surgical
cleanliness until he can reach the patient.
CHINOSOL IS PRESENTED IN TABLET FORM. ONE TABLET TO
ONE QUART OF WATER PRODUCES SOLUTION OF PROPER
STRENGTH.
WE ARE INTRODUCING CHINOSOL THROUGH THE DRUG
TRADE OF AMERICA. IF YOU CANNOT OBTAIN IT, REMIT TO US,
IN POSTAGE, AND WE WILL SEND YOU SUFFICIENT CHINOSOL
TO MAKE

3 QUARTS FOR 10 CENTS.


Guaranteed by us to comply with National and State Pure Drug Laws—No. 2335.
CHINOSOL CO.—PARMELE PHARMACAL CO., Selling Agent, 54 South St.,
N. Y.
*** END OF THE PROJECT GUTENBERG EBOOK THE
AMERICAN RED CROSS BULLETIN (VOL. IV, NO. 2, APRIL 1909)
***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright
in these works, so the Foundation (and you!) can copy and
distribute it in the United States without permission and without
paying copyright royalties. Special rules, set forth in the General
Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree to
abide by all the terms of this agreement, you must cease using
and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project
Gutenberg™ works in compliance with the terms of this
agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms
of this agreement by keeping this work in the same format with
its attached full Project Gutenberg™ License when you share it
without charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it
away or re-use it under the terms of the Project Gutenberg
License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country where
you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of the
copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.
1.E.5. Do not copy, display, perform, distribute or redistribute
this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using
the method you already use to calculate your applicable
taxes. The fee is owed to the owner of the Project
Gutenberg™ trademark, but he has agreed to donate
royalties under this paragraph to the Project Gutenberg
Literary Archive Foundation. Royalty payments must be
paid within 60 days following each date on which you
prepare (or are legally required to prepare) your periodic tax
returns. Royalty payments should be clearly marked as
such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4,
“Information about donations to the Project Gutenberg
Literary Archive Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to
return or destroy all copies of the works possessed in a
physical medium and discontinue all use of and all access
to other copies of Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full


refund of any money paid for a work or a replacement copy,
if a defect in the electronic work is discovered and reported
to you within 90 days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite
these efforts, Project Gutenberg™ electronic works, and the
medium on which they may be stored, may contain “Defects,”
such as, but not limited to, incomplete, inaccurate or corrupt
data, transcription errors, a copyright or other intellectual
property infringement, a defective or damaged disk or other
medium, a computer virus, or computer codes that damage or
cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES -


Except for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU
AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE,
STRICT LIABILITY, BREACH OF WARRANTY OR BREACH
OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE
TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER
THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR
ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE
OR INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF
THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If


you discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person or
entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you do
or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.
Volunteers and financial support to provide volunteers with the
assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status by
the Internal Revenue Service. The Foundation’s EIN or federal
tax identification number is 64-6221541. Contributions to the
Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or
determine the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.

You might also like