100% found this document useful (11 votes)
23 views

Where can buy High Performance Computing on Complex Environments 1st Edition Emmanuel Jeannot ebook with cheap price

Computing

Uploaded by

boyrobft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (11 votes)
23 views

Where can buy High Performance Computing on Complex Environments 1st Edition Emmanuel Jeannot ebook with cheap price

Computing

Uploaded by

boyrobft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Download the full version of the ebook at ebookname.

com

High Performance Computing on Complex Environments


1st Edition Emmanuel Jeannot

https://ebookname.com/product/high-performance-computing-on-
complex-environments-1st-edition-emmanuel-jeannot/

OR CLICK BUTTON

DOWNLOAD EBOOK

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

High Performance Embedded Computing Architectures


Applications and Methodologies 1st Edition Wayne Wolf

https://ebookname.com/product/high-performance-embedded-computing-
architectures-applications-and-methodologies-1st-edition-wayne-wolf/

ebookname.com

Understanding Adaptability Volume 6 A Prerequisite for


Effective Performance within Complex Environments Advances
in Human Performance and Cognitive Engineering Research
1st Edition C. Shawn Burke
https://ebookname.com/product/understanding-adaptability-
volume-6-a-prerequisite-for-effective-performance-within-complex-
environments-advances-in-human-performance-and-cognitive-engineering-
research-1st-edition-c-shawn-burke/
ebookname.com

Positioning and Navigation in Complex Environments 1st


Edition Kegen Yu

https://ebookname.com/product/positioning-and-navigation-in-complex-
environments-1st-edition-kegen-yu/

ebookname.com

Introduction to econometrics 3rd Edition Christopher


Dougherty

https://ebookname.com/product/introduction-to-econometrics-3rd-
edition-christopher-dougherty/

ebookname.com
Delphi Cookbook 50 hands on recipes to master the power of
Delphi for cross platform and mobile development on
Windows Mac OS X Android and iOS 1st Edition Daniele Teti
https://ebookname.com/product/delphi-cookbook-50-hands-on-recipes-to-
master-the-power-of-delphi-for-cross-platform-and-mobile-development-
on-windows-mac-os-x-android-and-ios-1st-edition-daniele-teti/
ebookname.com

Laser Hair Removal Second Edition Series in Cosmetic and


Laser Therapy David J. Goldberg

https://ebookname.com/product/laser-hair-removal-second-edition-
series-in-cosmetic-and-laser-therapy-david-j-goldberg/

ebookname.com

Inside Your Calculator From Simple Programs to Significant


Insights 1st Edition Gerald R. Rising

https://ebookname.com/product/inside-your-calculator-from-simple-
programs-to-significant-insights-1st-edition-gerald-r-rising/

ebookname.com

History of British Neurology 1st Edition F. Clifford Rose

https://ebookname.com/product/history-of-british-neurology-1st-
edition-f-clifford-rose/

ebookname.com

An Introduction to Evolutionary Ethics 1st Edition Scott


M. James

https://ebookname.com/product/an-introduction-to-evolutionary-
ethics-1st-edition-scott-m-james/

ebookname.com
The Unbreakable Child 1ST Edition Kim Michele Richardson

https://ebookname.com/product/the-unbreakable-child-1st-edition-kim-
michele-richardson/

ebookname.com
High-Performance
Computing on Complex
Environments
WILEY SERIES ON PARALLEL
AND DISTRIBUTED COMPUTING
Series Editor: Albert Y. Zomaya

A complete list of titles in this series appears at the end of this volume.
High-Performance
Computing on Complex
Environments

Emmanuel Jeannot
Inria

Julius Žilinskas
Vilnius University
Copyright © 2014 by John Wiley & Sons, Inc. All rights reserved.

Published by John Wiley & Sons, Inc., Hoboken, New Jersey.


Published simultaneously in Canada.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as
permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior
written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to
the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax
(978) 646-8600, or on the web at www.copyright.com. Requests to the Publisher for permission should
be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ
07030, (201) 748-6011, fax (201) 748-6008.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in
preparing this book, they make no representations or warranties with respect to the accuracy or
completeness of the contents of this book and specifically disclaim any implied warranties of
merchantability or fitness for a particular purpose. No warranty may be created or extended by sales
representatives or written sales materials. The advice and strategies contained herin may not be suitable
for your situation. You should consult with a professional where appropriate. Neither the publisher nor
author shall be liable for any loss of profit or any other commercial damages, including but not limited to
special, incidental, consequential, or other damages.

For general information on our other products and services please contact our Customer Care
Department with the U.S. at 877-762-2974, outside the U.S. at 317-572-3993 or fax 317-572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print,
however, may not be available in electronic format.

Library of Congress Cataloging in Publication Data:

Jeannot, Emmanuel.
High performance computing on complex environments / Emmanuel Jeannot, Julius Zilinskas.
pages cm
Includes bibliographical references and index.
ISBN 978-1-118-71205-4 (cloth)
1. High performance computing. I. Žilinskas, J. (Julius), 1973- II. Title.
QA76.88.J43 2014
004.1′ 1–dc23
2013048363

High-Performance Computing on Complex Environments / Emmanuel Jeannot and Julius Žilinskas


Printed in the United States of America.

10 9 8 7 6 5 4 3 2 1
To our colleague Mark Baker
Contents

Contributors xxiii
Preface xxvii

PART I INTRODUCTION 1

1. Summary of the Open European Network for High-Performance


Computing in Complex Environments 3
Emmanuel Jeannot and Julius Žilinskas
1.1 Introduction and Vision / 4
1.2 Scientific Organization / 6
1.2.1 Scientific Focus / 6
1.2.2 Working Groups / 6
1.3 Activities of the Project / 6
1.3.1 Spring Schools / 6
1.3.2 International Workshops / 7
1.3.3 Working Groups Meetings / 7
1.3.4 Management Committee Meetings / 7
1.3.5 Short-Term Scientific Missions / 7
1.4 Main Outcomes of the Action / 7
1.5 Contents of the Book / 8
Acknowledgment / 10
vii
viii CONTENTS

PART II NUMERICAL ANALYSIS FOR HETEROGENEOUS AND


MULTICORE SYSTEMS 11

2. On the Impact of the Heterogeneous Multicore and Many-Core


Platforms on Iterative Solution Methods and Preconditioning
Techniques 13
Dimitar Lukarski and Maya Neytcheva
2.1 Introduction / 14
2.2 General Description of Iterative Methods and Preconditioning / 16
2.2.1 Basic Iterative Methods / 16
2.2.2 Projection Methods: CG and GMRES / 18
2.3 Preconditioning Techniques / 20
2.4 Defect-Correction Technique / 21
2.5 Multigrid Method / 22
2.6 Parallelization of Iterative Methods / 22
2.7 Heterogeneous Systems / 23
2.7.1 Heterogeneous Computing / 24
2.7.2 Algorithm Characteristics and Resource Utilization / 25
2.7.3 Exposing Parallelism / 26
2.7.4 Heterogeneity in Matrix Computation / 26
2.7.5 Setup of Heterogeneous Iterative Solvers / 27
2.8 Maintenance and Portability / 29
2.9 Conclusion / 30
Acknowledgments / 31
References / 31

3. Efficient Numerical Solution of 2D Diffusion Equation on Multicore


Computers 33
Matjaž Depolli, Gregor Kosec, and Roman Trobec
3.1 Introduction / 34
3.2 Test Case / 35
3.2.1 Governing Equations / 35
3.2.2 Solution Procedure / 36
3.3 Parallel Implementation / 39
3.3.1 Intel PCM Library / 39
3.3.2 OpenMP / 40
CONTENTS ix

3.4 Results / 41
3.4.1 Results of Numerical Integration / 41
3.4.2 Parallel Efficiency / 42
3.5 Discussion / 45
3.6 Conclusion / 47
Acknowledgment / 47
References / 47

4. Parallel Algorithms for Parabolic Problems on Graphs in


Neuroscience 51
Natalija Tumanova and Raimondas Čiegis
4.1 Introduction / 51
4.2 Formulation of the Discrete Model / 53
4.2.1 The 𝜃-Implicit Discrete Scheme / 55
4.2.2 The Predictor–Corrector Algorithm I / 57
4.2.3 The Predictor–Corrector Algorithm II / 58
4.3 Parallel Algorithms / 59
4.3.1 Parallel 𝜃-Implicit Algorithm / 59
4.3.2 Parallel Predictor–Corrector Algorithm I / 62
4.3.3 Parallel Predictor–Corrector Algorithm II / 63
4.4 Computational Results / 63
4.4.1 Experimental Comparison of Predictor–Corrector
Algorithms / 66
4.4.2 Numerical Experiment of Neuron Excitation / 68
4.5 Conclusions / 69
Acknowledgments / 70
References / 70

PART III COMMUNICATION AND STORAGE CONSIDERATIONS


IN HIGH-PERFORMANCE COMPUTING 73

5. An Overview of Topology Mapping Algorithms and Techniques in


High-Performance Computing 75
Torsten Hoefler, Emmanuel Jeannot, and Guillaume Mercier
5.1 Introduction / 76
5.2 General Overview / 76
5.2.1 A Key to Scalability: Data Locality / 77
x CONTENTS

5.2.2 Data Locality Management in Parallel Programming


