Skip to content

Commit ecab20c

Browse files
author
meihuisu
committed
add handles for mscal
1 parent fd0875c commit ecab20c

File tree

8 files changed

+58
-59
lines changed

8 files changed

+58
-59
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
## 2024-02-15 Mei-Hui Su <[email protected]>
1313
* Converted cvms5 to use Proj
14-
* Added CS242 to 'accept' generated ucvm2mesh SORD triplet dat file for UCVM plugin model module
15-
(fast-Y, bottom-up axis access)
1614

1715
## 2023-11-01 Mei-Hui Su <[email protected]>
1816
* Transfer Taper to toPROJ branch

configure.ac

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ AC_ARG_ENABLE([model-cs248],
128128
[enable_model_cs248=yes],
129129
[enable_model_cs248=no])
130130

131-
AC_ARG_ENABLE([model-cs242],
132-
[AS_HELP_STRING([--enable-model-cs242],
133-
[enable model SCEC CS242])],
134-
[enable_model_cs242=yes],
135-
[enable_model_cs242=no])
131+
AC_ARG_ENABLE([model-mscal],
132+
[AS_HELP_STRING([--enable-model-mscal],
133+
[enable model SCEC MSCAL])],
134+
[enable_model_mscal=yes],
135+
[enable_model_mscal=no])
136136

