Commit 97ecf48a authored by Cory Quammen's avatar Cory Quammen

mili: add Mili 15.1 project

This project downloads the Mili 15.1 library source code, extracts it,
applies a few patches needed to the configuration and source code, and
builds it. The build is a little unusual in that the Makefile
generated by the configure step is within a subdirectory. Hence, the
build and install steps are added by separate calls to
superbuild_project_add_step. Furthermore, the install command is
broken in the project's Makefile, so we install libraries and headers
manually instead.
parent a380648a
......@@ -98,6 +98,7 @@ function (superbuild_find_projects var)
fortran
genericio
libxml2
mili
mxml
scipy)
......
superbuild_add_project(mili
CAN_USE_SYSTEM
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND
<SOURCE_DIR>/configure
--prefix=<INSTALL_DIR>
BUILD_COMMAND
""
INSTALL_COMMAND
""
)
set(_build_subdir <SOURCE_DIR>/MILI-build)
# Split out building of code into a separate step because the working
# directory is different from the configure step.
superbuild_project_add_step("custom-build"
COMMAND
make opt fortran=false
COMMENT
"Building mili"
DEPENDEES
configure
WORKING_DIRECTORY
${_build_subdir}
)
# Mili's make install command is broken. Just grab what we need.
superbuild_project_add_step("custom-install"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${_build_subdir}/lib_opt/libeprtf.a
${_build_subdir}/lib_opt/libmili.a
${_build_subdir}/lib_opt/libtaurus.a
<INSTALL_DIR>/lib
COMMAND ${CMAKE_COMMAND} -E make_directory
<INSTALL_DIR>/include/mili
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${_build_subdir}/include/eprtf.h
${_build_subdir}/include/gahl.h
${_build_subdir}/include/list.h
${_build_subdir}/include/mili.h
${_build_subdir}/include/mili_endian.h
${_build_subdir}/include/mili_enum.h
${_build_subdir}/include/mili_fparam.h
${_build_subdir}/include/mili_internal.h
${_build_subdir}/include/misc.h
${_build_subdir}/include/mr.h
${_build_subdir}/include/partition.h
${_build_subdir}/include/sarray.h
${_build_subdir}/include/taurus_db.h
<INSTALL_DIR>/include/mili
COMMENT
"Installing mili"
DEPENDEES
build
)
if (UNIX)
superbuild_apply_patch(mili unix-patch1 "Mili Unix patch 1")
if (APPLE)
# Patches derived from VisIt build
# https://portal.nersc.gov/project/visit/releases/3.0.0/build_visit3_0_0
superbuild_apply_patch(mili darwin-patch1 "Mili Darwin patch 1")
superbuild_apply_patch(mili darwin-patch2 "Mili Darwin patch 2")
superbuild_apply_patch(mili darwin-patch3 "Mili Darwin patch 3")
endif()
superbuild_add_extra_cmake_args(
-DMili_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/mili
-DMili_LIBRARY:PATH=<INSTALL_DIR>/lib/libmili.a
)
endif()
From e2562d32e496b31acf4f4f099997af094e0e56ba Mon Sep 17 00:00:00 2001
From: Cory Quammen <cory.quammen@kitware.com>
Date: Mon, 10 Jun 2019 00:08:55 -0400
Subject: [PATCH] Darwin patch 1
---
src/mesh_u.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesh_u.c b/src/mesh_u.c
index a7e71d7..b743697 100755
--- a/src/mesh_u.c
+++ b/src/mesh_u.c
@@ -38,7 +38,7 @@
#include <string.h>
#ifndef _MSC_VER
-#include <values.h>
+#include <limits.h>
#include <sys/time.h>
#endif
#include <time.h>
--
2.10.1
From 0a84aedbaff5c0ac5a32b09e5ea1170667ffa472 Mon Sep 17 00:00:00 2001
From: Cory Quammen <cory.quammen@kitware.com>
Date: Mon, 10 Jun 2019 00:10:37 -0400
Subject: [PATCH] Darwin patch 2
---
Makefile.Library | 5 -----
1 file changed, 5 deletions(-)
diff --git a/Makefile.Library b/Makefile.Library
index fc5e230..7be7b74 100755
--- a/Makefile.Library
+++ b/Makefile.Library
@@ -386,8 +386,3 @@ install-chmod:
done
uninstall:
-
-ifneq ($(OS_NAME),Linux)
-include $(OBJS:.o=.d)
-endif
-
--
2.10.1
From d87540f07efd2f3ad6740f1e83731e151bc668be Mon Sep 17 00:00:00 2001
From: Cory Quammen <cory.quammen@kitware.com>
Date: Mon, 10 Jun 2019 00:11:26 -0400
Subject: [PATCH] Darwin patch 3
---
src/mili_internal.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mili_internal.h b/src/mili_internal.h
index 0fca996..8182410 100755
--- a/src/mili_internal.h
+++ b/src/mili_internal.h
@@ -555,9 +555,9 @@ typedef struct _mili_family
* Library-private file family management routines and data.
*/
-int host_index;
-int internal_sizes[QTY_PD_ENTRY_TYPES + 1];
-int mili_verbose;
+extern int host_index;
+extern int internal_sizes[QTY_PD_ENTRY_TYPES + 1];
+extern int mili_verbose;
Return_value validate_fam_id( Famid fam_id );
Return_value parse_control_string( char *ctl_str, Mili_family *fam,
Bool_type *p_create );
@@ -625,7 +625,7 @@ void delete_dir( Mili_family *fam );
Return_value load_directories( Mili_family *fam );
/* param.c - parameter management routines. */
-char *dtype_names[QTY_PD_ENTRY_TYPES + 1];
+extern char *dtype_names[QTY_PD_ENTRY_TYPES + 1];
Return_value read_scalar( Mili_family *fam, Param_ref *p_pr, void *p_value );
Return_value mili_read_string( Mili_family *fam, Param_ref *p_pr,
char *p_value );
@@ -668,7 +668,7 @@ void get_mili_version( char *mili_version_ptr );
/* dep.c - routines for handling architecture dependencies. */
Return_value set_default_io_routines( Mili_family *fam );
Return_value set_state_data_io_routines( Mili_family *fam );
-void (*write_funcs[QTY_PD_ENTRY_TYPES + 1])();
+extern void (*write_funcs[QTY_PD_ENTRY_TYPES + 1])();
/* svar.c - routines for managing state variables. */
Bool_type valid_svar_data( Aggregate_type atype, char *name,
@@ -761,7 +761,7 @@ Return_value mc_get_class_info_by_index(Mili_family* in, int *mesh_id,
void mili_delete_mo_class_data( void *p_data );
/* wrap_c.c - C-half of FORTRAN-to-C wrappers. */
-int fortran_api;
+extern int fortran_api;
/* write_db.c */
Return_value
write_state_data( int state_num, Mili_analysis *out_db );
--
2.10.1
This diff is collapsed.
From 3c35a9e2a5cfb39adcc182f7f88be79c732ea339 Mon Sep 17 00:00:00 2001
From: Cory Quammen <cory.quammen@kitware.com>
Date: Mon, 24 Jun 2019 14:49:33 -0400
Subject: Unix patch 1
---
configure | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index 39db8f3..ef656f1 100755
--- a/configure
+++ b/configure
@@ -5731,14 +5731,14 @@ done
# Determine if 'gmake' is available for building the code.
#
# Extract the first word of "gmake", so it can be a program name with args.
-set dummy gmake; ac_word=$2
+set dummy make; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_FOUND_GMAKE+set}" = set; then
+if test "${ac_cv_prog_FOUND_MAKE+set}" = set; then
$as_echo_n "(cached) " >&6
else
- if test -n "$FOUND_GMAKE"; then
- ac_cv_prog_FOUND_GMAKE="$FOUND_GMAKE" # Let the user override the test.
+ if test -n "$FOUND_MAKE"; then
+ ac_cv_prog_FOUND_MAKE="$FOUND_MAKE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -5747,7 +5747,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_FOUND_GMAKE=""yes""
+ ac_cv_prog_FOUND_MAKE=""yes""
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -5755,22 +5755,22 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_FOUND_GMAKE" && ac_cv_prog_FOUND_GMAKE=""no""
+ test -z "$ac_cv_prog_FOUND_MAKE" && ac_cv_prog_FOUND_MAKE=""no""
fi
fi
-FOUND_GMAKE=$ac_cv_prog_FOUND_GMAKE
-if test -n "$FOUND_GMAKE"; then
- { $as_echo "$as_me:$LINENO: result: $FOUND_GMAKE" >&5
-$as_echo "$FOUND_GMAKE" >&6; }
+FOUND_MAKE=$ac_cv_prog_FOUND_MAKE
+if test -n "$FOUND_MAKE"; then
+ { $as_echo "$as_me:$LINENO: result: $FOUND_MAKE" >&5
+$as_echo "$FOUND_MAKE" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
- if test "$FOUND_GMAKE" = "no"; then
- { { $as_echo "$as_me:$LINENO: error: \"**** 'gmake' is REQUIRED to build the code!\"" >&5
-$as_echo "$as_me: error: \"**** 'gmake' is REQUIRED to build the code!\"" >&2;}
+ if test "$FOUND_MAKE" = "no"; then
+ { { $as_echo "$as_me:$LINENO: error: \"**** 'make' is REQUIRED to build the code!\"" >&5
+$as_echo "$as_me: error: \"**** 'make' is REQUIRED to build the code!\"" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5948,6 +5948,7 @@ fi
if test "$bits64_ENABLE" = "True"; then
HOSTDIR="$HOSTDIR""_64bit"
fi
+ HOSTDIR="MILI-build"
if test ! -d "$HOSTDIR"; then
{ $as_echo "$as_me:$LINENO: result: Creating directory: $PATH_NAME" >&5
$as_echo "Creating directory: $PATH_NAME" >&6; }
--
2.10.1
......@@ -190,3 +190,7 @@ superbuild_set_revision(nvidiamdl
superbuild_set_revision(visrtx
GIT_REPOSITORY "https://github.com/NVIDIA/VisRTX.git"
GIT_TAG "44fb1a93e44e3af4312f5ee20ba38ab138948acc") # 0.1.5 + patches
superbuild_set_revision(mili
URL "https://www.paraview.org/files/dependencies/mili-15.1.tar.gz"
URL_MD5 "8848db9a5e692c010806d64b8c5e46a4")
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