Models / 77
5.2.3 Virtual Topology: Definition and Characteristics / 78
5.2.4 Understanding the Hardware / 79
5.3 Formalization of the Problem / 79
5.4 Algorithmic Strategies for Topology Mapping / 81
5.4.1 Greedy Algorithm Variants / 81
5.4.2 Graph Partitioning / 82
5.4.3 Schemes Based on Graph Similarity / 82
5.4.4 Schemes Based on Subgraph Isomorphism / 82
5.5 Mapping Enforcement Techniques / 82
5.5.1 Resource Binding / 83
5.5.2 Rank Reordering / 83
5.5.3 Other Techniques / 84
5.6 Survey of Solutions / 85
5.6.1 Algorithmic Solutions / 85
5.6.2 Existing Implementations / 85
5.7 Conclusion and Open Problems / 89
Acknowledgment / 90
References / 90

6. Optimization of Collective Communication for Heterogeneous HPC


Platforms 95
Kiril Dichev and Alexey Lastovetsky
6.1 Introduction / 95
6.2 Overview of Optimized Collectives and Topology-Aware
Collectives / 97
6.3 Optimizations of Collectives on Homogeneous Clusters / 98
6.4 Heterogeneous Networks / 99
6.4.1 Comparison to Homogeneous Clusters / 99
6.5 Topology- and Performance-Aware Collectives / 100
6.6 Topology as Input / 101
6.7 Performance as Input / 102
6.7.1 Homogeneous Performance Models / 103
6.7.2 Heterogeneous Performance Models / 105
CONTENTS xi

6.7.3 Estimation of Parameters of Heterogeneous Performance


Models / 106
6.7.4 Other Performance Models / 106
6.8 Non-MPI Collective Algorithms for Heterogeneous Networks / 106
6.8.1 Optimal Solutions with Multiple Spanning Trees / 107
6.8.2 Adaptive Algorithms for Efficient Large-Message
Transfer / 107
6.8.3 Network Models Inspired by BitTorrent / 108
6.9 Conclusion / 111
Acknowledgments / 111
References / 111

7. Effective Data Access Patterns on Massively Parallel Processors 115


Gabriele Capannini, Ranieri Baraglia, Fabrizio Silvestri, and Franco Maria
Nardini
7.1 Introduction / 115
7.2 Architectural Details / 116
7.3 K-Model / 117
7.3.1 The Architecture / 117
7.3.2 Cost and Complexity Evaluation / 118
7.3.3 Efficiency Evaluation / 119
7.4 Parallel Prefix Sum / 120
7.4.1 Experiments / 125
7.5 Bitonic Sorting Networks / 126
7.5.1 Experiments / 131
7.6 Final Remarks / 132
Acknowledgments / 133
References / 133

8. Scalable Storage I/O Software for Blue Gene Architectures 135


Florin Isaila, Javier Garcia, and Jesús Carretero

8.1 Introduction / 135


8.2 Blue Gene System Overview / 136
8.2.1 Blue Gene Architecture / 136
8.2.2 Operating System Architecture / 136
xii CONTENTS

8.3 Design and Implementation / 138


8.3.1 The Client Module / 139
8.3.2 The I/O Module / 141
8.4 Conclusions and Future Work / 142
Acknowledgments / 142
References / 142

PART IV EFFICIENT EXPLOITATION OF HETEROGENEOUS


ARCHITECTURES 145

9. Fair Resource Sharing for Dynamic Scheduling of Workflows on


Heterogeneous Systems 147
Hamid Arabnejad, Jorge G. Barbosa, and Frédéric Suter

9.1 Introduction / 148


9.1.1 Application Model / 148
9.1.2 System Model / 151
9.1.3 Performance Metrics / 152
9.2 Concurrent Workflow Scheduling / 153
9.2.1 Offline Scheduling of Concurrent Workflows / 154
9.2.2 Online Scheduling of Concurrent Workflows / 155
9.3 Experimental Results and Discussion / 160
9.3.1 DAG Structure / 160
9.3.2 Simulated Platforms / 160
9.3.3 Results and Discussion / 162
9.4 Conclusions / 165
Acknowledgments / 166
References / 166

10. Systematic Mapping of Reed–Solomon Erasure Codes


on Heterogeneous Multicore Architectures 169
Roman Wyrzykowski, Marcin Wozniak, and Lukasz Kuczynski
10.1 Introduction / 169
10.2 Related Works / 171
10.3 Reed–Solomon Codes and Linear Algebra Algorithms / 172
10.4 Mapping Reed–Solomon Codes on Cell/B.E. Architecture / 173
10.4.1 Cell/B.E. Architecture / 173
CONTENTS xiii

10.4.2 Basic Assumptions for Mapping / 174


10.4.3 Vectorization Algorithm and Increasing its Efficiency / 175
10.4.4 Performance Results / 177
10.5 Mapping Reed–Solomon Codes on Multicore GPU
Architectures / 178
10.5.1 Parallelization of Reed–Solomon Codes on GPU
Architectures / 178
10.5.2 Organization of GPU Threads / 180
10.6 Methods of Increasing the Algorithm Performance on GPUs / 181
10.6.1 Basic Modifications / 181
10.6.2 Stream Processing / 182
10.6.3 Using Shared Memory / 184
10.7 GPU Performance Evaluation / 185
10.7.1 Experimental Results / 185
10.7.2 Performance Analysis using the Roofline Model / 187
10.8 Conclusions and Future Works / 190
Acknowledgments / 191
References / 191

11. Heterogeneous Parallel Computing Platforms and Tools for


Compute-Intensive Algorithms: A Case Study 193
Daniele D’Agostino, Andrea Clematis, and Emanuele Danovaro
11.1 Introduction / 194
11.2 A Low-Cost Heterogeneous Computing Environment / 196
11.2.1 Adopted Computing Environment / 199
11.3 First Case Study: The N-Body Problem / 200
11.3.1 The Sequential N-Body Algorithm / 201
11.3.2 The Parallel N-Body Algorithm for Multicore
Architectures / 203
11.3.3 The Parallel N-Body Algorithm for CUDA
Architectures / 204
11.4 Second Case Study: The Convolution Algorithm / 206
11.4.1 The Sequential Convolver Algorithm / 206
11.4.2 The Parallel Convolver Algorithm for Multicore
Architectures / 207
11.4.3 The Parallel Convolver Algorithm for GPU
Architectures / 208
xiv CONTENTS

11.5 Conclusions / 211


Acknowledgments / 212
References / 212

12. Efficient Application of Hybrid Parallelism in Electromagnetism


Problems 215
Alejandro Álvarez-Melcón, Fernando D. Quesada, Domingo Giménez,
Carlos Pérez-Alcaraz, José-Ginés Picón, and Tomás Ramírez
12.1 Introduction / 215
12.2 Computation of Green’s functions in Hybrid Systems / 216
12.2.1 Computation in a Heterogeneous Cluster / 217
12.2.2 Experiments / 218
12.3 Parallelization in Numa Systems of a Volume Integral Equation
Technique / 222
12.3.1 Experiments / 222
12.4 Autotuning Parallel Codes / 226
12.4.1 Empirical Autotuning / 227
12.4.2 Modeling the Linear Algebra Routines / 229
12.5 Conclusions and Future Research / 230
Acknowledgments / 231
References / 232

PART V CPU + GPU COPROCESSING 235

13. Design and Optimization of Scientific Applications for Highly


Heterogeneous and Hierarchical HPC Platforms Using Functional
Computation Performance Models 237
David Clarke, Aleksandar Ilic, Alexey Lastovetsky, Vladimir Rychkov,
Leonel Sousa, and Ziming Zhong
13.1 Introduction / 238
13.2 Related Work / 241
13.3 Data Partitioning Based on Functional Performance Model / 243
13.4 Example Application: Heterogeneous Parallel Matrix
Multiplication / 245
13.5 Performance Measurement on CPUs/GPUs System / 247
CONTENTS xv

13.6 Functional Performance Models of Multiple Cores and GPUs / 248


13.7 FPM-Based Data Partitioning on CPUs/GPUs System / 250
13.8 Efficient Building of Functional Performance Models / 251
13.9 FPM-Based Data Partitioning on Hierarchical Platforms / 253
13.10 Conclusion / 257
Acknowledgments / 259
References / 259

14. Efficient Multilevel Load Balancing on Heterogeneous CPU + GPU


Systems 261
Aleksandar Ilic and Leonel Sousa

14.1 Introduction: Heterogeneous CPU + GPU Systems / 262


14.1.1 Open Problems and Specific Contributions / 263
14.2 Background and Related Work / 265
14.2.1 Divisible Load Scheduling in Distributed CPU-Only
Systems / 265
14.2.2 Scheduling in Multicore CPU and Multi-GPU
Environments / 268
14.3 Load Balancing Algorithms for Heterogeneous CPU + GPU
Systems / 269
14.3.1 Multilevel Simultaneous Load Balancing Algorithm / 270
14.3.2 Algorithm for Multi-Installment Processing with
Multidistributions / 273
14.4 Experimental Results / 275
14.4.1 MSLBA Evaluation: Dense Matrix Multiplication Case
Study / 275
14.4.2 AMPMD Evaluation: 2D FFT Case Study / 277
14.5 Conclusions / 279
Acknowledgments / 280
References / 280

15. The All-Pair Shortest-Path Problem in Shared-Memory


Heterogeneous Systems 283
Hector Ortega-Arranz, Yuri Torres, Diego R. Llanos, and Arturo
Gonzalez-Escribano
15.1 Introduction / 283
xvi CONTENTS

