Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building a BeagleBone Black Super Cluster
Building a BeagleBone Black Super Cluster

Building a BeagleBone Black Super Cluster: Build and configure your own parallel computing Beowulf cluster using BeagleBone Black ARM systems

By Andreas J Reichel
$32.99
Book Nov 2014 156 pages 1st Edition
eBook
$19.99 $13.98
Print
$32.99
Subscription
$15.99 Monthly
eBook
$19.99 $13.98
Print
$32.99
Subscription
$15.99 Monthly

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Black & white paperback book shipped to your address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Nov 19, 2014
Length 156 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781783989447
Category :
Table of content icon View table of contents Preview book icon Preview Book

Building a BeagleBone Black Super Cluster

Chapter 1. BeagleBone Black System Board

While studying physics and natural science, I always felt that solving scientific or mathematical problems was the only way of really making use of a modern computer's speed and calculation power. Such problems appear in research, simulation, or visualization purposes, as well as in computer games. Playing around with computers and programming since the age of 13, I soon realized that linear problems such as equation systems can take a very long time to get solved on modern standard PCs, depending on the number of unknowns. Also, being interested in the miniaturization of hardware, I finally came across BeagleBone Black (BBB), which is a credit-card-sized computer that can run Linux. I soon stumbled across some already realized supercomputer projects on the Web that utilize similar boards. Having read some articles about their scalability and capabilities, I decided to try and understand how to build and configure such a supercomputer with the more modern BBBs instead of Raspberry Pi. I succeeded in building my first self-built, low-cost supercomputer that is a Beowulf cluster, and now I will show you how to build your own. The common reason why people buy BBB is because of its fascinating hardware. There are a lot of other embedded systems such as Arduino Mega or Raspberry Pi, which were created in order to enable hobby programmers to start the development of their own hardware controls or other applications right away. Compared to Arduino Mega or other low-level products, BBB has 100 times or more computational power and a lot of other integrated features for the same price.

The technical specifications of BBB are introduced in this chapter. Alongside the basic hardware architecture and board features, you will get to know other useful information on the boot selection button and internal storage partitions. Coming to the operating system (OS) and software parts, the main focus will be on the OS used throughout this book and a basic understanding of programming languages and the development tools for later chapters.

The following topics will be covered:

  • Explanation of the system board features

  • Introduction to existing operating systems

  • Understanding the partition structure with and without a microSD card

  • Explanation of boot partition and boot failure recovery

  • Introduction to the necessary programming environment for this book

The last point is especially written for hobbyists who might or might not have basic programming skills, as all the steps required to create your own software will be explained and kept at a basic level.

Introducing the hardware


The BBB board is a complete, low-cost, energy-efficient, multipurpose development system with onboard Ethernet, flash storage, video controller, and much more. Its primary goal is to offer a true open hardware and community-supported embedded computer for developers and hobbyists. Compared to low-level embedded systems such as Arduino, BBB is a fully functional standalone PC that has the size of a credit card.

Without any expansion cards, the power required by a BBB is around 2.5 watts, which is 5 percent of the power required by a typical light bulb. Compared to a common Pentium III computer with the same clock frequency of 1 GHz, it only needs about 2.5 percent of its power requirement, and even has a better graphics card onboard, but has slightly less memory.

The central processing unit

In general, the power of a computer is defined by the speed of its components. Most critical are the main memory, its bus interconnection, and the central processing unit (CPU). The slowest interconnecting path between faster components is called the bottleneck and defines the overall system's performance. On modern CPUs, the memory interface is on-die, which means that it is integrated into the silicon chip. This offers maximum performance and avoids any bottlenecks between the CPU and the main memory. This is also the case with BBB.

BBB's heart is the Sitara ™ ARM ® Cortex-A8 32-bit processor from Texas Instruments with a programmable clock driven at 1 GHz by factory settings. Interestingly, on some of my boards, the XAM3359AZCZ100 version of the CPU is used, which has a maximum frequency of 800 MHz according to TI. Despite this, it is driven at 1000 MHz on BBB without any problems. According to the manual, it was changed to XAM3358 in the board revision C. The architecture is RISC, which means that the CPU only needs one clock cycle to execute a command. This makes the Cortex-A8 faster than a typical Intel P3 with the same clock frequency if one focuses on standard instructions. Also, the CPU supports the NEON instruction set, which gives BBB a great advantage over Raspberry Pi.

