Skip to content

Commit

Permalink
Merge pull request #1 from NCAR/master
Browse files Browse the repository at this point in the history
Merging in changes from the root
  • Loading branch information
Katetc committed Dec 21, 2015
2 parents f8513df + 80b7ee8 commit 6b6f179
Show file tree
Hide file tree
Showing 16 changed files with 1,353 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.project
html/
*~

50 changes: 50 additions & 0 deletions cmake/FindMPE.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# - Try to find MPE
#
# This can be controlled by setting the MPE_PATH (or, equivalently,
# the MPE environment variable), or MPE_<lang>_PATH CMake variables,
# where <lang> is the COMPONENT language one needs.
#
# Once done, this will define:
#
# MPE_<lang>_FOUND (BOOL) - system has MPE
# MPE_<lang>_IS_SHARED (BOOL) - whether library is shared/dynamic
# MPE_<lang>_INCLUDE_DIR (PATH) - Location of the C header file
# MPE_<lang>_INCLUDE_DIRS (LIST) - the MPE include directories
# MPE_<lang>_LIBRARY (FILE) - Path to the C library file
# MPE_<lang>_LIBRARIES (LIST) - link these to use MPE
#
# The available COMPONENTS are: C
include (LibFind)
include (LibCheck)

# Define MPE C Component
define_package_component (MPE DEFAULT
COMPONENT C
INCLUDE_NAMES mpe.h
LIBRARY_NAMES mpe)

# Search for list of valid components requested
find_valid_components (MPE)

#==============================================================================
# SEARCH FOR VALIDATED COMPONENTS
foreach (NCDFcomp IN LISTS MPE_FIND_VALID_COMPONENTS)

# If not found already, search...
if (NOT MPE_${NCDFcomp}_FOUND)

# Manually add the MPI include and library dirs to search paths
# and search for the package component
if (MPI_${NCDFcomp}_FOUND)
initialize_paths (MPE_${NCDFcomp}_PATHS
INCLUDE_DIRECTORIES ${MPI_${NCDFcomp}_INCLUDE_PATH}
LIBRARIES ${MPI_${NCDFcomp}_LIBRARIES})
find_package_component(MPE COMPONENT ${NCDFcomp}
PATHS ${MPE_${NCDFcomp}_PATHS})
else ()
find_package_component(MPE COMPONENT ${NCDFcomp})
endif ()

endif ()

endforeach ()
2 changes: 1 addition & 1 deletion doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ SHORT_NAMES = NO
# description.)
# The default value is: NO.

JAVADOC_AUTOBRIEF = NO
JAVADOC_AUTOBRIEF = YES

# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
# line (until the first dot) of a Qt-style comment as the brief description. If
Expand Down
7 changes: 6 additions & 1 deletion doc/source/Examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ The C examples are in the examples/c subdirectory.
- examplePio.c A simple example showing a write, then read, of a 1D variable.

- example1.c Another simple example showing a write, then read, of a
1D variable.
1D variable. This produces the same output as examplePio.c.

- example2.c This example writes a 3D floating point variable, with an
unlimited dimension. The data are written in slices along the
unlimited dimension. This example also incorporates (if installed)
the MPE profiling system to generate graphical output.

### Fortran Examples

Expand Down
2 changes: 2 additions & 0 deletions doc/source/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- \ref PIO_inq_attname
- \ref PIO_inq_att
- \ref PIO_inq_attlen
- \ref PIO_inq_var
- \ref PIO_inq_varid
- \ref PIO_inq_varname
- \ref PIO_inq_vartype
Expand All @@ -55,5 +56,6 @@
- \ref PIO_inq_natts
- \ref PIO_inquire_variable
- \ref PIO_inquire_dimension
- \ref PIO_inquire_dimension

*/
21 changes: 19 additions & 2 deletions examples/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,25 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")

SET(SRC examplePio.c)
ADD_EXECUTABLE(examplePio_c ${SRC})
TARGET_LINK_LIBRARIES(examplePio_c piof pioc)
TARGET_LINK_LIBRARIES(examplePio_c pioc)

SET(SRC example1.c)
ADD_EXECUTABLE(example1 ${SRC})
TARGET_LINK_LIBRARIES(example1 piof pioc)
TARGET_LINK_LIBRARIES(example1 pioc)

SET(SRC example2.c)
ADD_EXECUTABLE(example2 ${SRC})
TARGET_LINK_LIBRARIES(example2 pioc)

#===== MPE =====
find_package (MPE "2.4.8" COMPONENTS C)
if (MPE_C_FOUND)
target_include_directories (example2
PUBLIC ${MPE_C_INCLUDE_DIRS})
target_compile_definitions (example2
PUBLIC HAVE_MPE)
target_link_libraries (example2 pioc lmpe mpe pthread m)
else ()
target_compile_definitions (example2
PUBLIC _NOMPE)
endif ()
Loading

0 comments on commit 6b6f179

Please sign in to comment.