Skip to content

Commit

Permalink
Add note about GFortran usability to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CamStan committed Apr 17, 2019
1 parent 691610e commit 268ef00
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/api-mount.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,47 @@ Mounting UnifyCR

In this section, we describe how to use the UnifyCR API in an application.

.. Attention:: **Fortran Compatibility**

``unifycr_mount`` and ``unifycr_unmount`` are now usable with GFortran.
There is a known issue_ with the Intel Fortran compiler. Other Fortran
compilers are currently unknown.

---------------------------
Mounting
---------------------------

In ``C`` applications, include *unifycr.h*. See writeread.c_ for a full
example.

.. code-block:: C
:caption: C
#include <unifycr.h>
In ``Fortran`` applications, include *unifycrf.h*. See writeread.f90_ for a
full example.

.. code-block:: Fortran
:caption: Fortran
include 'unifycrf.h'
To use the UnifyCR filesystem a user will have to provide a path prefix. All
file operations under the path prefix will be intercepted by the UnifyCR
filesystem. For instance, to use UnifyCR on all path prefixes that begin with
/tmp this would require a:

.. code-block:: C
:caption: C
unifycr_mount('/tmp', rank, rank_num, 0);
.. code-block:: Fortran
:caption: Fortran
call UNIFYCR_MOUNT('/tmp', rank, size, 0, ierr);
Where /tmp is the path prefix you want UnifyCR to intercept. The rank and rank
number is the rank you are currently on, and the number of tasks you have
running in your job. Lastly, the zero corresponds to the app id.
Expand All @@ -28,9 +56,21 @@ Unmounting
When you are finished using UnifyCR in your application, you should unmount.

.. code-block:: C
:caption: C
if (rank == 0) {
unifycr_unmount();
}
.. code-block:: Fortran
:caption: Fortran
UNIFYCR_UNMOUNT(ierr);
It is only necessary to call unmount once on rank zero.

.. explicit external hyperlink targets
.. _issue: https://github.com/LLNL/UnifyCR/issues/300
.. _writeread.c: https://github.com/LLNL/UnifyCR/blob/dev/examples/src/writeread.c
.. _writeread.f90: https://github.com/LLNL/UnifyCR/blob/dev/examples/src/writeread.f90
11 changes: 11 additions & 0 deletions docs/build-intercept.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,19 @@ Steps for dynamic linking using gotcha:
To intercept I/O calls using gotcha, use the following syntax to link an
application.

C
^^^^^^^^^^^^^^

.. code-block:: Bash
$ mpicc -o test_write test_write.c \
-I<unifycr>/include -L<unifycy>/lib -lunifycr_gotcha \
-L<gotcha>/lib64 -lgotcha
Fortran
^^^^^^^^^^^^^^

.. code-block:: Bash
$ mpif90 -o test_write test_write.F \
-I<unifycr>/include -L<unifycy>/lib -lunifycrf -lunifycr_gotcha \

0 comments on commit 268ef00

Please sign in to comment.