137137
AC_ARG_ENABLE([model-cvmhlabn],
138138
[AS_HELP_STRING([--enable-model-cvmhlabn],
@@ -544,25 +544,25 @@ if test "x$enable_model_cs248" = xyes; then
544544
AC_ARG_WITH([cs248-include-path],
545545
[AS_HELP_STRING([--with-cs248-include-path],
546546
[location of the SCEC CS248 headers])],
547-
[CS242_INCL="-I$withval"],
548-
[CS242_INCL="/usr/include/cs248"])
547+
[CS248_INCL="-I$withval"],
548+
[CS248_INCL="/usr/include/cs248"])
549549
AC_ARG_WITH([cs248-lib-path],
550550
[AS_HELP_STRING([--with-cs248-lib-path], [location of the SCEC CS248 libraries])],
551-
[CS242_LIB="-L$withval -lcs248 -lproj -letree"],
552-
[CS242_LIB="-lcs248 -lproj -letree"])
551+
[CS248_LIB="-L$withval -lcs248 -lproj -letree"],
552+
[CS248_LIB="-lcs248 -lproj -letree"])
553553
fi
554554

555-
# Get SCEC CS242 library and include locations
556-
if test "x$enable_model_cs242" = xyes; then
557-
AC_ARG_WITH([cs242-include-path],
558-
[AS_HELP_STRING([--with-cs242-include-path],
559-
[location of the SCEC CS242 headers])],
560-
[CS242_INCL="-I$withval"],
561-
[CS242_INCL="/usr/include/cs242"])
562-
AC_ARG_WITH([cs242-lib-path],
563-
[AS_HELP_STRING([--with-cs242-lib-path], [location of the SCEC CS242 libraries])],
564-
[CS242_LIB="-L$withval -lcs242 -lproj -letree"],
565-
[CS242_LIB="-lcs242 -lproj -letree"])
555+
# Get SCEC MSCAL library and include locations
556+
if test "x$enable_model_mscal" = xyes; then
557+
AC_ARG_WITH([mscal-include-path],
558+
[AS_HELP_STRING([--with-mscal-include-path],
559+
[location of the SCEC MSCAL headers])],
560+
[MSCAL_INCL="-I$withval"],
561+
[MSCAL_INCL="/usr/include/mscal"])
562+
AC_ARG_WITH([mscal-lib-path],
563+
[AS_HELP_STRING([--with-mscal-lib-path], [location of the SCEC MSCAL libraries])],
564+
[MSCAL_LIB="-L$withval -lmscal -lproj -letree"],
565+
[MSCAL_LIB="-lmscal -lproj -letree"])
566566
fi
567567

568568
# Get SCEC CVMHLABN library and include locations
@@ -1193,19 +1193,19 @@ else
11931193
fi
11941194

11951195
if test "x$enable_static" = xyes; then
1196-
# Check optional SCEC CS242 installation
1197-
if test "x$enable_model_cs242" = xyes; then
1196+
# Check optional SCEC MSCAL installation
1197+
if test "x$enable_model_mscal" = xyes; then
11981198
# Setup compiler/linker flags
1199-
CFLAGS="$CS242_INCL $CFLAGS"
1200-
LDFLAGS="$CS242_LIB $LDFLAGS"
1199+
CFLAGS="$MSCAL_INCL $CFLAGS"
1200+
LDFLAGS="$MSCAL_LIB $LDFLAGS"
12011201

1202-
echo "Checking for SCEC CS242"
1203-
AC_CHECK_HEADER(cs242.h,[],[AC_MSG_ERROR(["SCEC CS242 header not found; use --with-cs242-include-path"])],[AC_INCLUDES_DEFAULT])
1202+
echo "Checking for SCEC MSCAL"
1203+
AC_CHECK_HEADER(mscal.h,[],[AC_MSG_ERROR(["SCEC MSCAL header not found; use --with-mscal-include-path"])],[AC_INCLUDES_DEFAULT])
12041204
else
1205-
AM_CONDITIONAL(UCVM_AM_ENABLE_CS242, false)
1205+
AM_CONDITIONAL(UCVM_AM_ENABLE_MSCAL, false)
12061206
fi
12071207
else
1208-
AM_CONDITIONAL(UCVM_AM_ENABLE_CS242, [test x"$enable_model_cs242" = xyes])
1208+
AM_CONDITIONAL(UCVM_AM_ENABLE_MSCAL, [test x"$enable_model_mscal" = xyes])
12091209
fi
12101210

12111211
if test "x$enable_static" = xyes; then

setup/setup.list

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@
8484
"md5sum": "de57c7cd33f6a17a787198f0d4dea033",
8585
"Order": 24
8686
},
87-
"CS242": {
87+
"MSCAL": {
8888
"Version": "1.0",
89-
"Abbreviation": "cs242",
90-
"Size": "4.7M",
91-
"Path": "cs242",
92-
"URL": "https://g-3a9041.a78b8.36fe.data.globus.org/ucvm/v24_3/model/cs242.tar.gz",
89+
"Abbreviation": "mscal",
90+
"Size": "1M",
91+
"Path": "mscal",
92+
"URL": "https://g-3a9041.a78b8.36fe.data.globus.org/ucvm/v25_1/model/mscal.tar.gz",
9393
"ConfigureEnv": [ "UCVM_INSTALL_PATH"],
94-
"ConfigureFlags": "--with-etree-libdir=${UCVM_INSTALL_PATH}/lib/euclid3/lib --with-etree-incdir=${UCVM_INSTALL_PATH}/lib/euclid3/include --with-proj-libdir=${UCVM_INSTALL_PATH}/lib/proj/lib --with-proj-incdir=${UCVM_INSTALL_PATH}/lib/proj/include --with-tiff-libdir=${UCVM_INSTALL_PATH}/lib/tiff/lib --with-tiff-incdir=${UCVM_INSTALL_PATH}/lib/tiff/include --with-sqlite-libdir=${UCVM_INSTALL_PATH}/lib/sqlite/lib --with-sqlite-incdir=${UCVM_INSTALL_PATH}/lib/sqlite/include",
95-
"UCVMConfigureFlags": "--enable-model-cs242 --with-cs242-lib-path=${UCVM_INSTALL_PATH}/model/cs242/lib --with-cs242-include-path=${UCVM_INSTALL_PATH}/model/cs242/include",
94+
"ConfigureFlags": "",
95+
"UCVMConfigureFlags": "--enable-model-mscal --with-mscal-lib-path=${UCVM_INSTALL_PATH}/model/mscal/lib --with-mscal-include-path=${UCVM_INSTALL_PATH}/model/mscal/include",
9696
"Ask": "no",
97-
"Libraries": ["euclid3", "proj"],
97+
"Libraries": [],
9898
"md5sum": "9861b6ccbde582807a1488bbd696fb25",
9999
"Order": 23
100100
},

src/ucvm/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ if UCVM_AM_ENABLE_SJFZ
137137
AM_CFLAGS += -D_UCVM_ENABLE_SJFZ
138138
endif
139139

140-
# CS242 includes
141-
if UCVM_AM_ENABLE_CS242
142-
AM_CFLAGS += -D_UCVM_ENABLE_CS242
140+
# MSCAL includes
141+
if UCVM_AM_ENABLE_MSCAL
142+
AM_CFLAGS += -D_UCVM_ENABLE_MSCAL
143143
endif
144144

145145

src/ucvm/ucvm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,9 +1338,9 @@ int ucvm_get_resources(ucvm_resource_t *res, int *len)
13381338
return(UCVM_CODE_ERROR);
13391339
}
13401340
#endif
1341-
#ifdef _UCVM_ENABLE_CS242
1341+
#ifdef _UCVM_ENABLE_MSCAL
13421342
if (ucvm_save_resource(UCVM_RESOURCE_MODEL, UCVM_MODEL_CRUSTAL,
1343-
UCVM_MODEL_CS242, "", res, numinst++, *len)
1343+
UCVM_MODEL_MSCAL, "", res, numinst++, *len)
13441344
!= UCVM_CODE_SUCCESS) {
13451345
return(UCVM_CODE_ERROR);
13461346
}

