using hdf5 wrapper for compilation of subroutines

This commit is contained in:
Martin Diehl 2018-11-21 00:00:18 +01:00
parent d110534eca
commit f51aafabdd
2 changed files with 19 additions and 5 deletions

View File

@ -13,12 +13,14 @@
import os, re, glob, driverUtils
from damask import version as DAMASKVERSION
from damask import Environment
myEnv = damask.Environment()
myEnv = Environment()
if myEnv.options['DAMASK_HDF5'] == 'ON':
# use hdf5 compiler wrapper in $PATH
fortCmd = os.popen('h5fc -shlib -show').read().replace('\n','')
else
fortCmd = os.popen('h5fc -shlib -show').read().replace('\n','') # complicated way needed to pass in DAMASKVERSION string
link_sl += fortCmd.split()[1:]
fortCmd +=" -DDAMASKHDF5"
else:
# Use the version in $PATH
fortCmd = "ifort"
@ -56,4 +58,6 @@ ask_delete=OFF
# Remove the temporary names from the namespace
del fortCmd
del Environment
del myEnv
del DAMASKVERSION

View File

@ -12,9 +12,17 @@
#
import os, re, glob, driverUtils
from damask import version as DAMASKVERSION
from damask import Environment
myEnv = Environment()
# Use the version in $PATH
fortCmd = "ifort"
if myEnv.options['DAMASK_HDF5'] == 'ON':
# use hdf5 compiler wrapper in $PATH
fortCmd = os.popen('h5fc -shlib -show').read().replace('\n','') # complicated way needed to pass in DAMASKVERSION string
link_sl += fortCmd.split()[1:]
fortCmd +=" -DDAMASKHDF5"
else:
# Use the version in $PATH
fortCmd = "ifort"
# -free to use free-format FORTRAN 90 syntax
# -O <0-3> optimization level
@ -55,4 +63,6 @@ ask_delete=OFF
# Remove the temporary names from the namespace
del fortCmd
del Environment
del myEnv
del DAMASKVERSION