Under full processor utilization, the board gets quite warm. This is not a problem if it is used as a standalone board. However, if there is more than one board in a small area or even if the boards are stacked on top of each other, they will need some cooling in order to avoid overheating. An example of a cheap cooling system is given in Chapter 2, Building a Beowulf Cluster.

The figure in the next section shows us the internal CPU architecture that also provides very sophisticated features such as a touchscreen controller and a 3D graphics acceleration on-die.

I/O interfaces and control buttons

The actual purpose of BBB was to provide a development platform that is easy to program and can be used to control or regulate other hardware. In other words, it must be able to measure and output signals that are easy to interface in the hardware and software. To provide this capability, two 46-pin headers are available for general-purpose I/O (GPIO). These pins use a 3.3 volt logic for I/O. A higher voltage level might result in damaging the CPU. The board also provides two programmable real-time units (PRUs) for time-critical applications. Please refer to the hardware manual for a detailed description. In this book, no I/O operation is described, as they are not used in the BBB cluster.

Besides general-purpose I/O, the board also provides the following:

  • A RJ45 network jack

  • A 5V power jack

  • A USB client

  • A USB host port

  • A HDMI jack for video and audio support

  • A serial port header that is useable for debugging

The system can be powered by either the 5V power jack or the USB client port using the preinstalled operating system. However, using the operating system as described in this book, we can see that only the 5V power jack will work. This means that the boards in the final cluster configuration cannot be powered up using a USB power supply. Please refer to Chapter 2, Building a Beowulf Cluster, for information on how to build a cheap and efficient power supply. This book only describes the usage of the RJ45 network interface for installation, configuration, and user control via SSH. Thus, it is not necessary to make use of the HDMI port in cluster applications. The onboard network controller works with 10/100 megabit/s.

The internal architecture of BBB's CPU

The following image and list gives you an overview of the important onboard ports, plugs, and control buttons; a indicates a 5V power jack, b indicates an RJ45 Ethernet port, c indicates a general-purpose I/O with serial header on its right, d indicates a USB host port, e indicates status LEDs, f indicates the reset button, g indicates the power button, h indicates the CPU, i indicates the boot-selection button, j indicates a USB client port, k indicates the microSD slot, and l indicates the mini HDMI port:

While the power and reset buttons are used in the same manner as they are used on PCs, the boot-selection button is used to select the boot sector located in either the internal ROM or on the external microSD card. This function is very useful in order to recover a misconfigured or non-bootable system.

The onboard memory and flash storage

BBB is equipped with 512 MB of DDR3 RAM, which possesses a higher bandwidth compared to the competitor, which is Raspberry Pi, which uses DDR2 RAM. It is not possible to extend the physical RAM on a single BBB; however, this is not important when performing cloud computing because this makes use of distributed memory.

For nonvolatile storage, 2 or 4 GB of 8-bit eMMC flash memory—depending on your board revision—is available onboard. This is enough to install all the required software along with the operating system in order to perform the highly sophisticated computations described in this book. Any dynamic libraries will be installed in a common network shared folder. The storage capacity can also be extended using the free microSD card slot that provides more virtual memory or additional storage capacity. You should refer to the documentation of your specific board version to see supported microSD card sizes. In this book, an additional card with 16 GB size will be used for the master-node board, which will be explained in Chapter 3, Operating System Setup and Configuration.

The storage memory partition structure


Let's first explain what partitions are and why they are used. Partitions are logical divisions of storage space divided into multiple logical units, providing a convenient way of storage management. Each partition can have its own filesystem, and thus, it can be formatted separately. Also, for virtual memory a specific type of partition, a so-called swap partition can be used. Every block device, which means every memory device with random access and consisting of discrete blocks such as sectors, can be partitioned.

Each operating system usually has a boot partition where important system files that are in charge of starting up the system are stored. A system can have more than one operating system where a boot menu can provide the possibility of selecting a specific boot partition on each system startup.