15.2 Algorithmic Overview / 285


15.2.1 Graph Theory Notation / 285
15.2.2 Dijkstra’s Algorithm / 286
15.2.3 Parallel Version of Dijkstra’s Algorithm / 287
15.3 CUDA Overview / 287
15.4 Heterogeneous Systems and Load Balancing / 288
15.5 Parallel Solutions to The APSP / 289
15.5.1 GPU Implementation / 289
15.5.2 Heterogeneous Implementation / 290
15.6 Experimental Setup / 291
15.6.1 Methodology / 291
15.6.2 Target Architectures / 292
15.6.3 Input Set Characteristics / 292
15.6.4 Load-Balancing Techniques Evaluated / 292
15.7 Experimental Results / 293
15.7.1 Complete APSP / 293
15.7.2 512-Source-Node-to-All Shortest Path / 295
15.7.3 Experimental Conclusions / 296
15.8 Conclusions / 297
Acknowledgments / 297
References / 297

PART VI EFFICIENT EXPLOITATION OF DISTRIBUTED


SYSTEMS 301

16. Resource Management for HPC on the Cloud 303


Marc E. Frincu and Dana Petcu
16.1 Introduction / 303
16.2 On the Type of Applications for HPC and HPC2 / 305
16.3 HPC on the Cloud / 306
16.3.1 General PaaS Solutions / 306
16.3.2 On-Demand Platforms for HPC / 310
16.4 Scheduling Algorithms for HPC2 / 311
16.5 Toward an Autonomous Scheduling Framework / 312
16.5.1 Autonomous Framework for RMS / 313
CONTENTS xvii

16.5.2 Self-Management / 315


16.5.3 Use Cases / 317
16.6 Conclusions / 319
Acknowledgment / 320
References / 320

17. Resource Discovery in Large-Scale Grid Systems 323


Konstantinos Karaoglanoglou and Helen Karatza

17.1 Introduction and Background / 323


17.1.1 Introduction / 323
17.1.2 Resource Discovery in Grids / 324
17.1.3 Background / 325
17.2 The Semantic Communities Approach / 325
17.2.1 Grid Resource Discovery Using Semantic Communities / 325
17.2.2 Grid Resource Discovery Based on Semantically Linked
Virtual Organizations / 327
17.3 The P2P Approach / 329
17.3.1 On Fully Decentralized Resource Discovery in Grid
Environments Using a P2P Architecture / 329
17.3.2 P2P Protocols for Resource Discovery in the Grid / 330
17.4 The Grid-Routing Transferring Approach / 333
17.4.1 Resource Discovery Based on Matchmaking Routers / 333
17.4.2 Acquiring Knowledge in a Large-Scale Grid System / 335
17.5 Conclusions / 337
Acknowledgment / 338
References / 338

PART VII ENERGY AWARENESS IN HIGH-PERFORMANCE


COMPUTING 341

18. Energy-Aware Approaches for HPC Systems 343


Robert Basmadjian, Georges Da Costa, Ghislain Landry Tsafack Chetsa,
Laurent Lefevre, Ariel Oleksiak, and Jean-Marc Pierson

18.1 Introduction / 344


18.2 Power Consumption of Servers / 345
18.2.1 Server Modeling / 346
xviii CONTENTS

18.2.2 Power Prediction Models / 347


18.3 Classification and Energy Profiles of HPC Applications / 354
18.3.1 Phase Detection / 356
18.3.2 Phase Identification / 358
18.4 Policies and Leverages / 359
18.5 Conclusion / 360
Acknowledgements / 361
References / 361

19. Strategies for Increased Energy Awareness in Cloud Federations 365


Gabor Kecskemeti, Attila Kertesz, Attila Cs. Marosi, and Zsolt Nemeth

19.1 Introduction / 365


19.2 Related Work / 367
19.3 Scenarios / 369
19.3.1 Increased Energy Awareness Across Multiple Data Centers
within a Single Administrative Domain / 369
19.3.2 Energy Considerations in Commercial Cloud
Federations / 372
19.3.3 Reduced Energy Footprint of Academic Cloud
Federations / 374
19.4 Energy-Aware Cloud Federations / 374
19.4.1 Availability of Energy-Consumption-Related
Information / 375
19.4.2 Service Call Scheduling at the Meta-Brokering Level of
FCM / 376
19.4.3 Service Call Scheduling and VM Management at the
Cloud-Brokering Level of FCM / 377
19.5 Conclusions / 379
Acknowledgments / 380
References / 380

20. Enabling Network Security in HPC Systems Using Heterogeneous


CMPs 383
Ozcan Ozturk and Suleyman Tosun

20.1 Introduction / 384


20.2 Related Work / 386
CONTENTS xix

20.3 Overview of Our Approach / 387


20.3.1 Heterogeneous CMP Architecture / 387
20.3.2 Network Security Application Behavior / 388
20.3.3 High-Level View / 389
20.4 Heterogeneous CMP Design for Network Security Processors / 390
20.4.1 Task Assignment / 390
20.4.2 ILP Formulation / 391
20.4.3 Discussion / 393
20.5 Experimental Evaluation / 394
20.5.1 Setup / 394
20.5.2 Results / 395
20.6 Concluding Remarks / 397
Acknowledgments / 397
References / 397

PART VIII APPLICATIONS OF HETEROGENEOUS


HIGH-PERFORMANCE COMPUTING 401

21. Toward a High-Performance Distributed CBIR System for Hyperspectral


Remote Sensing Data: A Case Study in Jungle Computing 403
Timo van Kessel, Niels Drost, Jason Maassen, Henri E. Bal, Frank J. Seinstra,
and Antonio J. Plaza

21.1 Introduction / 404


21.2 CBIR For Hyperspectral Imaging Data / 407
21.2.1 Spectral Unmixing / 407
21.2.2 Proposed CBIR System / 409
21.3 Jungle Computing / 410
21.3.1 Jungle Computing: Requirements / 411
21.4 IBIS and Constellation / 412
21.5 System Design and Implementation / 415
21.5.1 Endmember Extraction / 418
21.5.2 Query Execution / 418
21.5.3 Equi-Kernels / 419
21.5.4 Matchmaking / 420
21.6 Evaluation / 420
21.6.1 Performance Evaluation / 421
xx CONTENTS

21.7 Conclusions / 426


Acknowledgments / 426
References / 426

22. Taking Advantage of Heterogeneous Platforms in Image and Video


Processing 429
Sidi A. Mahmoudi, Erencan Ozkan, Pierre Manneback,
and Suleyman Tosun

22.1 Introduction / 430


22.2 Related Work / 431
22.2.1 Image Processing on GPU / 431
22.2.2 Video Processing on GPU / 432
22.2.3 Contribution / 433
22.3 Parallel Image Processing on GPU / 433
22.3.1 Development Scheme for Image Processing on GPU / 433
22.3.2 GPU Optimization / 434
22.3.3 GPU Implementation of Edge and Corner Detection / 434
22.3.4 Performance Analysis and Evaluation / 434
22.4 Image Processing on Heterogeneous Architectures / 437
22.4.1 Development Scheme for Multiple Image Processing / 437
22.4.2 Task Scheduling within Heterogeneous Architectures / 438
22.4.3 Optimization Within Heterogeneous Architectures / 438
22.5 Video Processing on GPU / 438
22.5.1 Development Scheme for Video Processing on GPU / 439
22.5.2 GPU Optimizations / 440
22.5.3 GPU Implementations / 440
22.5.4 GPU-Based Silhouette Extraction / 440
22.5.5 GPU-Based Optical Flow Estimation / 440
22.5.6 Result Analysis / 443
22.6 Experimental Results / 444
22.6.1 Heterogeneous Computing for Vertebra Segmentation / 444
22.6.2 GPU Computing for Motion Detection Using a Moving
Camera / 445
22.7 Conclusion / 447
Acknowledgment / 448
References / 448
CONTENTS xxi

23. Real-Time Tomographic Reconstruction Through CPU + GPU


Coprocessing 451
José Ignacio Agulleiro, Francisco Vazquez, Ester M. Garzon,
and Jose J. Fernandez

23.1 Introduction / 452


23.2 Tomographic Reconstruction / 453
23.3 Optimization of Tomographic Reconstruction for CPUs and for
GPUs / 455
23.4 Hybrid CPU + GPU Tomographic Reconstruction / 457
23.5 Results / 459
23.6 Discussion and Conclusion / 461
Acknowledgments / 463
References / 463

Index 467
Contributors

Alejandro Álvarez-Melcón, Technical University of Cartagena, Cartagena,


