Skip to content

Commit

Permalink
Script for Abaqus wait using bash
Browse files Browse the repository at this point in the history
  • Loading branch information
khivi committed Sep 22, 2020
1 parent b800b7b commit 9b37141
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

## comsol_start.sh
Script to start comsol matlab.
Since comsol chooses a socket port, this script will allow matlab to connect to the chosen port.
- Since comsol chooses a socket port and outputs it
- This scripts finds the port from output and then matlab can connect to that port

## abaqus_wait.sh
On Ubuntu 18.04 the Abaqus script does not exit when the job is done.
See https://askubuntu.com/questions/1062058/process-hangs-before-termination-with-ubuntu-18-04

This script will wait for the job by looking at the .sta file

## Support
Please create issues if you want enhancements to the script.
14 changes: 14 additions & 0 deletions abaqus_wait.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

JOB=$1


wait_for_abaqus() {
file="$1.sta"
grep --quiet --line-regexp --fixed-strings --regexp=' THE ANALYSIS HAS NOT BEEN COMPLETED' --regexp=' THE ANALYSIS HAS COMPLETED SUCCESSFULLY' <(tail -f "$file")
}

wait_for_abaqus "$JOB"



Empty file modified comsol_start.sh
100644 → 100755
Empty file.

0 comments on commit 9b37141

Please sign in to comment.