darshan-module.in 3.54 KB
Newer Older
1
#%Module
2 3 4 5 6 7 8 9 10
##

## Required internal variables

set		name		darshan
set		version		@DARSHAN_VERSION@
set		root		@prefix@

## List conflicting modules here
11

12
conflict $name
13

14
## List prerequisite modules here
15

16
# prereq
17

18 19 20 21 22 23
set		fullname	Darshan
set		externalurl	http://www.mcs.anl.gov/research/projects/darshan
set		maincategory	applications
set		subcategory	debugging
set		description	"A lightweight IO profiler"

24 25
set product DARSHAN

26
## Required for "module help ..."
27 28

proc ModulesHelp { } {
29 30 31 32 33 34 35 36 37 38 39 40 41 42
  global description externalurl
  puts stderr "Description - $description"
  puts stderr "Other Docs  - $externalurl"
}

## Required for "module display ..." 

module-whatis			"$description"

## Software-specific settings exported to user environment

setenv CRAY_DARSHAN_VERSION              $version
setenv CRAY_DARSHAN_DIR                  $root

43
# Put darshan utilities and libraries in system paths
44
prepend-path PATH $root/bin
45 46
prepend-path CRAY_LD_LIBRARY_PATH           $root/lib

47 48 49 50 51 52 53 54 55 56
# NOTE: The following example shows how to enable Darshan for dynamically linked
#       executables if your environment allows you to load modules from
#       within a scheduler script.
# 
#if [info exists env(PBS_JOBID)] {
#    module load xt-lgdb
#    setenv LD_PRELOAD  $path/lib/libdarshan.so	
#}


57
# initial link options for Darshan
58
setenv DARSHAN_POST_LINK_OPTS " -L$root/lib -ldarshan-mpi-io -lz -Wl,-u,__wrap_fopen,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64  -lfmpich -lmpichcxx -ldarshan-posix -ldarshan-mpi-io -lz "
59 60 61 62 63 64 65 66 67 68 69 70

# Add Darshan to the PE_PRODUCT_LIST variable.  This will cause the
# compiler scripts to insert DARSHAN_POST_LINK_OPTS into the link command
# line.
prepend-path PE_PRODUCT_LIST $product

# IMPORTANT: In addition to the DARSHAN_POST_LINK_OPTS option shown above,
# we must also add -ldarshan-mpi-io to the CNL_LIBS_LIST variable in
# the compiler scripts. This enables the linker to make a final pass to
# resolve darshan symbols if an application library is indirectly using a
# high level library like hdf5 or pnetcdf.
#
71
# There are two options:
72
#
73 74 75
# a) Modify the linux-cc, linux-f90, linux-CC, craycc, crayftn,
# and crayc++ scripts to include a new variable (for example, LIBDARSHAN) at
# the end of the CNL_LIBS_LIST, and set that variable below:
76
#setenv LIBDARSHAN "-ldarshan-mpi-io"
77 78 79 80 81 82 83 84
#
# b) For testing purposes, you can re-use an existing variable from another
# software project that is already present in CNL_LIBS_LIST but is not
# defined within directly within the compiler script.  Two examples are
# shown below.  Note that the scripts for the Cray compiler (craycc,
# crayftn, and crayc++) use different linker arguments and are more
# sensitive to library ordering.  The following examples may only work for
# the GNU, PGI, Pathscale, and Intel compilers:
85 86
# 
# this one adds on to a variable normally used by trilinos:
87
#setenv LIBTRILINOS "-ldarshan-mpi-io"
88
#
Philip Carns's avatar
Philip Carns committed
89
# this one adds on to a variable normally used by the Scilab FFT library
90
#setenv LIBSCIFFT "-ldarshan-mpi-io"
91 92
#

93