Skip to content

Commit ff7a19f

Browse files
committed
add rpath variables to cmake build
1 parent f45ba89 commit ff7a19f

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,12 +468,16 @@ FILE(READ "${CMAKE_CURRENT_BINARY_DIR}/libpio.settings"
468468
LIBPIO_SETTINGS)
469469
MESSAGE(STATUS ${LIBPIO_SETTINGS})
470470

471+
# Set RPATH for shared libraries
472+
set(CMAKE_MACOSX_RPATH 1)
473+
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
474+
471475
# Install libpio.settings file into same location
472476
# as the libraries.
473477
INSTALL(FILES "${PIO_BINARY_DIR}/libpio.settings"
474478
DESTINATION lib
475479
COMPONENT libraries)
476-
480+
477481
#####
478482
# Create pio_meta.h include file.
479483
#####

src/clib/pio_internal.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
#include <limits.h>
1818
#include <math.h>
1919
#include <netcdf.h>
20-
#ifdef _NETCDF4
21-
#include <netcdf_par.h>
20+
#ifdef PIO_HAS_PAR_FILTERS
2221
#include <netcdf_filter.h>
2322
#include <netcdf_meta.h>
2423
#endif
24+
#ifdef _NETCDF4
25+
#include <netcdf_par.h>
26+
#endif
2527
#ifdef _PNETCDF
2628
#include <pnetcdf.h>
2729
#endif

tests/performance/pioperformance.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, &
149149
integer(kind=PIO_Offset_kind) :: maplen, gmaplen
150150
integer :: ndims
151151
integer, pointer :: gdims(:)
152-
character(len=20) :: fname
152+
character(len=24) :: fname
153153
type(var_desc_t) :: vari(nvars), varr(nvars), vard(nvars)
154154
type(iosystem_desc_t) :: iosystem
155155
integer :: stride, n
@@ -260,7 +260,7 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, &
260260

261261
call pio_init(mype, comm, ntasks, 0, stride, PIO_REARR_SUBSET, iosystem)
262262

263-
write(fname, '(a,i1,a,i4.4,a,i1,a)') 'pioperf.',rearr,'-',ntasks,'-',iotype,'.nc'
263+
write(fname, '(a,i1,a,i6.6,a,i1,a)') 'pioperf.',rearr,'-',ntasks,'-',iotype,'.nc'
264264

265265
ierr = PIO_CreateFile(iosystem, File, iotype, trim(fname), mode)
266266

@@ -357,7 +357,7 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, &
357357
end if
358358
! Now the Read
359359

360-
write(fname, '(a,i1,a,i4.4,a,i1,a)') 'pioperf.',rearr,'-',ntasks,'-',iotype,'.nc'
360+
write(fname, '(a,i1,a,i6.6,a,i1,a)') 'pioperf.',rearr,'-',ntasks,'-',iotype,'.nc'
361361

362362
ierr = PIO_OpenFile(iosystem, File, iotype, trim(fname), mode=PIO_NOWRITE);
363363
do nv=1,nvars
@@ -396,7 +396,7 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, &
396396
#ifdef VARINT
397397
call PIO_setframe(File, vari(nv), frame)
398398
call pio_read_darray(File, vari(nv), iodesc_i4, ifld_in(:,nv,frame), ierr)
399-
print *,__FILE__,__LINE__,size(ifld_in),ifld_in(1,1,1)
399+
! print *,__FILE__,__LINE__,size(ifld_in),ifld_in(1,1,1)
400400
#endif
401401
#ifdef VARREAL
402402
call PIO_setframe(File, varr(nv), frame)

0 commit comments

Comments
 (0)