Spain
Hamid Arabnejad, Universidade do Porto, Porto, Portugal
Henri E. Bal, VU University, Amsterdam, The Netherlands
Ranieri Baraglia, National Research Council of Italy, Pisa, Italy
Jorge G. Barbosa, Universidade do Porto, Porto, Portugal
Robert Basmadjian, Passau University, Passau, Germany
Gabriele Capannini, D&IT Chalmers, Göteborg, Sweden
Jesús Carretero, Universidad Carlos III of Madrid, Madrid, Spain
Raimondas Čiegis, Vilnius Gediminas Technical University, Vilnius, Lithuania
David Clarke, University College Dublin, Dublin, Ireland
Andrea Clematis, IMATI CNR, Genoa, Italy
Georges Da Costa, Toulouse University, Toulouse, France
Daniele D’Agostino, IMATI CNR, Genoa, Italy
Emanuele Danovaro, IMATI CNR, Genoa, Italy
Matjaž Depolli, Jožef Stefan Institute, Ljubljana, Slovenia
Kiril Dichev, University College Dublin, Dublin, Ireland
Niels Drost, Netherlands eScience Center, Amsterdam, The Netherlands
Jose J. Fernandez, National Centre for Biotechnology, National Research
Council (CNB-CSIC), Madrid, Spain
Marc E. Frincu, West University of Timisoara, Timisoara, Romania
Javier Garcia, Universidad Carlos III of Madrid, Madrid, Spain
Ester M. Garzon, University of Almería, Almería, Spain
Domingo Giménez, University of Murcia, Murcia, Spain
Arturo Gonzalez-Escribano, Universidad de Valladolid, Valladolid, Spain
Torsten Hoefler, ETH Zürich, Zürich, Switzerland
xxiii
Random documents with unrelated
content Scribd suggests to you:
THE HISTORY

OF THE FISHERMAN.

There was formerly, Sire, a very old fisherman, who was so poor,
that he could barely obtain food for himself, his wife, and three
children, of which his family consisted. He went out very early every
morning to his employment; and he made it an absolute rule that he
would throw his nets only four times a day.

One morning he set out before the moon had disappeared: when
he had got to the sea-shore, he undressed himself, and threw his
nets. In drawing them to land he perceived a considerable resistance;
and began to imagine he should have an excellent haul; at which he
was much pleased. But the moment after, finding that instead of fish
he had got the body of an ass in his nets, he was much vexed and
afflicted at having had so bad a draught. When he had mended his
nets, which the weight of the ass had torn in many places, he threw
them a second time. He again found considerable resistance in
drawing them up, and again he thought they were filled with fish;
how great was his disappointment, in discovering only a large
pannier or basket, filled with sand and mud. “O fortune!” he
exclaimed, in the greatest affliction, and with a melancholy voice,
“cease to be enraged against me. Persecute not an unfortunate being,
who thus supplicates thee to spare him. I came from home to seek
after life, and you announce my death. I have no other trade, by
which I can subsist, and even with all my care, I can hardly supply
the most pressing wants of my family; but I am wrong to complain
of thee, who takest a pleasure in abusing the virtuous, and leaving
great men in obscurity, while thou favorest the wicked, and exaltest
those who possess no virtue to recommend them.”

Having thus vented his complaints, he angrily threw aside the


pannier, and washing his nets from the mud, he threw them a third
time. He brought up only stones, shells, and filth. It is impossible to
describe his despair, which almost deprived him of his senses. The
day now began to break, and like a good mussulman, he did not
neglect his prayers, to which he added the following: “Thou
knowest, O Lord, that I throw my nets only four times a day; three
times have I cast them into the sea, without any profit for my labour.
Once more alone remains; and I entreat thee to render the sea
favourable, as thou formerly didst to Moses.”

When the fisherman had finished this prayer, he threw his nets for
the fourth time. Again he supposed he had caught a great quantity
of fish, as he drew them with as much difficulty as before. He
nevertheless found none; but discovered a vase of yellow copper,
which seemed, from its weight, to be filled with something; and he
observed that it was shut up and fastened with lead, on which there
was the impression of a seal. “I will sell this to a founder,” said he
with joy, “and with the money I shall get for it, I will purchase a
measure of corn.”

He had examined the vase on all sides; he shook it, in order to


discover whether its contents would rattle. He could hear nothing;
and this, together with the impression of the seal on the lead, made
him think it was filled with something valuable. In order to find this
out, he took his knife, and got it open without much difficulty. He
directly turned the top downwards, and was much surprised to find
nothing come out: he set it down before him, and while he was
attentively observing it, there issued from it so thick a smoke, that he
was obliged to step back a few paces. This smoke, by degrees, rose
almost to the clouds, and spread itself over both the water and the
shore, appearing like a thick fog. The fisherman, as may easily be
imagined, was a good deal surprised at this sight. When the smoke
had all come out from the vase, it again collected itself, and became a
solid body, and then took the shape of a Genius, twice as large as
any of the giants. At the appearance of so enormous a monster, the
fisherman wished to run away, but his fears were so great, he was
unable to move.

“Solomon, Solomon,” cried the Genius, “great prophet of God,


pardon, I pray. I will never more oppose your will; but will obey all
your commands.”

The fisherman, Sire, had no sooner heard these words spoken by


the Genius, than he regained his courage, and said, “Proud spirit,
what is this you say? Solomon the prophet of the most High has
been dead more than eighteen hundred years. Inform me, I pray, of
your history, and on what account you were shut up in this vase?”

To this speech the Genius, looking disdainfully at the fisherman,


answered, “Speak more civilly; thou art very bold to call me a proud
spirit.”—“Perhaps then,” returned the fisherman, “it will be more
civil to call you an owl of good luck.”—“I tell thee,” said the Genius,
“speak to me more civilly, before I kill thee.”—“And for what
reason, pray, will you kill me?” answered the fisherman, “Have you
already forgotten, that I have set you at liberty?”—“I remember it
very well,” returned he, “but that shall not prevent my destroying
thee, and I will only grant thee one favour.”—“And pray what is
that?” said the fisherman.—“It is,” replied the Genius, “to permit
thee to choose the manner of thy death.”—“But in what” added the
other, “have I offended you? Is it thus you wish to recompense me
for the good I have done you?”—“I can treat thee no otherwise,”
said the Genius, “and, to convince thee of it, attend to my history.

“I am one of those spirits who rebelled against the sovereignty of


God. All the other Genii acknowledged the great Solomon, the
prophet of God, and submitted to him. Sacar and myself were the
only ones who were above humbling ourselves. In order to revenge
himself, this powerful monarch charged Assaf, the son of Barakhia,
his first minister, to come and seize me. This was done; and Assaf
took and brought me, in spite of myself, before the throne of the
king, his master.

“Solomon, the son of David, commanded me to quit my mode of


life, acknowledge his authority, and submit to his laws. I haughtily
refused to obey him; and rather exposed myself to his resentment,
than take the oath of fidelity and submission, which he required of
me. In order, therefore, to punish me, he enclosed me in this copper
vase; and to prevent my forcing my way out, he put upon the leaden
cover the impression of his seal, on which the great name of God is
engraven. This done, he gave the vase to one of those Genii who
obeyed him, and ordered him to throw me into the sea; which, to my
great sorrow, was performed directly.

“During the first period of my captivity, I swore, that if any one


delivered me before the first hundred years were passed, I would
make him rich even after his death. The time elapsed, and no one
assisted me: during the second century I swore, that if any released
me, I would discover to him all the treasures of the earth; still I was
not more fortunate. During the third, I promised to make my
deliverer a most powerful monarch, to be always hovering near him,
and to grant him every day any three requests he chose. This age
too, like the former, passed away, and I remained in the same
situation. Enraged, at last, to be so long a prisoner, I swore, that I
would without mercy kill whoever should in future release me, and
the only favour I would grant him, should be to choose what
manner of death he pleased. Since, therefore, thou hast come here to-
day, and hast delivered me, fix upon whatever kind of death thou
wilt.”

The fisherman was much afflicted at this speech. “How


unfortunate,” he exclaimed, “am I, to come here and render so great
a service to such an ungrateful object! Consider, I entreat you, of
your injustice; and revoke so unreasonable an oath. Pardon me, and
God will in like manner pardon you. If you generously suffer me to
live, he will defend you from all attempts that may be made against
your life.”—“No,” answered the Genius, “thy death is sure;
determine only how I shall kill thee.”—The fisherman was in great
distress, and finding him thus resolved on his death, not so much on
his own account as on that of his three children, whose wretched
state they greatly deplored, when they would be reduced by his
death. He still endeavoured to appease the Genius. “Alas!” he cried,
“have pity on me, in consideration of what I have done for you.”—“I
have already told thee,” replied the Genius, “that it is for that very
reason that I am obliged to take thy life.”—“It is very strange,”
added the fisherman, “that you are determined to return evil for
good. The proverb says, that he who does good to him that does not
deserve it, is always ill rewarded. I did think, I own, that it was false,
because nothing is more contrary to reason, and the rights of society:
yet I cruelly find it too true.”—“Let us lose no time,” cried the
Genius, “your arguments will not alter my resolution. Make haste,
and tell me how you wish to die.”

Necessity is the spur to invention; and the fisherman thought of a


stratagem. “Since then,” said he, “I cannot escape death, I submit to
the will of God; but before I choose the sort of death, I conjure you,
by the great name of God, which is graven upon the seal of the
prophet Solomon, the son of David, answer me truly to a question I
am going to put to you.” When the Genius found that he should be
compelled to answer positively, he trembled, and said to the
fisherman, “Ask what thou wilt, and make haste.”

The Genius had no sooner promised to speak the truth, than the
fisherman said to him, “I wish to know whether you really were in
that vase; dare you swear it by the great name of God?”—“Yes,”
answered the Genius, “I do swear by the great name of God, that I
most certainly was.”—“In truth,” replied the fisherman, “I cannot
believe you. This vase cannot contain one of your feet; how then can
it hold your whole body?”—“I swear to thee, notwithstanding,”
replied he, “that I was there just as thou seest me. Wilt thou not
believe me after the solemn oath I have taken?”—“No truly,” added
the fisherman, “I shall not believe you, unless I were to see it.”

