Skip to content

Commit

Permalink
missing vine renames (cooperative-computing-lab#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
btovar authored Oct 5, 2022
1 parent 2b707b9 commit 08d8c26
Show file tree
Hide file tree
Showing 19 changed files with 96 additions and 98 deletions.
6 changes: 3 additions & 3 deletions batch_job/src/vine_factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ static void show_help(const char *cmd)
printf(" %-30s Catalog server to query for managers.\n", "--catalog=<host:port>");
printf(" %-30s Password file for workers to authenticate.\n","-P,--password");
printf(" %-30s Use this scratch dir for factory.\n","-S,--scratch-dir");
printf(" %-30s (default: /tmp/ds-factory-$uid).\n","");
printf(" %-30s (default: /tmp/vine-factory-$uid).\n","");
printf(" %-30s Exit if parent process dies.\n", "--parent-death");
printf(" %-30s Enable debugging for this subsystem.\n", "-d,--debug=<subsystem>");
printf(" %-30s Send debugging to this file.\n", "-o,--debug-file=<file>");
Expand Down Expand Up @@ -1460,9 +1460,9 @@ int main(int argc, char *argv[])

if(!scratch_dir) {
if(batch_queue_type==BATCH_QUEUE_TYPE_CONDOR) {
scratch_dir = string_format("/tmp/ds-factory-%d",getuid());
scratch_dir = string_format("/tmp/vine-factory-%d",getuid());
} else {
scratch_dir = string_format("ds-factory-%d",getuid());
scratch_dir = string_format("vine-factory-%d",getuid());
}
}

Expand Down
2 changes: 1 addition & 1 deletion dttools/src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static struct flag_info table[] = {
{"ext", D_EXT},
{"rmonitor", D_RMON},
{"confuga", D_CONFUGA},
{"ds", D_VINE},
{"vine", D_VINE},
{"tlq", D_TLQ},
{"jx", D_JX},
{"ssl", D_SSL},
Expand Down
2 changes: 1 addition & 1 deletion makeflow/test/TR_makeflow_020_syntax_meta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ run()

clean()
{
cd syntax; ../../src/makeflow -c meta.makeflow && rm *.makeflowlog && exit 0
cd syntax; ../../src/makeflow -c meta.makeflow && rm -f *.makeflowlog && exit 0
exit 1
}

Expand Down
2 changes: 1 addition & 1 deletion makeflow/test/TR_makeflow_020_syntax_meta2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ run()

clean()
{
cd syntax && ../../src/makeflow -c meta2.makeflow && rm *.makeflowlog && exit 0
cd syntax && ../../src/makeflow -c meta2.makeflow && rm -f *.makeflowlog && exit 0
exit 1
}

Expand Down
4 changes: 2 additions & 2 deletions taskvine/src/bindings/python3/data-swarm-futures-intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"metadata": {},
"outputs": [],
"source": [
"from vine_futures import DataSwarmFutures, FutureTask, FutureTaskError"
"from vine_futures import TaskVineFutures, FutureTask, FutureTaskError"
]
},
{
Expand All @@ -46,7 +46,7 @@
"metadata": {},
"outputs": [],
"source": [
"q = DataSwarmFutures(name = 'my-ds-app', port = 0, local_worker = {'cores':1})\n",
"q = TaskVineFutures(name = 'my-vine-app', port = 0, local_worker = {'cores':1})\n",
"\n",
"print('queue is accepting connections on port {}'.format(q.port))"
]
Expand Down
8 changes: 4 additions & 4 deletions taskvine/src/bindings/python3/taskvine.binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def specify_port_range(low_port, high_port):
os.environ['TCP_LOW_PORT'] = str(low_port)
os.environ['TCP_HIGH_PORT'] = str(high_port)

staging_directory = tempfile.mkdtemp(prefix='ds-py-staging-')
staging_directory = tempfile.mkdtemp(prefix='vine-py-staging-')
def cleanup_staging_directory():
try:
shutil.rmtree(staging_directory)
Expand Down Expand Up @@ -2117,7 +2117,7 @@ def __init__(

(tmp, self._error_file) = tempfile.mkstemp(
dir=staging_directory,
prefix='ds-factory-err-')
prefix='vine-factory-err-')
os.close(tmp)

self._opts = {}
Expand Down Expand Up @@ -2250,13 +2250,13 @@ def start(self):
raise RuntimeError('Factory was already started')
(tmp, self._config_file) = tempfile.mkstemp(
dir=staging_directory,
prefix='ds-factory-config-',
prefix='vine-factory-config-',
suffix='.json')

if not self.scratch_dir:
self.scratch_dir = tempfile.mkdtemp(
dir=staging_directory,
prefix="ds-factory-scratch-")
prefix="vine-factory-scratch-")

os.close(tmp)
self._write_config()
Expand Down
8 changes: 4 additions & 4 deletions taskvine/src/bindings/python3/taskvine.futures.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## @package vine_futures
# Python Data Swarm bindings.
# Python TaskVine bindings.
#
# This is a library on top of work_queue which replaces q.wait with the concept
# of futures.
#
# This is experimental.
#
# - @ref vine_futures::DataSwarm
# - @ref work_queue::Task
# - @ref vine_futures::TaskVine
# - @ref vine_futures::Task

import work_queue
import multiprocessing
Expand Down Expand Up @@ -362,7 +362,7 @@ def specify_runtime_env(self, type, filename):
elif type == 'singularity':
sin_env = 'sin_env.img'
self.specify_input_file(filename, sin_env, cache = True)
command = 'singularity exec -B $(pwd):/ds-sandbox --pwd /ds-sandbox {} -- {}'.format(sin_env, self.command)
command = 'singularity exec -B $(pwd):/vine-sandbox --pwd /vine-sandbox {} -- {}'.format(sin_env, self.command)
_work_queue.vine_task_command_line_set(self._task, command)


Expand Down
4 changes: 2 additions & 2 deletions taskvine/src/bindings/python3/vine_futures.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## @package vine_futures
# Python Data Swarm bindings.
# Python TaskVine bindings.
#
# This is a library on top of taskvine which replaces q.wait with the concept
# of futures.
#
# This is experimental.
#
# - @ref vine_futures::DataSwarm
# - @ref vine_futures::TaskVine
# - @ref taskvine::Task

import taskvine
Expand Down
2 changes: 1 addition & 1 deletion taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,7 @@ int vine_enable_monitoring(struct vine_manager *q, char *monitor_output_director
fatal("Could not create monitor output directory - %s (%s)", q->monitor_output_directory, strerror(errno));
}

q->monitor_summary_filename = string_format("%s/ds-%d.summaries", q->monitor_output_directory, getpid());
q->monitor_summary_filename = string_format("%s/vine-%d.summaries", q->monitor_output_directory, getpid());
q->monitor_file = fopen(q->monitor_summary_filename, "a");

if(!q->monitor_file)
Expand Down
2 changes: 1 addition & 1 deletion taskvine/src/manager/vine_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ struct rmsummary *vine_manager_choose_resources_for_task( struct vine_manager *q
int64_t overcommitted_resource_total(struct vine_manager *q, int64_t total);

/* The expected format of files created by the resource monitor.*/
#define RESOURCE_MONITOR_TASK_LOCAL_NAME "ds-%d-task-%d"
#define RESOURCE_MONITOR_TASK_LOCAL_NAME "vine-%d-task-%d"
#define RESOURCE_MONITOR_REMOTE_NAME "cctools-monitor"
#define RESOURCE_MONITOR_REMOTE_NAME_EVENTS RESOURCE_MONITOR_REMOTE_NAME "events.json"

Expand Down
2 changes: 1 addition & 1 deletion taskvine/src/manager/vine_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ worker, and catalog, but should not be visible to the public user API.

#define VINE_PROTOCOL_VERSION 1

#define VINE_LINE_MAX 4096 /**< Maximum length of a ds message line. */
#define VINE_LINE_MAX 4096 /**< Maximum length of a vine message line. */

#endif
8 changes: 4 additions & 4 deletions taskvine/test/TR_vine_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import_config_val CCTOOLS_PYTHON_TEST_DIR

export PYTHONPATH=$(pwd)/../src/bindings/${CCTOOLS_PYTHON_TEST_DIR}:$PYTHONPATH

STATUS_FILE=ds.status
PORT_FILE=ds.port
STATUS_FILE=vine.status
PORT_FILE=vine.port

check_needed()
{
Expand Down Expand Up @@ -40,12 +40,12 @@ run()
# send makeflow to the background, saving its exit status.
( ${CCTOOLS_PYTHON_TEST_EXEC} vine_test.py $PORT_FILE; echo $? > $STATUS_FILE ) &

# wait at most 15 seconds for ds to find a port.
# wait at most 15 seconds for vine to find a port.
wait_for_file_creation $PORT_FILE 15

run_ds_worker $PORT_FILE worker.log

# wait for ds to exit.
# wait for vine to exit.
wait_for_file_creation $STATUS_FILE 15

# retrieve exit status
Expand Down
8 changes: 4 additions & 4 deletions taskvine/test/TR_vine_python_task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import_config_val CCTOOLS_PYTHON_TEST_DIR

export PYTHONPATH=$(pwd)/../src/bindings/${CCTOOLS_PYTHON_TEST_DIR}:$PYTHONPATH

STATUS_FILE=ds.status
PORT_FILE=ds.port
STATUS_FILE=vine.status
PORT_FILE=vine.port

check_needed()
{
Expand All @@ -32,12 +32,12 @@ run()
# send makeflow to the background, saving its exit status.
( ${CCTOOLS_PYTHON_TEST_EXEC} vine_python_task.py $PORT_FILE; echo $? > $STATUS_FILE) &

# wait at most 5 seconds for ds to find a port.
# wait at most 5 seconds for vine to find a port.
wait_for_file_creation $PORT_FILE 5

run_ds_worker $PORT_FILE worker.log

# wait for ds to exit.
# wait for vine to exit.
wait_for_file_creation $STATUS_FILE 5

# retrieve makeflow exit status
Expand Down
4 changes: 2 additions & 2 deletions taskvine/test/TR_vine_ssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import_config_val CCTOOLS_OPENSSL_AVAILABLE

export PYTHONPATH=$(pwd)/../src/bindings/${CCTOOLS_PYTHON_TEST_DIR}:$PYTHONPATH

STATUS_FILE=ds.status
PORT_FILE=ds.port
STATUS_FILE=vine.status
PORT_FILE=vine.port

KEY_FILE=key.pem
CERT_FILE=cert.pem
Expand Down
12 changes: 6 additions & 6 deletions taskvine/test/TR_vine_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import_config_val CCTOOLS_PYTHON_TEST_DIR

export PYTHONPATH=$(pwd)/../src/bindings/${CCTOOLS_PYTHON_TEST_DIR}:$PYTHONPATH

STATUS_FILE=ds.status
PORT_FILE=ds.port
STATUS_FILE=vine.status
PORT_FILE=vine.port


check_needed()
Expand All @@ -27,18 +27,18 @@ prepare()

run()
{
# send ds to the background, saving its exit status.
# send vine to the background, saving its exit status.
(${CCTOOLS_PYTHON_TEST_EXEC} vine_test_tag.py $PORT_FILE; echo $? > $STATUS_FILE) &

# wait at most 15 seconds for ds to find a port.
# wait at most 15 seconds for vine to find a port.
wait_for_file_creation $PORT_FILE 15

run_ds_worker $PORT_FILE worker.log

# wait for ds to exit.
# wait for vine to exit.
wait_for_file_creation $STATUS_FILE 15

# retrieve ds exit status
# retrieve vine exit status
status=$(cat $STATUS_FILE)
if [ $status -ne 0 ]
then
Expand Down
26 changes: 13 additions & 13 deletions taskvine/test/vine_alloc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# tests for missing/recursive inputs/outputs.

import sys
import taskvine as ds
import taskvine as vine

def check_task(category, category_mode, max, min, expected):
q.specify_category_max_resources(category, max)
q.specify_category_min_resources(category, min)
q.specify_category_mode(category, category_mode)

t = ds.Task('/bin/echo hello')
t = vine.Task('/bin/echo hello')
t.specify_category(category)
q.submit(t)

Expand Down Expand Up @@ -42,12 +42,12 @@ def check_task(category, category_mode, max, min, expected):
sys.stderr.write("Usage: {} PORTFILE WORKER_CORES WORKER_MEMORY WORKER_DISK\n".format(sys.argv[0]))
raise

q = ds.DataSwarm(0)
q = vine.DataSwarm(0)
with open(port_file, 'w') as f:
print('Writing port {port} to file {file}'.format(port=q.port, file=port_file))
f.write(str(q.port))

worker = ds.Factory("local", manager_host_port="localhost:{}".format(q.port))
worker = vine.Factory("local", manager_host_port="localhost:{}".format(q.port))
worker.max_workers = 1
worker.min_workers = 1

Expand All @@ -62,53 +62,53 @@ def check_task(category, category_mode, max, min, expected):

with worker:
r = {'cores': 1, 'memory': 2, 'disk': 3, 'gpus': 4}
check_task('all_specified', ds.VINE_ALLOCATION_MODE_FIXED, max = r, min = {}, expected = r)
check_task('all_specified', vine.VINE_ALLOCATION_MODE_FIXED, max = r, min = {}, expected = r)

check_task('all_specified_no_gpu',
ds.VINE_ALLOCATION_MODE_FIXED,
vine.VINE_ALLOCATION_MODE_FIXED,
max = {'cores': 1, 'memory': 2, 'disk': 3},
min = {},
expected = {'cores': 1, 'memory': 2, 'disk': 3, 'gpus': 0})

check_task('all_specified_no_cores',
ds.VINE_ALLOCATION_MODE_FIXED,
vine.VINE_ALLOCATION_MODE_FIXED,
max = {'gpus': 4, 'memory': 2, 'disk': 3},
min = {},
expected = {'cores': 0, 'memory': 2, 'disk': 3, 'gpus': 4})

check_task('all_zero',
ds.VINE_ALLOCATION_MODE_FIXED,
vine.VINE_ALLOCATION_MODE_FIXED,
max = {'cores': 0, 'memory': 0, 'disk': 0, 'gpus': 0},
min = {},
expected = {'cores': worker_cores, 'memory': worker_memory, 'disk': worker_disk, 'gpus': 0})

check_task('only_memory',
ds.VINE_ALLOCATION_MODE_FIXED,
vine.VINE_ALLOCATION_MODE_FIXED,
max = {'memory': worker_memory/2},
min = {},
expected = {'cores': worker_cores/2, 'memory': worker_memory/2, 'disk': worker_disk/2, 'gpus': 0})

check_task('only_cores',
ds.VINE_ALLOCATION_MODE_FIXED,
vine.VINE_ALLOCATION_MODE_FIXED,
max = {'cores': worker_cores},
min = {},
expected = {'cores': worker_cores, 'memory': worker_memory, 'disk': worker_disk, 'gpus': 0})

check_task('only_memory_w_minimum',
ds.VINE_ALLOCATION_MODE_FIXED,
vine.VINE_ALLOCATION_MODE_FIXED,
max = {'memory': worker_memory/2},
min = {'cores': 3, 'gpus': 2},
expected = {'cores': 3, 'memory': worker_memory/2, 'disk': worker_disk/2, 'gpus': 2})

check_task('auto_whole_worker',
ds.VINE_ALLOCATION_MODE_MIN_WASTE,
vine.VINE_ALLOCATION_MODE_MIN_WASTE,
max = {},
min = {},
expected = {'cores': worker_cores, 'memory': worker_memory, 'disk': worker_disk, 'gpus': 0})

q.specify_category_first_allocation_guess('auto_with_guess', {'cores': 1, 'memory': 2, 'disk': 3})
check_task('auto_with_guess',
ds.VINE_ALLOCATION_MODE_MIN_WASTE,
vine.VINE_ALLOCATION_MODE_MIN_WASTE,
max = {},
min = {},
expected = {'cores': 1, 'memory': 2, 'disk': 3, 'gpus': 0})
Expand Down
8 changes: 4 additions & 4 deletions taskvine/test/vine_python_task.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python

import sys
import taskvine as ds
import taskvine as vine

port_file = None
try:
Expand All @@ -20,7 +20,7 @@ def my_sum(x, y, negate=False):
return s

# Create a new queue
queue = ds.DataSwarm(port=[9123,9130])
queue = vine.DataSwarm(port=[9123,9130])
print("listening on port {}".format(queue.port))
with open(port_file, "w") as f:
f.write(str(queue.port))
Expand All @@ -29,7 +29,7 @@ def my_sum(x, y, negate=False):
# Submit several tasks for execution:
print("submitting tasks...")
for value in range(1,10):
task = ds.PythonTask(my_sum, value, value)
task = vine.PythonTask(my_sum, value, value)
task.specify_cores(1)
queue.submit(task)

Expand All @@ -44,7 +44,7 @@ def my_sum(x, y, negate=False):

# Submit several tasks for execution:
for value in range(1,10):
task = ds.PythonTask(my_sum, value, value, negate=True)
task = vine.PythonTask(my_sum, value, value, negate=True)
task.specify_cores(1)
queue.submit(task)

Expand Down
Loading

0 comments on commit 08d8c26

Please sign in to comment.