python-batch/cuda_pubsub/cpu_fftw.yaml (19 lines of code) (raw):
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
project_id: "<my_project>"
region: "us-central1"
job_prefix: 'fftw-'
machine_type: "c2-standard-4"
volumes:
- {bucket_name: "<my_bucket>", gcs_path: "/mnt/disks/hpc"}
task_count: 16 #optional
parallelism: 16 #optional
task_count_per_node: 2 #optional
labels:
env: "hpc"
type: "fftw"
script_text: |
#!/bin/bash
if test ! -f "WP_time"; then
cp -n /mnt/disks/hpc/WP_time . || echo "File already copied."
fi
mkdir -p /mnt/disks/hpc/${JOB_ID}
echo "Starting ./WP_time ID: j-${JOB_ID} b-${BATCH_TASK_INDEX}" > /mnt/disks/hpc/${JOB_ID}/${BATCH_TASK_INDEX}.txt
./WP_time >> /mnt/disks/hpc/${JOB_ID}/${BATCH_TASK_INDEX}.txt