Immediately the form of the Genius began to change into smoke,


and extended itself as before over both the shore and the sea; and
then, collecting itself, began to enter the vase, and continued to do so
in a slow and equal manner, till nothing remained without. A voice
immediately issued forth, saying, “Now then, thou credulous
fisherman, dost thou believe me now I am in the vase?” But instead
of answering the Genius, he immediately took the leaden cover, and
put it on the vase. “Genius,” he cried, “it is now your turn to ask
pardon, and choose what sort of death is most agreeable to you. But
no, it is better that I should throw you again into the sea, and I will
build on the very spot where you are cast, a house upon the shore, in
which I will live, to warn all fishermen that shall come and throw
their nets, not to fish up so wicked a Genius as you are, who make
an oath to kill him who shall set you at liberty.”

At this offensive speech the enraged Genius tried every method to


get out of the vase, but in vain; for the impression of the seal of
Solomon, the prophet, the Son of David, prevented him. Knowing,
then, that the fisherman had the advantage over him, he began to
conceal his rage. “Take care,” said he, in a softened tone, “what you
are about, fisherman. Whatever I did was merely in joke, and you
ought not to take it seriously.”—“O Genius,” answered the
fisherman, “you, who were a moment ago the greatest of all the
Genii, are now the most insignificant; and do not suppose that your
flattering speeches will be of any use to you. You shall assurely
return to the sea: and if you passed all the time there you said, you
may as well remain till the day of judgment. I entreated you in the
name of God not to take my life, and you rejected my prayers; I
ought to reject yours likewise.
The Genius tried every argument to move the fisherman’s pity, but
in vain. “I conjure you to open the vase,” said be; “if you give me my
liberty again, you shall have reason to be satisfied with my
gratitude.”—“You are too treacherous for me to trust you,” returned
the fisherman: “I should deserve to lose my life, if I had the
imprudence to put it in your power a second time. You would most
likely treat me as a Greek king treated Douban, the physician. Listen,
and I will tell you the story.
THE HISTORY

OF THE GREEK KING AND DOUBAN THE PHYSICIAN.

In the country of Zouman, in Persia, there lived a king, whose


subjects were originally Greeks. This king was sorely afflicted with a
leprosy, and his physicians had unsuccessfully tried every remedy
they were acquainted with, when a very ingenious physician, called
Douban, arrived at the court.

He had acquired his profound learning by studying different


authors in the Greek, Latin, Persian, Arabic, Turkish, Syriac, and
Hebrew languages; and besides having a consummate knowledge of
philosophy, he was also well acquainted with the good and bad
properties of all kinds of plants and drugs.

As soon as he was informed of the king’s illness, and that the


physicians had given him up, he dressed himself as neatly as
possible, and obtained permission to be presented to the king.
“Sire,” said he, “I know that all the physicians who have attended
your majesty, have been unable to remove your leprosy; but, if you
will do me the honour to accept of my services, I will engage to cure
you without either internal or topical applications.” The king,
pleased with this proposition, replied, “If you are really so skilful as
you pretend, I promise to confer affluence on you and your
posterity; and without reckoning the presents you will have, you
shall be my first favourite; but do you assure me then, that you will
remove my leprosy without making me swallow any potion or
applying any remedy externally?”—“Yes, Sire,” replied the
physician, “I flatter myself I shall succeed, with the help of God; and
to-morrow I will begin my operations.”
Douban returned to his house, and made a sort of racket or bat,
with a hollow in the handle to admit the drug he meant to use; that
being done, he also prepared a sort of round ball, or bowl, in the
manner he intended, and the following day he presented himself
before the king, and prostrating himself at his feet, kissed the
ground.

Douban then arose, and having made a profound reverence, told


the king that he must ride on horseback to the place where he was
accustomed to play at bowls. The king did as he was desired, and
when he had reached the bowling-green, the physician approached
him, and putting into his hand the bat which he had prepared,
“Sire,” said he, “exercise yourself with striking that bowl about with
this bat, till you find yourself in a profuse perspiration. When the
remedy I have enclosed in its handle is warmed by your hand, it will
penetrate through your whole body; you may then leave off, for the
drug will have taken effect; and when you return to your palace get
into a warm bath, and be well rubbed and washed, then go to bed,
and to-morrow you will be quite cured.

The king took the bat, and spurred his horse after the bowl till he
struck it; it was sent back again to him by the officers who were
playing with him, and he struck it again; and thus the game
continued for a considerable time, till he found his hand as well as
his whole body in a perspiration, which made the remedy in the bat
operate as the physician had said; the king then left the game,
returned to the palace, bathed, and observed very punctually all the
directions that had been given him.

He soon found the good effects of the prescription; for when he


arose the next morning, he perceived, with equal surprise and joy,
that his leprosy was entirely cured, and that his body was as clear as
if he had never been attacked by that malady. As soon as he was
dressed, he went into the audience-room, where he mounted his
throne and received the congratulations of all his courtiers who had
assembled on that day, partly to gratify their curiosity and partly to
testify their joy.

Douban entered, and went to prostrate himself at the foot of the


throne, with his face towards the ground. The king seeing him,
called to him, and made him sit by his side; and shewing him to the
assembly, gave him in that public way all the praise he so well
deserved; nay, he did not stop here, for there being a grand
entertainment at court on that day, he placed him at his own table to
dine only with him.

The Greek king, (proceeded the fisherman,) was not satisfied with
admitting the physician to his own table; towards evening, when the
courtiers were about to depart, he put him on a long rich robe
resembling that which the courtiers usually wore in his presence,
and in addition, made him a present of two thousand sequins. The
following days he did nothing but caress him; in short, this prince,
thinking he could never repay the obligations he owed to so skilful a
physician, was continually conferring on him some fresh proof of his
gratitude.

The king had a grand vizier, who was avaricious, envious, and by
nature capable of every species of crime. He observed, not without
pain, the presents which had been bestowed upon the physician,
whose great character and merit he was determined to lessen and
destroy in the mind of the king. To accomplish this, he went to him,
and said in private, that he had some intelligence of the greatest
moment to communicate. The king asked him what it was. “Sire,”
replied he, “it is very dangerous for a monarch to place any
confidence in a man, of whose fidelity he is not assured. In
overwhelming the physician Douban with your favors, and
bestowing all this kindness and regard upon him, you are ignorant
that he is a traitor, who has introduced himself to the court, in order
to assassinate you.”—“What is this you dare tell me?” answered the
king, “Recollect to whom you speak, and that you advance an
assertion which I shall not easily give credit to.”—“Sire,” added the
vizier, “I am accurately informed of what I have the honor to
represent to you; do not, therefore, continue to repose such a
dangerous confidence in him. If your majesty is, as it were, in a
dream, it is time to awake; for I again repeat, that the physician
Douban has not travelled from the farther part of Greece, his own
country, but for the horrible design I have mentioned.”

“No, no, vizier,” interrupted the king, “I am sure this man, whom
you consider as an hypocrite and traitor, is one of the most virtuous
and best of men; there is no one in the world whom I regard so
much. You know by what remedy, or rather by what miracle, he
cured me of my leprosy; and if he had sought my life, why did he
thus save it. Cease then from endeavouring to instil unjust
suspicions, for instead of listening to them, I now inform you, that
from this very day I bestow upon him a pension of one thousand
sequins a month, for the rest of his life. And were I to share all my
riches, and even my kingdoms with him, I could never sufficiently
repay what he has done for me. I see what it is; his virtue excites
your envy; but do not suppose that I shall suffer myself to be
prejudiced against him unjustly. I well remember what a vizier said
to king Sindbad, his master, to prevent his giving orders for the
death of his son.”

This very much excited the curiosity of the vizier. “I beg your
majesty will pardon me, if I have the boldness to ask you what it was
that the vizier of king Sindbad said to his master, in order to avert
the death of his son.” The Greek king had the complaisance to satisfy
him. “This vizier,” added he, “after having represented to king
Sindbad, that he ought to hesitate to do a thing which was founded
on the suggestion of a mother-in-law, for fear she should repent,
related the following story.”
THE HISTORY

OF THE HUSBAND AND THE PARROT.

There lived once a good man who had a beautiful wife, of whom
he was so passionately fond, that he could scarcely bear to have her
out of his sight. One day when some particular business obliged him
to leave her, he went to a place where they sold all sorts of birds; he
purchased a parrot, which was not only highly accomplished in the
art of talking, but also possessed the rare gift of telling every thing
that was done in its presence. The husband took it home in a cage to
his wife, and begged of her to keep it in her chamber, and take great
care of it during his absence; after this he set out on his journey.

On his return he did not fail to interrogate the parrot on what had
passed while he was away; and the bird very expertly related a few
circumstances, which occasioned the husband to reprimand his wife.
She supposed that some of her slaves had exposed her, but they all
assured her they were faithful, and agreed in charging the parrot
with the crime. Desirous of being convinced of the truth of this
matter, the wife devised a method of quieting the suspicions of her
husband, and at the same time of revenging herself on the parrot, if
he were the culprit. The next time the husband was absent, she
ordered one of her slaves, during the night, to turn a handmill under
the bird’s cage, and another to throw water over it like rain, and a
third to wave a looking-glass before the parrot by the light of a
candle. The slaves were employed the greatest part of the night in
doing what their mistress had ordered them, and succeeded to her
satisfaction.

The following day, when the husband returned, he again applied


