Logo
latest

User Guide

  • Overview
  • Definitions
  • Assumptions and Semantics
  • Build UnifyFS
  • Integrate the UnifyFS API
  • Link with the UnifyFS library
    • Static link
    • Dynamic link
      • C
      • Fortran
  • UnifyFS Configuration
  • Run UnifyFS
  • Examples
  • UnifyFS API for I/O Middleware

Contributing

  • Ways to Contribute
  • Style Guides
  • Testing Guide
  • Wrapper Guide
  • Adding RPC Functions With Margo Library

Reference

  • UnifyFS Dependencies
UnifyFS
  • Docs »
  • Link with the UnifyFS library
  • Edit on GitHub

Link with the UnifyFS library¶

This section describes how to link an application with the UnifyFS library. The UnifyFS library contains symbols for the UnifyFS API, like unifyfs_mount, as well as wrappers for I/O routines, like open, write, and close. In the examples below, replace <unifyfs> with the path to your UnifyFS install.


Static link¶

For a static link, UnifyFS utilizes the --wrap feature of the ld command. One must specify a --wrap option for every I/O call that is wrapped, for which there are many. To make this easier, UnifyFS installs a unifyfs-config script that one should invoke to specify those flags, e.g.,

$ mpicc -o test_write \
      `<unifyfs>/bin/unifyfs-config --pre-ld-flags` \
      test_write.c \
      `<unifyfs>/bin/unifyfs-config --post-ld-flags`

Dynamic link¶

To intercept I/O calls using gotcha, use the following syntax to link an application:

C¶

$ mpicc -o test_write test_write.c \
    -I<unifyfs>/include -L<unifyfs>/lib -lunifyfs_gotcha \
    -L<gotcha>/lib64 -lgotcha

Fortran¶

$ mpif90 -o test_write test_write.F \
    -I<unifyfs>/include -L<unifyfs>/lib -lunifyfsf -lunifyfs_gotcha
Next Previous

© Copyright 2020, Lawrence Livermore National Security LLC, LLNL-CODE-741539, UT-Batelle LLC Revision f31753f1.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
v0.9.2
v0.9.1
dev
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.