Skip to content

Commit

Permalink
Merge pull request #169 from ammarhakim/update-openblas
Browse files Browse the repository at this point in the history
Update build-openblas.sh

I checked the build on macos, Perlmutter and stellar-intel. They all work and the relevant tests still pass.
  • Loading branch information
manauref authored Jul 11, 2023
2 parents 4170dfe + 6306ef2 commit e342f96
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
10 changes: 5 additions & 5 deletions install-deps/build-openblas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source ./build-opts.sh

# Edit to suite your system
PREFIX=$GKYLSOFT/OpenBLAS-0.3.15
PREFIX=$GKYLSOFT/OpenBLAS-0.3.23
# Location where dependency sources will be downloaded
DEP_SOURCES=$GKYLSOFT/dep_src/

Expand All @@ -15,15 +15,15 @@ then
echo "Downloading OpenBLAS .."
# delete old checkout and builds
rm -rf OpenBLAS-*
curl -L https://github.com/xianyi/OpenBLAS/releases/download/v0.3.15/OpenBLAS-0.3.15.tar.gz > OpenBLAS-0.3.15.tar.gz
curl -L https://github.com/xianyi/OpenBLAS/releases/download/v0.3.23/OpenBLAS-0.3.23.tar.gz > OpenBLAS-0.3.23.tar.gz
fi

if [ "$BUILD_PKGS" = "yes" ]
then
echo "Building OpenBLAS .."
gunzip -f OpenBLAS-0.3.15.tar.gz
tar xvf OpenBLAS-0.3.15.tar
cd OpenBLAS-0.3.15
gunzip -f OpenBLAS-0.3.23.tar.gz
tar xvf OpenBLAS-0.3.23.tar
cd OpenBLAS-0.3.23
make USE_OPENMP=0 NUM_THREADS=1 FC=$FC -j 32
make USE_OPENMP=0 NUM_THREADS=1 install PREFIX=$PREFIX -j 32

Expand Down
1 change: 1 addition & 0 deletions machines/configure.macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./configure --prefix=$HOME/gkylsoft
2 changes: 2 additions & 0 deletions machines/mkdeps.macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd install-deps
./mkdeps.sh --build-openblas=yes --build-superlu=yes --prefix=$HOME/gkylsoft
8 changes: 4 additions & 4 deletions unit/ctest_math.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test_ridders()
double f1 = rfunc_1(x1, 0), f2 = rfunc_1(x2, 0);
struct gkyl_qr_res res = gkyl_ridders(rfunc_1, 0, x1, x2, f1, f2,
100, 1e-12);
show_qr_res(res, "rfunc_1");
// show_qr_res(res, "rfunc_1");
TEST_CHECK( gkyl_compare(res.res, 1.0, 1e-10) );
} while(0);

Expand All @@ -98,7 +98,7 @@ test_ridders()
double f1 = rfunc_1(x1, 0), f2 = rfunc_1(x2, 0);
struct gkyl_qr_res res = gkyl_ridders(rfunc_1, 0, x1, x2, f1, f2,
100, 1e-12);
show_qr_res(res, "rfunc_1");
// show_qr_res(res, "rfunc_1");
TEST_CHECK( gkyl_compare(res.res, -1.0, 1e-10) );
} while(0);

Expand All @@ -107,7 +107,7 @@ test_ridders()
double f1 = rfunc_2(x1, 0), f2 = rfunc_2(x2, 0);
struct gkyl_qr_res res = gkyl_ridders(rfunc_2, 0, x1, x2, f1, f2,
100, 1e-12);
show_qr_res(res, "rfunc_2");
// show_qr_res(res, "rfunc_2");
TEST_CHECK( gkyl_compare(res.res, 0.0, 1e-10) );
} while(0);

Expand All @@ -116,7 +116,7 @@ test_ridders()
double f1 = rfunc_3(x1, 0), f2 = rfunc_3(x2, 0);
struct gkyl_qr_res res = gkyl_ridders(rfunc_3, 0, x1, x2, f1, f2,
100, 1e-12);
show_qr_res(res, "rfunc_3");
// show_qr_res(res, "rfunc_3");
TEST_CHECK( gkyl_compare(res.res, 1.745528002740699, 1e-10) );
} while(0);
}
Expand Down
8 changes: 4 additions & 4 deletions unit/ctest_null_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ test_2d()

const double *f = gkyl_array_cfetch(arr, lidx);

printf("%d: idx(%d,%d) : (%d,%d) == (%g, %g)\n",
count++, iter.idx[0], iter.idx[1],
idx[0], idx[1],
f[0], f[1]);
// printf("%d: idx(%d,%d) : (%d,%d) == (%g, %g)\n",
// count++, iter.idx[0], iter.idx[1],
// idx[0], idx[1],
// f[0], f[1]);

/* for (int n=0; n<local.ndim; ++n) */
/* TEST_CHECK( idx[n] == f[n] ); */
Expand Down

0 comments on commit e342f96

Please sign in to comment.