src/ucvm/ucvm_dtypes.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
#define UCVM_MODEL_CCA "cca"
8686
#define UCVM_MODEL_SJFZ "sjfz"
8787
#define UCVM_MODEL_CS248 "cs248"
88-
#define UCVM_MODEL_CS242 "cs242"
88+
89+
#define UCVM_MODEL_MSCAL "mscal"
8990

9091
#define UCVM_MODEL_SFCVM "sfcvm"
9192
#define UCVM_MODEL_UWLINCA "uwlinca"

src/ucvm/ucvm_model_plugin.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@
7575
extern int cs248_version;
7676
extern int cs248_config;
7777
#endif
78-
#ifdef _UCVM_ENABLE_CS242
79-
extern int cs242_init;
80-
extern int cs242_query;
81-
extern int cs242_finalize;
82-
extern int cs242_version;
83-
extern int cs242_config;
78+
#ifdef _UCVM_ENABLE_MSCAL
79+
extern int mscal_init;
80+
extern int mscal_query;
81+
extern int mscal_finalize;
82+
extern int mscal_version;
83+
extern int mscal_config;
8484
#endif
8585
#ifdef _UCVM_ENABLE_CVMHLABN
8686
extern int cvmhlabn_init;
@@ -436,13 +436,13 @@ int ucvm_plugin_model_init(int id, ucvm_modelconf_t *conf) {
436436
}
437437
}
438438
#endif
439-
#ifdef _UCVM_ENABLE_CS242
440-
if (strcmp(conf->label, UCVM_MODEL_CS242) == 0) {
441-
pptr->model_init = &cs242_init;
442-
pptr->model_query = &cs242_query;
443-
pptr->model_finalize = &cs242_finalize;
444-
pptr->model_version = &cs242_version;
445-
pptr->model_config = &cs242_config;
439+
#ifdef _UCVM_ENABLE_MSCAL
440+
if (strcmp(conf->label, UCVM_MODEL_MSCAL) == 0) {
441+
pptr->model_init = &mscal_init;
442+
pptr->model_query = &mscal_query;
443+
pptr->model_finalize = &mscal_finalize;
444+
pptr->model_version = &mscal_version;
445+
pptr->model_config = &mscal_config;
446446
if ((*pptr->model_init)(conf->config, conf->label) != 0) {
447447
fprintf(stderr, "Failed to initialize model, %s.\n", conf->label);
448448
return UCVM_CODE_ERROR;

ucvm_setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ def _addInstallNameTool_bash(modelsToInstall, librariesToInstall):
625625
str=str+"install_name_tool -change libcca.so ${MY_UCVM_INSTALL_PATH}/model/cca/lib/libcca.so $1\n"
626626
if "CS248" in modelsToInstall:
627627
str=str+"install_name_tool -change libcs248.so ${MY_UCVM_INSTALL_PATH}/model/cs248/lib/libcs248.so $1\n"
628-
if "CS242" in modelsToInstall:
629-
str=str+"install_name_tool -change libcs242.so ${MY_UCVM_INSTALL_PATH}/model/cs242/lib/libcs242.so $1\n"
628+
if "MSCAL" in modelsToInstall:
629+
str=str+"install_name_tool -change libmscal.so ${MY_UCVM_INSTALL_PATH}/model/mscal/lib/libmscal.so $1\n"
630630
if "SJFZ" in modelsToInstall:
631631
str=str+"install_name_tool -change libsjfz.so ${MY_UCVM_INSTALL_PATH}/model/sjfz/lib/libsjfz.so $1\n"
632632
return str

0 commit comments

Comments
 (0)