It is very important to understand the partition structure of the BBB storage memory in order to know how to install alternative operating systems. By default, there is no extension microSD card installed, and the internal flash memory is divided into two partitions. If you boot up the preinstalled operating system from the internal memory, there will be two partitions for the internal and two partitions for the optional uninstalled microSD card. Furthermore, there will be two virtual partitions that represent the boot loader for the internal and external memory. The latter two are permanent and cannot be accidentally overwritten. The kernel of the preinstalled Linux version, like any other version, will map the storage partitions in its local filesystem to the /dev directory.

The following table shows the existing partitions if they are booted from the internal flash memory:

Partition

Location

/dev/mmcblk0p1

The first block device and the first partition

/dev/mmcblk0p2

The first block device and the second partition

/dev/mmcblk1p1

The second block device and the first partition

/dev/mmcblk1p2

The second block device and second partition

/dev/mmcblk0boot0

The boot code partition 1

/dev/mmcblk0boot1

The boot code partition 2

The mmcblk0p1 and mmcblk0p2 partitions, respectively, relate to the first and second partitions of the first block device (the number zero), whereas the mmcblk1p1 and mmcblk1p2 partitions relate to the second block device (the number one).The order of the block devices changes if an external microSD card is installed and booted.

Note

If there is no external microSD card installed, the internal memory is/dev/mmcblk0; if it is installed, the internal memory is /dev/mmcblk1 instead.

The boot-selection button


The boot-selection button enables the user to select the boot code. If it is pressed during the system startup, the mmcblkXboot1 partition is selected, which will boot up the first partition of the microSD card. If it is not pressed, the system will load the internal boot partition code using mmcblkXboot0. The letter X means that boot1 and boot0 can be mapped onto either the first or second block device, which is irrelevant. The preinstalled boot sector will try to load the operating system on any inserted microSD card on its own. This will only work if the kernel located there is compatible. If it is not, the system will not boot up and will hang. This means that if you insert a microSD card with an alternative operating system for the first time, you have to push the boot-selection button until you see the system starting up (indicated by the status LEDs flickering). This only works if you cycle the board power, which means that you need a cold start and should not use the reset button.

This will be explained in Chapter 3, Operating System Setup and Configuration, which talks about how to install another Linux operating system and work with system partitions and filesystems in detail.

Recovering a boot failure

Whenever you encounter a boot problem and cannot start up your BBB with the operating system on the internal eMMC flash, you can use a failsafe microSD card that you set up earlier in order to boot up the system. For this purpose, you just have to insert the microSD card into the slot and push the boot-selection button before you power on the system and hold it until it boots. It is always a good idea to keep a working system image on a microSD card for such purposes.

Operating systems


BBB up to version A5C and built before May 2014 comes with a preinstalled operating system, namely the Angstrom Linux distribution. Later versions come with the Debian Linux distribution. Texas Instruments provides two releases: an Android and a Linux operating system. All the examples in this book are based on the Ubuntu Linux distribution; however, it is a question of personal taste which Linux distribution you want to use. If you decide to use another distribution, you might have to figure out how to compile your software and install the required packages on your own. There is, however, a chance that packages used throughout this book for Ubuntu might also work with other Linux distributions. Android does not support general Linux software and cannot be used to build a cluster with the means described in this book.

ARMhf images

Linux operating systems are available for a vast variety of different computer platforms such as PowerPC, x86, IA-64, ARM, and many more. An interesting feature of the CPU used on BBBs is the implementation of floating point instructions. This means that mathematical operations based on non-integer values can be executed by hardware rather than software, and thus they are carried out much faster. ARMhf stands for ARM hard float architecture. To make use of this advantage, a special operating system image is used throughout this book, namely the Ubuntu-12.04-armhf image from John Clark.

The Ubuntu 12.04 ARMhf Linux system

The Ubuntu 12.04 Linux distribution, compiled for the ARMhf platform, can be obtained from the home page of John Clark's website at http://www.armhf.com/download/. Please keep in mind that Linux systems and software are updated a lot. If you are not able to get exactly the same software as that used in this book, you can try a newer one or download the version from the download section accompanying this book. You will find more details on how to download and install the operating system in Chapter 2, Building a Beowulf Cluster.

Tip

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Software programming


