-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added ability to compile with the NVIDIA cuSparse library for ~2x performance boost when using NVIDIA GPUs. See the new build.sh for details. - Converted most OpenACC `do` loops to `do concurrent`. Requires adding the `-stdpar=gpu` flag for the nvfortran compiler. - Added/updated some python scripts and updated README and build instructions.
- Loading branch information
Showing
7 changed files
with
702 additions
and
236 deletions.
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,56 @@ | ||
#!/usr/bin/env python | ||
import h5py as h5 | ||
import numpy as np | ||
import argparse | ||
import psihdf as ps | ||
|
||
def argParsing(): | ||
|
||
parser = argparse.ArgumentParser(description='Read PSI POT3D 3D hdf5 data.') | ||
|
||
parser.add_argument("psi_3D_hdf5_file_name", | ||
help='Name of 3D PSI POT3D HDF5 file (e.g. br.h5).') | ||
|
||
args = parser.parse_args() | ||
|
||
return parser.parse_args() | ||
|
||
def main(): | ||
|
||
## Get input agruments: | ||
args = argParsing() | ||
|
||
rvec, tvec, pvec, data = ps.rdhdf_3d(args.psi_3D_hdf5_file_name) | ||
|
||
rmin = np.min(rvec) | ||
rmax = np.max(rvec) | ||
tmin = np.min(tvec) | ||
tmax = np.max(tvec) | ||
pmin = np.min(pvec) | ||
pmax = np.max(pvec) | ||
|
||
NR = rvec.size | ||
NT = tvec.size | ||
NP = pvec.size | ||
|
||
print('Opened file:'+args.psi_3D_hdf5_file_name) | ||
print('NR: '+str(NR)) | ||
print('NT: '+str(NT)) | ||
print('NP: '+str(NP)) | ||
print('min(r): '+str(np.min(rvec))) | ||
print('max(r): '+str(np.max(rvec))) | ||
print('min(theta): '+str(np.min(tvec))) | ||
print('max(theta): '+str(np.max(tvec))) | ||
print('min(phi): '+str(np.min(pvec))) | ||
print('max(phi): '+str(np.max(pvec))) | ||
print('min(data): '+str(np.min(data))) | ||
print('max(data): '+str(np.max(data))) | ||
print('mean(data): '+str(np.mean(data))) | ||
print('Example data point:') | ||
print('{}\t{}\t{}\t{}'.format('r[3]', 'theta[4]', 'phi[5]', 'data[5,4,3]')) | ||
print('{}\t{}\t{}\t{}'.format(rvec[3], tvec[4], pvec[5], data[5,4,3])) | ||
|
||
if __name__ == '__main__': | ||
main() | ||
|
||
|
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.