Commit 3559fa16 authored by Carl Poelking's avatar Carl Poelking
Browse files

Changes for cluster integration.

parent bb674c8c
......@@ -44,16 +44,16 @@ if (GSL_FOUND)
find_package_handle_standard_args(GSLCBLAS DEFAULT_MSG GSLCBLAS_LIBRARY)
if (GSLCBLAS_FOUND)
check_library_exists("${GSLCBLAS_LIBRARY};${MATH_LIBRARIES}" cblas_dsyrk "" FOUND_DSYRK)
if(NOT FOUND_DSYRK)
message(FATAL_ERROR "Could not find cblas_dsyrk in ${GSLCBLAS_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you are using a static lib (.a) make sure you have specified all dependencies of libcblas in GSLCBLAS_LIBRARY by hand (i.e. -DGSLCBLAS_LIBRARY='/path/to/libcblas.so;/path/to/libm.so')! If your gsl was build against an different version of cblas, specify it in GSLCBLAS_LIBRARY")
endif(NOT FOUND_DSYRK)
#if(NOT FOUND_DSYRK)
# message(FATAL_ERROR "Could not find cblas_dsyrk in ${GSLCBLAS_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you are using a static lib (.a) make sure you have specified all dependencies of libcblas in GSLCBLAS_LIBRARY by hand (i.e. -DGSLCBLAS_LIBRARY='/path/to/libcblas.so;/path/to/libm.so')! If your gsl was build against an different version of cblas, specify it in GSLCBLAS_LIBRARY")
#endif(NOT FOUND_DSYRK)
set(GSL_LIBRARIES "${GSL_LIBRARY};${GSLCBLAS_LIBRARY}")
check_library_exists("${GSL_LIBRARIES};${MATH_LIBRARIES}" gsl_linalg_QR_lssolve "" FOUND_QR_DECOMP_AGAIN)
endif(GSLCBLAS_FOUND)
endif(NOT FOUND_QR_DECOMP)
if(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you are using a static lib (.a) make sure you have specified all dependencies of libgsl in GSL_LIBRARY by hand (i.e. -DGSL_LIBRARY='/path/to/libgsl.so;/path/to/libm.so') !")
endif(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
#if(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
# message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you are using a static lib (.a) make sure you have specified all dependencies of libgsl in GSL_LIBRARY by hand (i.e. -DGSL_LIBRARY='/path/to/libgsl.so;/path/to/libm.so') !")
#endif(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
endif (GSL_FOUND)
mark_as_advanced(GSL_INCLUDE_DIR GSL_LIBRARY)
......@@ -685,7 +685,7 @@ class ParticleGraph(object):
elif descriptor_type == 'npy_load':
folder = options_descriptor["folder"]
npy_file = '%s/%s.x.npy' % (folder, self.label)
print npy_file
#print npy_file
P = np.load(npy_file)
dim = P.shape[1]
assert P.shape[0] == n_atoms
......
......@@ -6,8 +6,12 @@ def subsample_array(array, n_select, method='stride', stride_shift=0):
n_data = len(array)
else:
n_data = array.shape[0]
# Treat border cases
if n_select >= n_data:
return array, []
elif n_select <= 0:
return [], array
n_discard = n_data - n_select
assert n_discard >= 0 # Trying to select more data than available?
# Subsample
if method == 'random':
# Random access indices
......
......@@ -51,7 +51,7 @@ def structure_from_ase(
frag_labels = []
atom_labels = []
# System properties
label = config.info['label']
label = str(config.info['label'])
positions = config.get_positions()
types = config.get_chemical_symbols()
if log: log << log.back << "Reading '%s'" % label << log.flush
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment