Skip to content

Commit

Permalink
Merge pull request #1997 from briandobbins/qsort_comparator_64bit_fix
Browse files Browse the repository at this point in the history
Fixes in issue in the qsort comparison function
  • Loading branch information
jedwards4b authored Jan 29, 2025
2 parents 09dcc06 + a89f820 commit a844617
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 241 deletions.
3 changes: 3 additions & 0 deletions .github/actions/buildhdf5/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ runs:
-DHDF5_ENABLE_PARALLEL=${{ inputs.enable_parallel }} \
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
-DBUILD_TESTING=${{ inputs.enable_testing }} \
-DHDF5_ENABLE_DEPRICATED_SYMBOLS=OFF \
-DHDF5_BUILD_EXAMPLES=OFF \
-DHDF5_BUILD_TOOLS=OFF \
-DCMAKE_BUILD_TYPE=REL \
../
make
make install
20 changes: 9 additions & 11 deletions .github/actions/intelcompilers/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@ description: 'Install Intel Compilers'
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup repo
shell: bash
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
#wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
#sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
#rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
- name: install
shell: bash
run: |
sudo apt-get install -y intel-oneapi-common-vars
sudo apt-get install -y intel-oneapi-compiler-fortran
sudo apt-get install -y intel-oneapi-mkl
sudo apt-get install -y intel-oneapi-mpi
sudo apt-get install -y intel-oneapi-mpi-devel
sudo apt-get install intel-oneapi-hpc-toolkit
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
source /opt/intel/oneapi/compiler/latest/env/vars.sh intel64
4 changes: 2 additions & 2 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
LDFLAGS: "-L/usr/lib/x86_64-linux-gnu -lnetcdf_mpi -lpnetcdf"
FCFLAGS: "-Wall -Werror -fallow-argument-mismatch -Wno-conversion"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installs
run: |
set -x
Expand Down Expand Up @@ -54,4 +54,4 @@ jobs:
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# uses: mxschmitt/action-tmate@v4
131 changes: 0 additions & 131 deletions .github/workflows/intel.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/withspack.yml

This file was deleted.

24 changes: 12 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ include(CheckSymbolExists)

# Determine the configure date.
IF(DEFINED ENV{SOURCE_DATE_EPOCH})
EXECUTE_PROCESS(
COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}"
OUTPUT_VARIABLE CONFIG_DATE
)
EXECUTE_PROCESS(
COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}"
OUTPUT_VARIABLE CONFIG_DATE
)
ELSE()
EXECUTE_PROCESS(
COMMAND date
OUTPUT_VARIABLE CONFIG_DATE
)
EXECUTE_PROCESS(
COMMAND date
OUTPUT_VARIABLE CONFIG_DATE
)
ENDIF()
IF(CONFIG_DATE)
string(STRIP ${CONFIG_DATE} CONFIG_DATE)
string(STRIP ${CONFIG_DATE} CONFIG_DATE)
ENDIF()

# A function used to create autotools-style 'yes/no' definitions.
Expand Down Expand Up @@ -363,9 +363,9 @@ if (HAVE_NETCDF_PAR)
#if !NC_HAS_PAR_FILTERS
choke me
#endif
int main() {return 0;}" HAVE_PAR_FILTERS)
int main() {return 0;}" PIO_HAS_PAR_FILTERS)
else()
set(HAVE_PAR_FILTERS 0)
set(PIO_HAS_PAR_FILTERS 0)
endif()

###
Expand Down Expand Up @@ -486,7 +486,7 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
INSTALL(FILES "${PIO_BINARY_DIR}/libpio.settings"
DESTINATION lib
COMPONENT libraries)

#####
# Create pio_meta.h include file.
#####
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fi
LD=ld # Required for MPE to work.
LT_INIT

# Find and learn about install
# Find and learn about install
AC_PROG_INSTALL

# Find and learn about the C compiler.
Expand Down Expand Up @@ -294,7 +294,7 @@ AC_MSG_CHECKING([whether netCDF provides parallel filter support])
AC_CHECK_LIB([netcdf], [nc_inq_filter_avail], [have_par_filters=yes], [have_par_filters=no])
AC_MSG_RESULT([${have_par_filters}])
if test "x$have_par_filters" = xyes ; then
AC_DEFINE([HAVE_PAR_FILTERS], [1], [if true, netcdf-c supports filters with parallel I/O])
AC_DEFINE([PIO_HAS_PAR_FILTERS], [1], [if true, netcdf-c supports filters with parallel I/O])
fi

# Is this version 4.7.2, which does not work?
Expand Down Expand Up @@ -472,8 +472,8 @@ AC_CONFIG_HEADERS([config.h])

# Create the makefiles.
AC_CONFIG_FILES(Makefile
src/Makefile
src/clib/Makefile
src/Makefile
src/clib/Makefile
src/ncint/Makefile
src/flib/Makefile
src/gptl/Makefile
Expand Down
5 changes: 4 additions & 1 deletion src/clib/pio_rearrange.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,10 @@ compare_offsets(const void *a, const void *b)
mapsort *y = (mapsort *)b;
if (!x || !y)
return 0;
return (int)(x->iomap - y->iomap);

if (x->iomap < y->iomap) { return -1; }
if (x->iomap > y->iomap) { return 1; }
return 0;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/flib/pio_nf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,19 @@ module pio_nf
#ifdef NC_HAS_QUANTIZE
interface pio_def_var_quantize
module procedure &
def_var_quantize_desc , &
def_var_quantize_desc, &
def_var_quantize_id
end interface pio_def_var_quantize
interface pio_inq_var_quantize
module procedure &
inq_var_quantize_desc , &
inq_var_quantize_desc, &
inq_var_quantize_id
end interface pio_inq_var_quantize
#endif
#ifdef PIO_HAS_PAR_FILTERS
interface pio_inq_var_filter_ids
module procedure &
inq_var_filter_ids_desc , &
inq_var_filter_ids_desc , &
inq_var_filter_ids_id
end interface pio_inq_var_filter_ids
interface pio_inq_var_filter_info
Expand Down

0 comments on commit a844617

Please sign in to comment.