The most important part of a good computer is good software. Without good software, specifically optimized for its hardware, the full computational power cannot be utilized. In this book, I will show you how to build a supercomputer cluster that gains its high-speed computational power from distributing certain tasks to other its via networking. For this purpose, special software is required and has to be compiled from the source code. How this works and what nodes are will be explained in Chapter 2, Building a Beowulf Cluster, and Chapter 3, Operating System Setup and Configuration.

The open source philosophy

Although there are a lot of already existing helpful software packages, it is very important to understand that Linux is an open source operating system written for an open source community. Usually, Windows users are frustrated when they gain first contact with open source software, because they are used to having already working and easy-to-install software. A huge disadvantage is that these software packets are compiled for a standard platform and might not be optimized to a specific computer that they are installed on. Another problem is that if software components of the operating system are updated but older versions are required by the user software, instabilities might arise or completely different interfaces might disrupt the software functionality completely.

Software modularity and dependencies

Linux is a highly modular operating system. The whole system is built on the philosophy of open software, which means that every part of the operating system can be compiled from available open source code. This source code is then compiled by standard programming languages such as C, C++, FORTRAN, Assembler, and others in order to build binary code specifically optimized for certain hardware. The technique by which software is built does not differ much from Windows or Linux operating systems. For the beginner, it might be hard to produce a working compiled program starting from source code because usually, there are a lot of software dependencies such as missing software libraries or other programs that code is based upon. In this case, it might be hard to find all the required libraries, especially when newer versions that have changed in interfaces such as function definitions are available. On the other hand, a dependency can soon lead to several others so that the search for all the required libraries grows exponentially and takes a lot of time.

Also, on certain hardware, some well-established compiling parameters do not work and have to be modified or bug fixes have to be found. This can make the simple task of "just compiling software" an unsolvable problem for beginners. Thanks to the rising community of hobby programmers and Linux enthusiasts, there are a lot of forums online that can be searched for such problems. Often, solutions are present, and if not, there can be hints that point us in the right direction, at least.

The following sections will explain the basics of creating software on Linux operating systems with standard programming environments. It is written for hobby enthusiasts who might or might not have already tried and programmed their own software. Although existing knowledge is very helpful, it is not required in order to understand the following explanations.

The source code and programming languages

Each computer program consists of binary code, which means a sequence of two states usually described as zero and one. A specific state is called a bit. Four of these bits make up a so-called nibble and eight make up a byte. Several bytes can be described as a word, a double word, or a quad word. The following table gives you a small summary of the most important data sizes:

Amount of bits

Amount of bytes

Special name

4

1/2

nibble

8

1

byte

16

2

word

32

4

double word

64

8

quad word

A central processor does nothing else except interpreting bit sequences as commands. These commands are called instructions and tell the CPU what to do. This is the lowest level of programming, which is the so-called machine language. Machine language is, except to certain freaky people, not human-readable. For example, it is not obvious that the binary code 1011 0100 0100 1100 1100 1101 0010 0001 is the end of an MS-DOS program.

Low-level programming

Low-level programming means the direct programming of machine language. Of course, this has to happen in a human-readable way. One possibility to simplify 1011 0100 0100 1100 is given by using another number system, such as the hexadecimal system, resulting in 0xB4 0x4C. This is better, but it's still not readable by humans. The final simplification is the invention of so-called mnemonics. For example, on Intel x86-platforms, 0xB4 0x4C would mean mov ah, 0x4C in this mnemonics language. Now, one can understand that this code sets the CPU register named ah to the value of 0x4C. This language as well as the software that translates this back into bits is called Assembler.

Assembler has its advantages and disadvantages. One big advantage is that the resulting software does exactly what you programmed. This means that there is no optimization that modifies your code and you can program very effectively in size and speed. One big disadvantage, however, is the problem that each CPU has its own instruction set. This means that our Sitara CPU will not understand the preceding example, because it has no ah register. For any real problems we want to solve using computers, we are primarily interested in the nature of the problem and not the nature of the CPU used in the computer. To make programming independent of the used computer platform, there exist so-called high-level programming languages.

High-level programming

High-level programming languages consist of keywords, syntax, and grammar, as with every spoken language. The keywords define the vocabulary that can be used, whereas syntax and grammar define the exact utilization and order of these keywords. To understand this, we should have a look at how a simple loop will look in a low-level language compared to a high-level language.

