aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rwxr-xr-xbin/salis.py9
2 files changed, 7 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index ee01acd..69cc08f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,6 @@ bin/common/pipe
bin/error.log
bin/lib/libsalis.so
bin/sims/*.sim
-bin/sims/auto/*.auto
+bin/sims/auto/*.auto.gz
build/*.d
build/*.o
diff --git a/bin/salis.py b/bin/salis.py
index 25c6526..3e3bacc 100755
--- a/bin/salis.py
+++ b/bin/salis.py
@@ -25,6 +25,7 @@ from argparse import ArgumentParser, HelpFormatter
from ctypes import CDLL, c_bool, c_uint8, c_uint32, c_char_p, POINTER
from handler import Handler
from printer import Printer
+from subprocess import check_call
__version__ = "2.0"
@@ -128,10 +129,11 @@ class Salis:
self.autosave = interval
def check_autosave(self):
- """ Save simulation to './sims/auto/*' whenever the autosave interval
- is reached. We use the following naming convention for auto-saved files:
+ """ Save compressed simulation file to './sims/auto/*' whenever the
+ autosave interval is reached. We use the following naming convention
+ for auto-saved files:
- >>> ./sims/auto/<file-name>.<sim-epoch>.<sim-cycle>.auto
+ >>> ./sims/auto/<file-name>.<sim-epoch>.<sim-cycle>.auto.gz
"""
if self.autosave != "---":
if not self.lib.sal_main_get_cycle() % self.autosave:
@@ -142,6 +144,7 @@ class Salis:
"auto"
]))
self.lib.sal_main_save(auto_path.encode("utf-8"))
+ check_call(["gzip", auto_path])
def exit(self):
""" Signal we want to exit the simulator.