From 95d96bd45d6a37096eb781b9c205e4a2888ca247 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Fri, 8 Mar 2019 11:12:30 -0800 Subject: [PATCH] Add OPENRAM_TMP environment check --- compiler/options.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/options.py b/compiler/options.py index 4d3461e6..f3410f86 100644 --- a/compiler/options.py +++ b/compiler/options.py @@ -13,8 +13,12 @@ class options(optparse.Values): # This is the name of the technology. tech_name = "" # This is the temp directory where all intermediate results are stored. - openram_temp = "/tmp/openram_{0}_{1}_temp/".format(getpass.getuser(),os.getpid()) - #openram_temp = "{0}/openram_temp/".format(os.getenv("HOME")) + try: + # If user defined the temporary location in their environment, use it + openram_temp = os.path.abspath(os.environ.get("OPENRAM_TMP")) + except: + # Else use a unique temporary directory + openram_temp = "/tmp/openram_{0}_{1}_temp/".format(getpass.getuser(),os.getpid()) # This is the verbosity level to control debug information. 0 is none, 1 # is minimal, etc. debug_level = 0