-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDyMMMSettings.py
50 lines (38 loc) · 1.69 KB
/
DyMMMSettings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import psutil
import os
simSettings ={
"communitiesDir":"../communities",
"communityName":'communitycoop_cstr',
"solverName":'BDF',
"stopTime":100,
"analysisDirName":"v8",
"morrisDirName":"morris",
"rangeFileName":"screening_inputparams.csv",
"rangeFileNameKeyParams":"screening_inputparams_key.csv",
}
if 'DyMMM_communityName' in os.environ:
simSettings["communityName"]=os.environ['DyMMM_communityName']
if 'DyMMM_analysisDirName' in os.environ:
simSettings["analysisDirName"]=os.environ['DyMMM_analysisDirName']
if 'DyMMM_solverName' in os.environ:
simSettings["DyMMM_solverName"]=os.environ['DyMMM_solverName']
simSettings["communityDir"]=simSettings["communitiesDir"]+"/"+simSettings["communityName"]
simSettings["analysisDir"]=simSettings["communityDir"]+"/"+simSettings["analysisDirName"]
simSettings["paramsRangeFilePath"]=simSettings["analysisDir"]+"/"+simSettings["rangeFileName"]
simSettings["keyParamsRangeFilePath"]=simSettings["analysisDir"]+"/"+simSettings["rangeFileNameKeyParams"]
simSettings["sobolParams"]=simSettings["analysisDir"]+"/sobolParams.csv"
simSettings["morrisDir"]=simSettings["communityDir"]+"/"+simSettings["morrisDirName"]
simSettings["morrisParams"]=simSettings["morrisDir"]+"/morrisParams.csv"
simSettings["morrisParamsRangeFilePath"]=simSettings["morrisDir"]+"/"+simSettings["rangeFileName"]
jobParams = {
"partition":0,
"totalJobs":1,
"paramRowsPerJob":1
}
def limit_cpu():
"is called at every process start"
p = psutil.Process(os.getpid())
# set to lowest priority, this is windows only, on Unix use ps.nice(19)
#p.nice(psutil.BELOW_NORMAL_PRIORITY_CLASS)
if __name__ == '__main__':
print(simSettings)