to the parrot to be informed of what had taken place. The bird
replied, “My dear master, the lightning, the thunder, and the rain,
have so disturbed me the whole night, that I cannot tell you how
much I have suffered.” The husband, who knew there had been no
storm that night, became convinced that the parrot did not always
relate facts; and that having told an untruth in this particular, he had
also deceived him with respect to his wife: being therefore extremely
enraged with it, he took the bird out of the cage, and dashing it on
the floor, killed it: he, however, afterwards learnt from his
neighbours, that the poor parrot had told no story of the conduct of
his wife, which made him repent of having destroyed it.

“When the Greek king,” said the fisherman to the Genius, “had
finished the story of the parrot, he added, “You, vizier, through envy
of Douban, who has done you no evil, wish me to order his death,
but I will take good care, lest, like the husband who killed his parrot,
I should afterwards repent.”

The vizier was too desirous of the death of Douban to let it rest
here. “Sire,” replied he, “the loss of the parrot was of little
importance, nor do I think his master could long have regretted it.
But on what account should the dread of oppressing the innocent
prevent you from destroying this physician. Is it not a sufficient
reason that he is accused of attempting your life to authorise you to
take away his? When the life of a king is in question, a bare
suspicion ought to be equal to a certainty; and it is better to sacrifice
the innocent than save the guilty. But this, Sire, by no means rests on
an uncertainty. The physician Douban positively wishes to
assassinate you. It is not envy that makes me hostile to him, it is the
interest alone that I take in your majesty’s preservation; it is my zeal,
which induces me to give my advice on so important an occasion. If
my information is false, I deserve the same punishment that a certain
vizier underwent formerly.”—“What had that vizier done, worthy of
chastisement?” said the Greek king.—“I will tell your majesty,”
answered the vizier, “if you will have the goodness to listen.”
THE HISTORY

OF THE VIZIER, WHO WAS PUNISHED.

There was formerly a king, whose son was passionately fond of


hunting. His father, therefore, often indulged him in this diversion;
but at the same time gave positive orders to his grand vizier always
to accompany, and never lose sight of him.

One hunting morning, the prickers roused a stag, and the prince
set off in pursuit, thinking the vizier followed him. He galloped so
long, and his eagerness carried him so far, that he at last found
himself quite alone. He immediately stopped, and observing that he
had lost his way, he endeavoured to return back by the same, in
order to join the vizier, who had not been sufficiently attentive in
following him. He was, however, unable to find it; and riding about
on all sides, without getting into the right track, he by chance met a
lady, not ill made, who was weeping most bitterly. The prince
immediately checked his horse, and inquired of her who she was,
what she did alone in that place, and whether he could assist her. “I
am,” she answered, “the daughter of an Indian king. In riding out
into the country, I was overcome with sleep, and fell from my horse.
He has run away, and I know not what has become of him.” The
young prince was sorry for her misfortune, and proposed to take her
up behind him, which she accepted.

As they passed by an old ruined building, the lady made some


excuse to alight; the prince therefore stopped, and suffered her to get
down. He also alighted, and walked towards the building, holding
his horse by the bridle. Imagine then what was his astonishment,
when he heard the female pronounce these words from within the
walls, “Rejoice, my children, I have brought you a very nice fat youth.”
And directly afterwards other voices answered, “Where is he mama?
Let us eat him instantly, for we are very hungry.”

The prince had heard enough to convince him of the danger he


was in: he plainly perceived, that she, who represented herself as the
daughter of an Indian king, was no other than the wife of one of
those savage demons, called Ogres, who live in desert places, and
make use of a thousand wiles to surprise and devour the
unfortunate passengers. He trembled with fear, and instantly
mounted his horse.

The pretended princess at that moment made her appearance, and


finding she had failed in her scheme, “Do not be afraid,” she cried,
“but tell me who you are, and what you are looking for?”—“I have
lost my way,” he replied, “and am endeavouring to find it.”—“If
you are lost,” she said, “recommend yourself to God, and he will
deliver you from your difficulty.”

The young prince could not believe that she spoke sincerely, but
that she considered him as already within her power; he lifted up his
hands therefore towards Heaven, and said, “Cast thine eyes upon
me, O all powerful Lord, and deliver me from this mine enemy!” At
this prayer, the Ogre went back to the ruin, and the prince rode off
as fast as possible. He fortunately discovered the right road, and
arrived safely at home, and related to his father, word for word, the
great danger he had encountered, through the neglect of the grand
vizier. The king was so enraged at him, that he ordered this minister
to be instantly strangled.

“Sire,” continued the vizier of the Greek king, “to return to the
physician Douban; if you do not take care, the confidence you place
in him will turn out unfortunate. I well know, that he is a spy, sent
by your enemies to attempt your majesty’s life. He has cured you,
you say, but who can tell that? He has perhaps only cured you in
appearance, and not radically; and who can tell, whether this
remedy, in the end, will not produce the most pernicious effects?”

The Greek king was naturally rather weak, and had not
penetration enough to discover the wicked intention of his vizier,
nor sufficient firmness to persist in his first opinion. This
conversation staggered him. “You are right, vizier,” said he, “he may
be come for the express purpose of taking my life, which he can
easily accomplish, even by the mere smell of some of his drugs. We
must consider what is to be done in this conjuncture!”

When the vizier perceived the king in the disposition be wished,


he said to him, “The best and most certain means, Sire, to ensure
your repose, and put your person in safety, is instantly to send to
Douban, and on his appearance, order him to be
beheaded.”—“Indeed,” replied the king, “I think I ought to prevent
his designs.”—Having said this, he called one of his officers, and
ordered him to find the physician, who, without knowing what the
king wished, hastened to the palace.

“Knowest thou,” said the king, as soon as he saw him, “why I sent
for thee here?”—“No, Sire,” answered Douban, “and I wait till your
majesty pleases to instruct me.”—“I have ordered thee to come,”
replied the king, “to free myself from thy snares, by taking thy life.”

It is impossible to express the astonishment of Douban, at hearing


the sentence of his death. “For what reason, Sire,” replied he, “does
your majesty condemn me to death? What crime have I been guilty
of?”—“I have been well informed,” added the king, “that you are a
spy, and that you have come to my court in order to take away my
life; but to prevent that, I will first deprive you of yours. Strike,”
added he to an officer who was by, “and deliver me from a
treacherous wretch who has introduced himself here only to
assassinate me.”
At hearing this, the physician began to think, that the honours and
riches which had been heaped upon him, had excited some enemies
against him, and that the king, through weakness, had suffered
himself to be guided by them, nor was he wrong. He began to repent
having cured him; but that came too late. “Is it thus,” he cried, “that
you recompense the good I have done you?”—The king, however,
paid no attention, and desired the officer, a second time, to execute
his orders. The physician had then recourse to prayers. “Ah, Sire,”
he cried, “if you prolong my life, God will prolong yours; do not kill
me, lest God should treat you in the same manner.”

“You see then,” said the fisherman, breaking off his story in this
place, and addressing himself to the Genius, “that what has passed
between the Greek king and the physician Douban is exactly the
same as what has happened between us.

“The Greek king, however,” continued he, “instead of regarding


the entreaties the physician urged in conjuring him, in the name of
God, to relent, exclaimed, “No, no, you must die, or you will take
away my life in a still more concealed manner than you have cured
me.” Douban, in the mean time, bathed in tears, complained much at
finding his important services so ill requited; and at last prepared for
death. The officer then put a bandage over his eyes, tied his hands,
and was going to draw his scimitar. The courtiers, however, who
were present, felt so much for him, that they entreated the king to
pardon him, assuring his majesty he was not guilty, and that they
would answer for his innocence. But the king was inflexible, and
spoke so peremptorily, they dared not reply.

The physician being on his knees, his eyes bandaged, and ready to
receive the stroke that was to terminate his existence, once more
addressed the king; “Since your majesty, Sire, wishes not to revoke
the order for my death, I entreat you at least to give me leave to
return home, to arrange my funeral, take a last farewell of my
family, bestow some charity, and leave my books to those who will
know how to make a good use of them. There is one among them
which I wish to make a present to your majesty. It is a very rare and
curious work, and worthy of being kept even in your treasury with
the greatest care.”—“What book can there be,” replied the king, “so
valuable as you mention?”—“Sire,” answered the physician, “it
contains things of the most curious nature, and one of the principal
is, that, when my head shall be cut off, if your majesty will take the
trouble to open the book at the sixth leaf, and read the third line on
the left-hand page, my head will answer every question you wish to
ask.” The king was so desirous of seeing such a wonderful thing,
that he put off his death till the next day, and sent him home under a
strong guard.

The physician then arranged all his affairs, and as the news got
abroad that an unheard-of prodigy was to happen after his
execution, the viziers, emirs, officers of the guard, in short all the
court, flocked the next day to the hall of audience, to witness such an
extraordinary event.

Douban, the physician, appeared directly after, and advanced to


the foot of the throne with a very large volume in his hand. He then
placed it on a vase, and unfolded the cover in which the book was
wrapt; and in presenting it, he thus addressed the king: “If it be your
pleasure, Sire, receive this book; and as soon as my head shall be
struck off, order one of your officers to place it on the vase upon the
cover of the book; as soon as it is there the blood will cease to flow;
then open the book, and my head shall answer all your questions.
But, Sire,” added Douban, “permit me once more to implore your
mercy. Consider, I beg of you, in the name of God, that I protest to
you that I am innocent.”—“Thy prayers,” answered the king, “are
useless, and were it only to hear your head speak after your death, I
would wish for your execution.” In saying this; he took the book
from the hands of the physician, and ordered the officer to do his
duty.
The head was so adroitly cut off, that it fell into the vase, and it
had hardly been on the cover an instant before the blood stopt. Then,
to the astonishment of the king and all the spectators, it opened its
eyes, and said, “Will your majesty now open the book?” The king
did so, and finding that the leaf stuck to the second, he put his finger
to his mouth, and moistened it, in order to turn it over more easily.
He went on doing so till he came to the sixth leaf; and observing
nothing written upon the appointed page, “Physician,” said he to the
head, “there is no writing.”—“Turn over then a few more leaves,”
replied the head. The king continued turning them over, still putting
his finger frequently to his mouth, till the poison, in which each leaf
had been dipped, began to produce its effect. The prince then felt
himself suddenly agitated in a most extraordinary manner; his sight
failed him, and he fell at the foot of the throne in the greatest
convulsions.

When the physician Douban, or rather his head, saw that the
poison had taken effect, and that the king had only a few moments
to live, “Tyrant,” he exclaimed, “behold how those princes are
treated, who abuse their power, and sacrifice the innocent. God,
sooner or later, punishes their injustice and their cruelty.” The head
had no sooner repeated those words, than the king expired; and at
the same time the small portion of life that remained in the head
itself, was wasted.

“Such, Sire,” continued Scheherazadè, “was the end of the Greek


king and the physician Douban. I shall now return to the fisherman
and the Genius.

As soon as the fisherman had finished the history of the Greek


king and the physician Douban, he applied it to the Genius, whom
he still kept confined in the vase. “If,” said he, “the Greek king had
permitted Douban to live, God would also have bestowed the same
benefit on him: but he rejected the humble prayers of the physician.
God, therefore, punished him. This, O Genius, is the case with you.
If I had been able to make you relent, and could have obtained the
favor I asked of you, I should have pitied the state in which you now
are: but since you persisted in your determination to kill me, in spite
of the obligation you were under to me for setting you at liberty, I
ought, in my turn, to shew no mercy. In leaving you within this
vase, and casting you into the sea, I shall deprive you of the use of
your existence till the end of time. This is the revenge I have been
taught by you.”

“Once more, my good friend,” replied the Genius, “I entreat you


not to be guilty of so cruel an act; remember that revenge is not a
part of virtue; on the contrary, it is praise-worthy to return good for
evil. Do not then serve me as Imma formerly treated Ateca.”—“And
how was that?” asked the fisherman. “If you wish to be informed of
it, open this vase,” answered the Genius, “do you think that I am in
the humour, while confined in this narrow prison, to relate stories? I
will tell you as many as you please when you shall have let me
out.”—“No, no,” said the fisherman, “I will not release you; it is
better for me to cast you to the bottom of the sea.”—“One word
more, fisherman,” cried the Genius: “I will teach you how to become
as rich as possible.”

The hope of being no longer in want at once disarmed the


fisherman. “I would listen to you,” he cried, “if I had the least
ground to believe you; swear to me, by the great name of God, that
you will faithfully observe what you say, and I will open the vase. I
do not believe that you will be sufficiently bold to violate such an
oath.” The Genius did so; and the fisherman immediately took off
the covering. The smoke instantly issued from it, and the first thing
the Genius did, after he had reassumed his usual form, was to kick
the vase into the sea: this action rather alarmed the fisherman.
“What do you mean, O Genius, by this; do you not intend to keep
the oath you have taken? Or must I address the same words to you
which the physician Douban did to the Greek king? “Suffer me to live,
and God will prolong your days.”

The fear expressed by him made the Genius laugh; “Be of good
heart, fisherman,” answered he, “I have thrown the vase into the sea
only for diversion, and to see whether you would be alarmed: but to
shew you that I intend to keep my word, take your nets and follow
me.” They passed by the city and went over the top of a mountain,
from whence they descended into a vast plain, which led them to a
pond situated between four small hills.

When they were arrived on the borders of the pond, the Genius
said to the fisherman, “Throw your nets, and catch fish.” The
fisherman did not doubt that he should take some, for he saw a great
quantity in the pond; but how great was his surprise at finding them
of four different colours; white, red, blue, and yellow. He threw his
nets and caught four, one of each colour. As he had never seen any
similar to them, he could hardly cease admiring them, and judging
that he could dispose of them for a considerable sum, he expressed
great joy. “Carry these fish to the palace,” said the Genius, “and
present them to the sultan, and he will give you more money than
you ever handled in all your life. You may come every day and fish
in this pond, but observe and throw your nets only once each day; if
you act otherwise, some evil will befal you, therefore take care. This
is my advice, and if you follow it exactly you will do well.” Having
said this, he struck his foot against the ground, which opened, and
having sunk into it, the earth closed as before.

The fisherman resolved to observe the advice and instructions of


the Genius in every point, and take care never to throw his nets a
second time. He went back to the town very well satisfied with his
success, and making a thousand reflections on his adventure. He
went directly, and presented his fish at the sultan’s palace.
I leave it to your majesty to imagine how much the sultan was
surprised, when he saw the four fish brought him by the fisherman.
He took them one by one, and observed them most attentively; and
after admiring them a long time, he said to his first vizier, “Take
these fish, and carry them to that excellent cook, which the emperor
of the Greeks sent me; I think they must be equally good as they are
beautiful.”

The vizier took them, and delivered them himself into the hands of
the cook. “Here are four fish,” said he, “which have been presented
to the sultan; he commands you to dress them.” He then returned to
the sultan, his master, who desired him to give the fisherman four
hundred pieces of gold, which he faithfully executed. The fisherman,
who was never before in possession of so large a sum of money at
once, could not conceal his joy; and thought it all a dream. He soon,
however, proved it to be a reality, by the good purpose to which he
applied the gold, in relieving the wants of his family.

“We must now, Sire (continued Scheherazadè) give some account


of what passed in the sultan’s kitchen, which we shall find in great
confusion and difficulty. As soon as the cook had cleaned the fish
which the vizier had brought, she put them in a vessel with some oil
over the fire to fry. When she thought they were sufficiently done on
one side, she turned them. She had hardly done so, when, wonderful
to relate, the wall of the kitchen appeared to separate, and a
beautiful and majestic young damsel came out of the opening. She
was dressed in a satin robe, embroidered with flowers after the
Egyptian manner, and adorned with ear-rings and a necklace of
large pearls, and gold bracelets, set with rubies; she held a rod of
myrtle in her hand. Approaching the vessel, to the great
astonishment of the cook, who remained motionless at the sight, and
striking one of the fish with her rod, she said, “Fish, fish, art thou
doing thy duty?” The fish answering not a word; she again repeated
it, when the four fish all raised themselves up, and said very
distinctly, “Yes, yes, if you reckon, we reckon; if you pay your debts,
we pay ours; if you fly, we conquer, and are content.” As soon as
they had spoken these words, the damsel overturned the vessel, and
went back through the wall, which immediately closed up, and was
in the same state as before.

The cook, whom all these wonders alarmed, having in some


measure recovered from her fright, went to take up the fish which
had fallen upon the hot ashes; but she found them blacker and more
burnt than the coals themselves, and not at all in a state to send to
the sultan. At this she was greatly distressed, and began to cry with
all her might. “Alas,” said she, “what will become of me? I am sure,
when I relate to the sultan what I have seen, that he won’t believe
me. How enraged also will he be with me!”

While she was in this distress, the grand vizier entered, and asked
if the fish were ready. The cook then related all that had taken place,
at which, as we may naturally suppose, he was much astonished: but
without telling the sultan any thing about it, he invented some
excuse, which satisfied him. He then sent directly for the fisherman;
to whom, when he was come, he said, “Bring me four more fish, like
those you brought before, for an accident has happened, which
prevents their being served up to the sultan.” The fisherman did not
tell him what the Genius had strictly advised him to do; but pleaded
the length of the way as an excuse for not being able to procure any
more that day; he promised, however, to bring them the next
morning.

The fisherman, in order to be in time, set out before it was day, and
went to the pond. He threw his nets, and drawing them out, found
four more fish, like those he had taken the day before, each of a
different colour. He returned directly, and brought them to the
grand vizier by the time he had promised. The minister took them,
and carried them into the kitchen, where he shut himself up with
only the cook, who prepared to dress them before him. She put them
on the fire as she had done the others on the preceding day. When
they were dressed on one side, she turned them, and immediately
the wall of the kitchen opened, and the same damsel appeared, with
her myrtle in her hand. She approached the vessel in which the fish
were, and striking one of them, addressed the same words to it she
had before done; when they all raising their heads, made the same
answer. The damsel overturned the vessel with her rod, as she had
done before, and went back through the opening in the wall, where
she had entered. The grand vizier witnessed all that passed, “This is
very surprising,” he cried, “and too extraordinary to be kept secret
from the sultan’s ears. I will myself go and inform him of this
prodigy.” He immediately, therefore, went, and gave an exact
relation of all that had passed.

The sultan was much astonished, and became very anxious to see
this wonder. For this purpose; he again sent for the fisherman,
“Friend,” said he to him, when he came, “canst thou not bring me
four more fish of different colours?”—“If your majesty,” answered
the fisherman, “will grant me three days, I can promise to do so.” He
obtained the time he wished, and went again, for the third time, to
the pond. He was not less successful than before, and he caught four
fish, of different colours, the first time he threw his nets. He
neglected not to carry them directly to the sultan, who expressed the
greater pleasure at seeing them, as he did not expect them so soon;
and he ordered four hundred pieces of money to be given to the
fisherman.

