-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c82ff42
commit 7ce3086
Showing
3 changed files
with
288 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#============================================================================== | ||
# | ||
# OpenSees -- Open System For Earthquake Engineering Simulation | ||
# Pacific Earthquake Engineering Research Center | ||
# | ||
# (c) Copyright 1999-2021 The Regents of the University of California | ||
# All Rights Reserved | ||
# (Copyright and Disclaimer @ http://www.berkeley.edu/OpenSees/copyright.html) | ||
# | ||
#------------------------------------------------------------------------------ | ||
# Claudio Perez | ||
|
||
project(AMD) | ||
|
||
add_library(AMD) | ||
|
||
add_compiler_flags(-fexceptions -fPIC -I.) | ||
|
||
#------------------------------------------------------------------------------- | ||
# source files | ||
#------------------------------------------------------------------------------- | ||
target_sources(AMD | ||
amd_aat.c amd_1.c amd_2.c amd_dump.c amd_postorder.c amd_post_tree.c amd_defaults.c \ | ||
amd_order.c amd_control.c amd_info.c amd_valid.c amd_preprocess | ||
) | ||
|
||
|
||
|
||
#AMDI = $(addsuffix .o, $(subst amd_,amd_i_,$(AMD))) | ||
#AMDL = $(addsuffix .o, $(subst amd_,amd_l_,$(AMD))) | ||
|
||
#------------------------------------------------------------------------------- | ||
# compile each int and long routine (with no real/complex version) | ||
#------------------------------------------------------------------------------- | ||
|
||
amd_i_%.o: amd_%.c $(INC) | ||
$(C) -DDINT -c $< -o $@ | ||
|
||
# amd_l_%.o: amd_%.c $(INC) | ||
# $(C) -DDLONG -c $< -o $@ | ||
|
||
$(AMD_LIBRARY): $(AMDI) SuiteSparse_config.o | ||
@$(RM) $(RMFLAGS) $(AMD_LIBRARY) | ||
@$(AR) $(ARFLAGS) $(AMD_LIBRARY) $(AMDI) SuiteSparse_config.o | ||
@$(RANLIB) $(AMD_LIBRARY) | ||
|
||
|
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,91 @@ | ||
####################################################################### | ||
# This is the makefile to create a library for C-BLAS. | ||
# The files are organized as follows: | ||
# | ||
# SBLAS1 -- Single precision real BLAS routines | ||
# CBLAS1 -- Single precision complex BLAS routines | ||
# DBLAS1 -- Double precision real BLAS routines | ||
# ZBLAS1 -- Double precision complex BLAS routines | ||
# | ||
# CB1AUX -- Real BLAS routines called by complex routines | ||
# ZB1AUX -- D.P. real BLAS routines called by d.p. complex | ||
# routines | ||
# | ||
# ALLBLAS -- Auxiliary routines for Level 2 and 3 BLAS | ||
# | ||
# SBLAS2 -- Single precision real BLAS2 routines | ||
# CBLAS2 -- Single precision complex BLAS2 routines | ||
# DBLAS2 -- Double precision real BLAS2 routines | ||
# ZBLAS2 -- Double precision complex BLAS2 routines | ||
# | ||
# SBLAS3 -- Single precision real BLAS3 routines | ||
# CBLAS3 -- Single precision complex BLAS3 routines | ||
# DBLAS3 -- Double precision real BLAS3 routines | ||
# ZBLAS3 -- Double precision complex BLAS3 routines | ||
# | ||
# The library can be set up to include routines for any combination | ||
# of the four precisions. To create or add to the library, enter make | ||
# followed by one or more of the precisions desired. Some examples: | ||
# make single | ||
# make single complex | ||
# make single double complex complex16 | ||
# Alternatively, the command | ||
# make | ||
# without any arguments creates a library of all four precisions. | ||
# The library is called | ||
# blas.a | ||
# and is created at the next higher directory level. | ||
# | ||
# To remove the object files after the library is created, enter | ||
# make clean | ||
# | ||
####################################################################### | ||
|
||
MYSBLAS2 = smyblas2.o | ||
MYDBLAS2 = dmyblas2.o | ||
MYCBLAS2 = cmyblas2.o | ||
MYZBLAS2 = zmyblas2.o | ||
|
||
SBLAS1 = isamax.o sasum.o saxpy.o scopy.o sdot.o snrm2.o \ | ||
srot.o sscal.o | ||
SBLAS2 = sgemv.o ssymv.o strsv.o sger.o ssyr2.o | ||
|
||
DBLAS1 = idamax.o dasum.o daxpy.o dcopy.o ddot.o dnrm2.o \ | ||
drot.o dscal.o | ||
DBLAS2 = dgemv.o dsymv.o dtrsv.o dger.o dsyr2.o | ||
|
||
CBLAS1 = icamax.o scasum.o caxpy.o ccopy.o scnrm2.o \ | ||
cscal.o | ||
CBLAS2 = cgemv.o chemv.o ctrsv.o cgerc.o cher2.o | ||
|
||
ZBLAS1 = izamax.o dzasum.o zaxpy.o zcopy.o dznrm2.o \ | ||
zscal.o dcabs1.o | ||
ZBLAS2 = zgemv.o zhemv.o ztrsv.o zgerc.o zher2.o | ||
|
||
|
||
all: double | ||
|
||
single: $(SBLAS1) $(SBLAS2) $(SBLAS3) $(MYSBLAS2) | ||
$(AR) $(ARFLAGS) $(CBLAS_LIBRARY) $(SBLAS1) $(ALLBLAS) \ | ||
$(SBLAS2) $(SBLAS3) $(MYSBLAS2) | ||
$(RANLIB) $(RANLIBFLAGS) $(CBLAS_LIBRARY) | ||
|
||
double: $(DBLAS1) $(DBLAS2) $(DBLAS3) $(MYDBLAS2) | ||
$(AR) $(ARFLAGS) $(CBLAS_LIBRARY) $(DBLAS1) $(ALLBLAS) \ | ||
$(DBLAS2) $(DBLAS3) $(MYDBLAS2) | ||
$(RANLIB) $(RANLIBFLAGS) $(CBLAS_LIBRARY) | ||
|
||
complex: $(CBLAS1) $(CBLAS2) $(CBLAS3) $(MYCBLAS2) | ||
$(AR) $(ARFLAGS) $(CBLAS_LIBRARY) $(CBLAS1) $(ALLBLAS) \ | ||
$(CBLAS2) $(CBLAS3) $(MYCBLAS2) | ||
$(RANLIB) $(RANLIBFLAGS) $(CBLAS_LIBRARY) | ||
|
||
complex16: $(ZBLAS1) $(ZBLAS2) $(ZBLAS3) $(MYZBLAS2) | ||
$(AR) $(ARFLAGS) $(CBLAS_LIBRARY) $(ZBLAS1) $(ALLBLAS) \ | ||
$(ZBLAS2) $(ZBLAS3) $(MYZBLAS2) | ||
$(RANLIB) $(RANLIBFLAGS) $(CBLAS_LIBRARY) | ||
|
||
clean: | ||
$(RM) $(RMFLAGS) *.o | ||
|
||
wipe: clean |
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,150 @@ | ||
include ../../Makefile.def | ||
|
||
I = -I. -I../AMD | ||
C = $(CC) $(OPT_FLAG) -fexceptions -fPIC -DNCHOLMOD $(I) | ||
|
||
#------------------------------------------------------------------------------- | ||
# source files | ||
#------------------------------------------------------------------------------- | ||
|
||
# non-user-callable umf_*.[ch] files: | ||
UMFCH = umf_assemble umf_blas3_update umf_build_tuples umf_create_element \ | ||
umf_extend_front umf_garbage_collection umf_get_memory \ | ||
umf_init_front umf_kernel umf_kernel_init umf_kernel_wrapup \ | ||
umf_local_search umf_lsolve umf_ltsolve umf_mem_alloc_element \ | ||
umf_mem_alloc_head_block umf_mem_alloc_tail_block \ | ||
umf_mem_free_tail_block umf_mem_init_memoryspace \ | ||
umf_report_vector umf_row_search umf_scale_column \ | ||
umf_set_stats umf_solve umf_symbolic_usage umf_transpose \ | ||
umf_tuple_lengths umf_usolve umf_utsolve umf_valid_numeric \ | ||
umf_valid_symbolic umf_grow_front umf_start_front \ | ||
umf_store_lu umf_scale | ||
|
||
# non-user-callable umf_*.[ch] files, int/SuiteSparse_long versions only | ||
# (no real/complex): | ||
UMFINT = umf_analyze umf_apply_order umf_colamd umf_free umf_fsize \ | ||
umf_is_permutation umf_malloc umf_realloc umf_report_perm \ | ||
umf_singletons umf_cholmod | ||
|
||
# non-user-callable, created from umf_ltsolve.c, umf_utsolve.c, | ||
# umf_triplet.c, and umf_assemble.c , with int/SuiteSparse_long | ||
# and real/complex versions: | ||
UMF_CREATED = umf_lhsolve umf_uhsolve umf_triplet_map_nox \ | ||
umf_triplet_nomap_x umf_triplet_nomap_nox umf_triplet_map_x \ | ||
umf_assemble_fixq umf_store_lu_drop | ||
|
||
# non-user-callable, int/SuiteSparse_long and real/complex versions: | ||
UMF = $(UMF_CREATED) $(UMFCH) | ||
|
||
# user-callable umfpack_*.[ch] files (int/SuiteSparse_long and real/complex): | ||
UMFPACK = umfpack_col_to_triplet umfpack_defaults umfpack_free_numeric \ | ||
umfpack_free_symbolic umfpack_get_numeric umfpack_get_lunz \ | ||
umfpack_get_symbolic umfpack_get_determinant umfpack_numeric \ | ||
umfpack_qsymbolic umfpack_report_control umfpack_report_info \ | ||
umfpack_report_matrix umfpack_report_numeric umfpack_report_perm \ | ||
umfpack_report_status umfpack_report_symbolic umfpack_report_triplet \ | ||
umfpack_report_vector umfpack_solve umfpack_symbolic \ | ||
umfpack_transpose umfpack_triplet_to_col umfpack_scale \ | ||
umfpack_load_numeric umfpack_save_numeric \ | ||
umfpack_load_symbolic umfpack_save_symbolic | ||
|
||
# user-callable, created from umfpack_solve.c (umfpack_wsolve.h exists, though): | ||
# with int/SuiteSparse_long and real/complex versions: | ||
UMFPACKW = umfpack_wsolve | ||
|
||
USER = $(UMFPACKW) $(UMFPACK) | ||
|
||
# user-callable, only one version for int/SuiteSparse_long, | ||
# real/complex, *.[ch] files: | ||
GENERIC = umfpack_timer umfpack_tictoc | ||
|
||
#------------------------------------------------------------------------------- | ||
# include files: | ||
#------------------------------------------------------------------------------- | ||
|
||
INC = umfpack.h ../AMD/SuiteSparse_config.h \ | ||
umf_config.h umf_version.h \ | ||
umf_internal.h umf_triplet.h \ | ||
$(addprefix ./, $(addsuffix .h,$(UMFCH))) \ | ||
$(addprefix ./, $(addsuffix .h,$(UMFINT))) \ | ||
$(addprefix ./, $(addsuffix .h,$(USER))) \ | ||
$(addprefix ./, $(addsuffix .h,$(GENERIC))) \ | ||
../AMD/amd_internal.h ../AMD/amd.h | ||
|
||
#------------------------------------------------------------------------------- | ||
# object files for each version | ||
#------------------------------------------------------------------------------- | ||
UMFPACK_DI = $(addsuffix .o, $(subst umf_,umf_di_,$(UMF)) $(subst umfpack_,umfpack_di_,$(USER))) | ||
UMFPACK_II = $(addsuffix .o, $(subst umf_,umf_i_,$(UMFINT))) | ||
UMFPACK_GN = $(addsuffix .o, $(subst umfpack_,umfpack_gn_,$(GENERIC))) | ||
|
||
|
||
# obj | ||
UMFPACK_OBJ = $(UMFPACK_DI) $(UMFPACK_II) $(UMFPACK_GN) | ||
|
||
|
||
|
||
all: umfpack | ||
|
||
#------------------------------------------------------------------------------- | ||
# compile each int and SuiteSparse_long routine (with no real/complex version) | ||
#------------------------------------------------------------------------------- | ||
|
||
umf_i_%.o: umf_%.c $(INC) | ||
$(C) -DDINT -c $< -o $@ | ||
|
||
#------------------------------------------------------------------------------- | ||
# compile each routine in the DI version | ||
#------------------------------------------------------------------------------- | ||
|
||
umf_di_%.o: umf_%.c $(INC) | ||
$(C) -DDINT -c $< -o $@ | ||
|
||
umf_di_%hsolve.o: umf_%tsolve.c $(INC) | ||
$(C) -DDINT -DCONJUGATE_SOLVE -c $< -o $@ | ||
|
||
umf_di_triplet_map_x.o: umf_triplet.c $(INC) | ||
$(C) -DDINT -DDO_MAP -DDO_VALUES -c $< -o $@ | ||
|
||
umf_di_triplet_map_nox.o: umf_triplet.c $(INC) | ||
$(C) -DDINT -DDO_MAP -c $< -o $@ | ||
|
||
umf_di_triplet_nomap_x.o: umf_triplet.c $(INC) | ||
$(C) -DDINT -DDO_VALUES -c $< -o $@ | ||
|
||
umf_di_triplet_nomap_nox.o: umf_triplet.c $(INC) | ||
$(C) -DDINT -c $< -o $@ | ||
|
||
umf_di_assemble_fixq.o: umf_assemble.c $(INC) | ||
$(C) -DDINT -DFIXQ -c $< -o $@ | ||
|
||
umf_di_store_lu_drop.o: umf_store_lu.c $(INC) | ||
$(C) -DDINT -DDROP -c $< -o $@ | ||
|
||
umfpack_di_wsolve.o: umfpack_solve.c $(INC) | ||
$(C) -DDINT -DWSOLVE -c $< -o $@ | ||
|
||
umfpack_di_%.o: umfpack_%.c $(INC) | ||
$(C) -DDINT -c $< -o $@ | ||
|
||
#------------------------------------------------------------------------------- | ||
# Create the generic routines (GN) using a generic rule | ||
#------------------------------------------------------------------------------- | ||
|
||
umfpack_gn_%.o: umfpack_%.c $(INC) | ||
$(C) -c $< -o $@ | ||
|
||
#------------------------------------------------------------------------------- | ||
# Create the libumfpack.a library | ||
#------------------------------------------------------------------------------- | ||
|
||
umfpack: $(UMFPACK_OBJ) | ||
@$(RM) $(RMFLAGS) $(UMFPACK_LIBRARY) | ||
@$(AR) $(ARFLAGS) $(UMFPACK_LIBRARY) $(UMFPACK_OBJ) | ||
@$(RANLIB) $(UMFPACK_LIBRARY) | ||
|
||
clean: | ||
@$(RM) $(RMFLAGS) *.o | ||
|
||
wipe: clean | ||
|