-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hypre-multiprecision build #850
Draft
oseikuffuor1
wants to merge
11
commits into
master
Choose a base branch
from
hypre-mp-pr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0cecb9b
Added build system options for multiprecision build.
oseikuffuor1 f641c64
Added multiprecision.h file to help with code transformation.
oseikuffuor1 1d5786b
Updated blas directory to support multiprecision build.
oseikuffuor1 1493d93
Update lapack directory to support multiprecision build.
oseikuffuor1 047c2b3
Updated utilities directory to support multiprecision build (on CPU).
oseikuffuor1 9532f7b
Use correct version of autoconf to generate configure.
oseikuffuor1 eab756c
Add missing header file to include directory.
oseikuffuor1 02f4b14
Updates to fix some compile issues with --enable-mixed-precision.
oseikuffuor1 69a2e5b
Minor updates to include multiprecision.h header instead of HYPRE_uti…
oseikuffuor1 30cfbd1
Added scripts to generate multiprecision function list and write copy…
oseikuffuor1 953499c
Update multivector folder to support multiprecision build.
oseikuffuor1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
# Copyright (c) 1998 Lawrence Livermore National Security, LLC and other | ||
# HYPRE Project Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
# generate header file for transforming multiprecision function names | ||
|
||
MUP_HEADER=blas_mup_func.h | ||
|
||
cat > $MUP_HEADER <<@ | ||
/*** DO NOT EDIT THIS FILE DIRECTLY (use 'blas_func_header' to generate) ***/ | ||
@ | ||
# Generate copyright header | ||
../config/writeHeader.sh $MUP_HEADER | ||
|
||
cat >> $MUP_HEADER <<@ | ||
|
||
/****************************************************************************** | ||
* Header file for transforming multiprecision functions names | ||
*****************************************************************************/ | ||
|
||
#ifndef BLAS_MUP_FUNC_HEADER | ||
#define BLAS_MUP_FUNC_HEADER | ||
|
||
#include "multiprecision.h" | ||
|
||
@ | ||
|
||
FIN=blas_functions.saved | ||
cat>> $MUP_HEADER <<@ | ||
$( | ||
cat "$FIN" | while read -r func_name | ||
do | ||
# print dressed-up function | ||
echo "#define $func_name HYPRE_MULTIPRECISION_FUNC ( $func_name )" | ||
done | ||
) | ||
|
||
#endif | ||
@ |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to the comment for script There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
hypre_dasum | ||
hypre_daxpy | ||
hypre_dcopy | ||
hypre_ddot | ||
hypre_dgemm | ||
hypre_dgemv | ||
hypre_dger | ||
hypre_dnrm2 | ||
hypre_drot | ||
hypre_dscal | ||
hypre_dswap | ||
hypre_dsymm | ||
hypre_dsymv | ||
hypre_dsyr2 | ||
hypre_dsyr2k | ||
hypre_dsyrk | ||
hypre_dtrmm | ||
hypre_dtrmv | ||
hypre_dtrsm | ||
hypre_dtrsv | ||
hypre_d_lg10 | ||
hypre_d_sign | ||
hypre_pow_dd | ||
hypre_pow_di | ||
hypre_s_cat | ||
hypre_s_cmp | ||
hypre_s_copy | ||
hypre_idamax | ||
hypre_blas_lsame | ||
hypre_blas_xerbla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/*** DO NOT EDIT THIS FILE DIRECTLY (use 'blas_func_header' to generate) ***/ | ||
|
||
/****************************************************************************** | ||
* Copyright (c) 1998 Lawrence Livermore National Security, LLC and other | ||
* HYPRE Project Developers. See the top-level COPYRIGHT file for details. | ||
* | ||
* SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
******************************************************************************/ | ||
|
||
/****************************************************************************** | ||
* Header file for transforming multiprecision functions names | ||
*****************************************************************************/ | ||
|
||
#ifndef BLAS_MUP_FUNC_HEADER | ||
#define BLAS_MUP_FUNC_HEADER | ||
|
||
#include "multiprecision.h" | ||
|
||
#define hypre_dasum HYPRE_MULTIPRECISION_FUNC ( hypre_dasum ) | ||
#define hypre_daxpy HYPRE_MULTIPRECISION_FUNC ( hypre_daxpy ) | ||
#define hypre_dcopy HYPRE_MULTIPRECISION_FUNC ( hypre_dcopy ) | ||
#define hypre_ddot HYPRE_MULTIPRECISION_FUNC ( hypre_ddot ) | ||
#define hypre_dgemm HYPRE_MULTIPRECISION_FUNC ( hypre_dgemm ) | ||
#define hypre_dgemv HYPRE_MULTIPRECISION_FUNC ( hypre_dgemv ) | ||
#define hypre_dger HYPRE_MULTIPRECISION_FUNC ( hypre_dger ) | ||
#define hypre_dnrm2 HYPRE_MULTIPRECISION_FUNC ( hypre_dnrm2 ) | ||
#define hypre_drot HYPRE_MULTIPRECISION_FUNC ( hypre_drot ) | ||
#define hypre_dscal HYPRE_MULTIPRECISION_FUNC ( hypre_dscal ) | ||
#define hypre_dswap HYPRE_MULTIPRECISION_FUNC ( hypre_dswap ) | ||
#define hypre_dsymm HYPRE_MULTIPRECISION_FUNC ( hypre_dsymm ) | ||
#define hypre_dsymv HYPRE_MULTIPRECISION_FUNC ( hypre_dsymv ) | ||
#define hypre_dsyr2 HYPRE_MULTIPRECISION_FUNC ( hypre_dsyr2 ) | ||
#define hypre_dsyr2k HYPRE_MULTIPRECISION_FUNC ( hypre_dsyr2k ) | ||
#define hypre_dsyrk HYPRE_MULTIPRECISION_FUNC ( hypre_dsyrk ) | ||
#define hypre_dtrmm HYPRE_MULTIPRECISION_FUNC ( hypre_dtrmm ) | ||
#define hypre_dtrmv HYPRE_MULTIPRECISION_FUNC ( hypre_dtrmv ) | ||
#define hypre_dtrsm HYPRE_MULTIPRECISION_FUNC ( hypre_dtrsm ) | ||
#define hypre_dtrsv HYPRE_MULTIPRECISION_FUNC ( hypre_dtrsv ) | ||
#define hypre_d_lg10 HYPRE_MULTIPRECISION_FUNC ( hypre_d_lg10 ) | ||
#define hypre_d_sign HYPRE_MULTIPRECISION_FUNC ( hypre_d_sign ) | ||
#define hypre_pow_dd HYPRE_MULTIPRECISION_FUNC ( hypre_pow_dd ) | ||
#define hypre_pow_di HYPRE_MULTIPRECISION_FUNC ( hypre_pow_di ) | ||
#define hypre_s_cat HYPRE_MULTIPRECISION_FUNC ( hypre_s_cat ) | ||
#define hypre_s_cmp HYPRE_MULTIPRECISION_FUNC ( hypre_s_cmp ) | ||
#define hypre_s_copy HYPRE_MULTIPRECISION_FUNC ( hypre_s_copy ) | ||
#define hypre_idamax HYPRE_MULTIPRECISION_FUNC ( hypre_idamax ) | ||
#define hypre_blas_lsame HYPRE_MULTIPRECISION_FUNC ( hypre_blas_lsame ) | ||
#define hypre_blas_xerbla HYPRE_MULTIPRECISION_FUNC ( hypre_blas_xerbla ) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# Copyright (c) 1998 Lawrence Livermore National Security, LLC and other | ||
# HYPRE Project Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
# generate file containing function names in current folder. | ||
# This will be used to generate a header file for transforming | ||
# multiprecision function names. It will also be useful for | ||
# regression testing for the multiprecision build. | ||
# | ||
# NOTE: It must be run on symbols generated from the | ||
# non-multiprecision build of hypre. | ||
|
||
rootdir=$PWD | ||
rootdir="${rootdir%/}" | ||
rootname="${rootdir##*/}" | ||
|
||
## extract function names and remove leading and trailing underscores, if any | ||
## To include local functions (static functions) test on $2=="t" as well | ||
nm -A --defined-only *.o* | awk -F'[ ]' '$2=="T"{print $3}' | sed 's/_*//;s/_*$//' > ${rootname}_functions.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
# Copyright (c) 1998 Lawrence Livermore National Security, LLC and other | ||
# HYPRE Project Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
FNAME=$1 | ||
cat >> $FNAME <<@ | ||
|
||
/****************************************************************************** | ||
* Copyright (c) 1998 Lawrence Livermore National Security, LLC and other | ||
* HYPRE Project Developers. See the top-level COPYRIGHT file for details. | ||
* | ||
* SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
******************************************************************************/ | ||
@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be merged with the
headers
script approach we are gradually adopting throughout hypre. That way the internal header file for each subdirectory in hypre is always done in the same way.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rfalgout Yes, I agree we can do that. Not all the subdirectories have this headers script, but perhaps this could force us to head in that direction.