As soon as the sultan had got the fish, he had them taken into his
own cabinet, together with the different things that were necessary
to dress them. Here he shut himself up with the grand vizier, who
began to cook them, and put them on the fire in a proper vessel. As
soon as they were done on one side, he turned them on the other.
The wall of the cabinet immediately opened; but instead of the
beautiful damsel, there appeared a black, who was in the habit of a
slave. This black was very large and gigantic, and held a large green
rod in his hand. He advanced to the vessel, and touching one of the
fish with his rod, he cried out in a terrible tone, “Fish, fish, art thou
doing thy duty?” At these words, the fish lifted up their heads and
answered, “Yes, yes, we are, if you reckon, we reckon; if you pay
your debts, we pay ours; if you fly, we conquer, and are content.”
The fish had scarcely said this, when the black overturned the vessel
into the middle of the cabinet, and reduced the fish to the state of
cinders. Having done so, he haughtily retired through the opening
of the wall, which instantly closed, and appeared as perfect as
before.

“After what I have seen,” said the sultan to his grand vizier, “it is
in vain for me to think of remaining at ease. It is certain, that these
fish signify something very extraordinary, which I wish to discover.”
He sent for the fisherman, and when he arrived, he said to him, “The
fish thou hast brought me have caused me great uneasiness; where
dost thou catch them?”—“I caught them, Sire,” answered he, “in a
pond, which is situated in the midst of four small hills, beyond the
mountain you may see from hence.”—“Do you know that pond?”
said the sultan to the vizier.—“No Sire,” answered he, “I have never
even heard it mentioned, though I have hunted in the vicinity of the
mountain, and beyond it, near sixty years.”—The sultan asked the
fisherman about what distance the pond was from the palace; he
replied, that it was not more than three hours journey. With this
assurance, as there was still time to arrive there before night, the
sultan ordered his whole court to get ready, while the fisherman
served as a guide.

They all ascended the mountain, and in going down on the other
side, they were much surprised by the appearance of a large plain,
which no one had ever before remarked. They at length arrived at
the pond, which they found situated exactly among four hills, as the
fisherman had reported. Its water was so transparent, that they
remarked all the fish to be of the same colours as those the fisherman
had brought to the palace.

The sultan halted on the side of the pond; and after observing the
fish with signs of great admiration, he inquired of his emirs, and all
his courtiers, if it could be possible, that they had never seen this
pond, which was so close to the city. They all said, they had never
heard it even mentioned. “Since you all agree then,” said he, “that
you have never heard it spoken of, and since I am not less
astonished than you are at this novelty, I am resolved not to return
to my palace, till I have discovered for what reason this pond is now
placed here, and why there are fish of only four colours in it.” After
having thus spoken, he ordered them to encamp around it; his own
pavilion, and the tents of his immediate household, were pitched on
the borders of the pond.

When the day closed, the sultan retired to his pavilion, and entered
into a particular conversation with his vizier. “My mind,” said he,
“is much disturbed; this pond suddenly placed here, this black, who
appeared to us in my cabinet, these fish too, which we heard speak;
all this so much excites my curiosity, that I cannot conquer my
impatience to be satisfied. It is on this account, that I am absolutely
determined to execute the design I meditate. I shall go quite alone
from my camp, and order you to keep my departure a profound
secret. Remain in my pavilion, and when my emirs and courtiers
present themselves at the entrance to-morrow morning, send them
away, and say I have a slight indisposition, and wish to remain
alone. You will also continue to do so every day till my return.

The grand vizier endeavoured by many arguments to persuade the


sultan not to do as he intended. He represented the great danger to
which he exposed himself, and the unnecessary trouble and
difficulties he might thus encounter, and probably to no purpose. All
his eloquence, however, was exhausted to no effect; the sultan did
not alter his resolution, but prepared to set out. He put on a proper
dress for walking, and armed himself with a sabre; and as soon as he
found that every thing in the camp was quiet, he departed,
unaccompanied by any one.

He bent his course towards one of the small hills, which he


ascended without much difficulty; and the descent on the other side
was still easier. He then pursued his way over a plain, till the sun
rose. He now perceived, in the distance before him, a large building,
the sight of which filled him with joy, from the hopes of being able
to gain some intelligence of what he wished to know. When he came
near, he remarked, that it was a magnificent palace, or rather a
strong castle, built with polished black marble, and covered with
fine steel, so bright, that it was like a mirror. Delighted with having
so soon met with something, at least, worthy his curiosity, he
stopped opposite the front, and considered it with much attention;
he then advanced towards the folding doors, one of which was open.
Though he might have gone in, he thought it better to knock. At first,
he knocked gently, and waited some time; but finding no one
appear, he thought they might not have heard; he therefore knocked
a second time much louder; still no one came. He redoubled his
efforts, but in vain. At this he was much astonished, as he could not
imagine, that a castle, so well built as that was, could be deserted. “If
there be no person there,” said the sultan to himself, “I have nothing
to fear; and if there be any one, I have arms to defend myself with.”
At last he entered, and when he was in the vestibule, he called out,
“Is there no one here to receive a stranger, who is in want of
refreshment on his journey?” He repeated it two or three times, as
loud as he could; still there was no answer. This silence increased his
astonishment. He passed on to a very spacious court, and looking on
all sides, he could not discover a living creature. He then entered,
and passed through some large halls, the carpets of which were of
silk, the recesses and sofas entirely covered with the stuffs of Mecca,
and the curtains before the doors of the richest manufactures of
India, embroidered with gold and silver. He went on, and came to a
most wonderful saloon, in the midst of which there was a large
reservoir, with a lion of massive gold at each corner. Streams of
water issued from the mouths of the four lions, and in falling,
appeared to break in a thousand diamonds and pearls, which
formed a good addition to a fountain that sprung from the middle of
the bason, and rose almost to the top of a dome, beautifully painted
in the arabesque style.

The castle was surrounded on three sides by a garden, which was


embellished with all kinds of flowers, fountains, groves, and many
other beauties; but what rendered this spot still more enchanting,
was the multitude of birds, which filled the air with their sweetest
notes. This was their constant habitation, because there were nets
thrown entirely over the trees, which prevented their escape.

The sultan continued walking a long time from one apartment to


another, where every thing was grand and magnificent. Being rather
fatigued, he sat down in an open cabinet, which looked into the
garden. Here he meditated upon all he had seen, or might yet see;
and was reflecting on the different objects, when suddenly a
plaintive voice, accompanied by the most heart-rending cries, struck
his ear. He listened attentively, and distinctly heard these
melancholy words: “O fortune, thou hast not suffered me long to
enjoy my happy lot, but hast rendered me the most wretched of
men; cease, I entreat thee, thus to persecute me, and by a speedy
death put an end to my sufferings! alas, is it possible I can still exist,
after all the torments I have suffered?”

The sultan, much affected by these lamentable complaints,


immediately got up, and went towards the spot, whence they issued.
He came to the entrance of a large hall; he drew the door-curtain
aside, and saw a young man seated upon a sort of throne, raised a
little from the ground. He appeared well made and was very richly
dressed. Sorrow was impressed on his countenance. The sultan
approached and saluted him. The youth returned the compliment by
bending his head very low, but did not rise. “I am sure, Sir,” said he
to the sultan, “I ought to get up to receive you, and shew you all
possible respect, but a most powerful reason prevents me; you will
not therefore, I trust, take it ill.”—“I feel myself highly honoured,
sir,” replied the sultan, by the good opinion you express of me.
Whatever may be your motive for not rising, I willingly receive your
apologies. Attracted by your complaints, and impelled by your
sufferings, I come to offer you my assistance. I trust I shall be
permitted to afford some consolation to you in your misfortunes,
and I will use all my endeavours to do so. I flatter myself you will
not object to relate the history of your sorrows to me. But, in the first
place, I beg of you to inform me, what that pond, which is near this
castle, means, where there are fish of four different colours: how also
this castle came here, and you thus in it and alone!

Instead of answering these questions, the young man began to


weep most bitterly. “How inconstant is fortune,” he cried, “she
delights in crushing those whom she has elevated. Who can say they
have ever enjoyed from her a life of calm and pure happiness?”

The sultan, touched with compassion at his situation, requested


him again to relate the cause of such sorrow: “Alas, my lord,”
answered the youth, “can I be otherwise than afflicted, or can these
eyes ever cease from shedding tears?” At these words he lifted up
his robe, and the sultan perceived he was a man only to his waist,
and that from thence to his feet he was changed into black marble.

You may easily imagine, that the sultan was much surprised, when
he saw the deplorable state of the young man. “What you shew me,”
said he to him, “fills me with horror, but at the same time excites my
curiosity; I am impatient to learn your history, which must no doubt
be very singular; and I am persuaded, that the pond and the fish
have some connexion with it; I entreat you therefore to relate it, and
you may find consolation by doing so; for the unhappy often
experience some relief in communicating their sorrows.”—“I will not
refuse you this satisfaction,” replied the young man, “although I
cannot impart it without renewing the most poignant grief; but I
must forewarn you to prepare your ears and your mind, nay even
your eyes, for what surpasses all conception.”

You might also like