The following example shows us that a simple loop already needs four different instructions in Assembler, while it can be realized by a relatively simple for keyword in the high-level language C++:

Low level (Assembler)

High level (C++)

mov cx, 0
@mark1:
    other code..
inc cx
cmp cx, 345
jne @mark1

for (int j = 0; j < 345; j++) {
    other code...
}

A low-level language compared to a high-level language

While C++ is a general-purpose high-level programming language, there are also languages that are more specifically optimized. One example is FORTRAN, which is mainly used for mathematical problems due to its ability to define matrices and other mathematical structures very easily.

The compiler toolchain

Once the required code has been written and is ready to be translated from its human-readable form into machine language, there is a certain sequence of tools that have to be used. This toolset is called the compiler toolchain:

  1. Firstly, the code is treated by the compiler itself. The compiler translates the high-level language to a low-level language, mostly Assembler.

  2. It is then translated to object files. Usually, these two processes are performed by only one compiler internally.

  3. The object files then have the binary format and can be executed theoretically. However, the OS must know a few things in order to execute programs correctly. It must be told where in the main memory the program has to be loaded, how much memory it uses, which libraries it needs, and so on. To fulfill these requirements, we need to link the program.

  4. The so-called linker combines one or more object files and adds information that's specific to the OS in use.

  5. The final program then consists of a special executable format generated by the linker and incorporating the object files produced by the compiler. In Linux, this executable format is called Executable and Linking Format (ELF).

The whole process is depicted in the following diagram:

Software compilation and simple toolchain

Another important feature of the linker is its capability to embed the required libraries into the executable file. This is called static linking. The program can then be used on other computers that do not have that specific library installed. The opposite of static linking is dynamic linking. In this case, only a stub of the library is linked into the program that tells the OS which library to provide. Dynamically-linked programs are smaller in size but always need their libraries.

In all examples, the main focus will be on C++. Some of the modules are only available as FORTRAN code; however, once compiled, their functions can also be accessed from C++ programs.

Summary


In this chapter, BeagleBone Black was introduced, starting with its hardware and key features. It was compared with other platforms regarding its power and energy requirements. Special attention was paid to the internal architecture of the central processing unit, the I/O-interfaces, and control buttons, as well as the embedded memory features.

For the following system setup, the internal flash partition system was described and special caution was taken on the variable partition mapping regarding an optional microSD card expansion.

The default boot mechanism and how it can be altered using the onboard boot selection button was explained. It was also mentioned how to unbrick the system if it fails to boot.

A short description of available operating systems was given as well as an explanation of the importance of native floating point support. The chapter ended with a short introduction to the basics of software programming, keeping an eye on the basic functionality of compilers and linkers. The difference between static and dynamic linking was explained, which will be of further importance in the next chapter. Missing elements such as data types will be explained where necessary.

In the next chapter, we will cover practical things. I will show you how to connect the boards, build a simple frame, and how to get a cheap power supply. You will also be introduced to the basic network structure and the general idea of a Beowulf cluster's topology.

Left arrow icon Right arrow icon

Key benefits

What you will learn

Use the minimal configuration necessary to control your BeagleBone via a network Build your own scalable server rack and lowcost power supply Set up the network backbone and configure the boards for cluster interconnection Use FTP, Samba, or SCP for simple file transfers Configure the OpenMPI Message Passing Interface for cluster communication and ScaLAPACK for distributed calculation of mathematical problems Develop your own simulation software and visualize your data using a highly sophisticated physics simulation package

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Black & white paperback book shipped to your address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Nov 19, 2014
Length 156 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781783989447
Category :

Table of Contents

14 Chapters
Building a BeagleBone Black Super Cluster Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Author Chevron down icon Chevron up icon
About the Reviewers Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
BeagleBone Black System Board Chevron down icon Chevron up icon
Building a Beowulf Cluster Chevron down icon Chevron up icon
Operating System Setup and Configuration Chevron down icon Chevron up icon
Parallel Computing with OpenMPI and ScaLAPACK Chevron down icon Chevron up icon
Advanced Solving of General Equation Systems Chevron down icon Chevron up icon
Scientific and Technological Examples of Parallel Computing Chevron down icon Chevron up icon
References Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela