2

Run models using sampling methods locally

I want to run models by PAT (OpenStudio 2.1) on my local workstation. I know that some sampling methods can be used in PAT, but I find that I can only run models on cloud if I use sampling methods. Can I run models using sampling methods locally? Or are there some methods (e.g. modify some source codes, use some tools to create a virtual cloud locally) to make it possible?

Yunyang Ye's avatar
816
Yunyang Ye
asked 2017-04-24 16:13:15 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-08-20 14:58:07 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

5

To run algorithms locally, you will need to setup your own OpenStudio Server. You have 2 options here:

  1. checkout https://github.com/NREL/OpenStudio-se... locally and build your own Docker containers.

  2. use the already built docker containers and do the following:

docker pull nrel/openstudio-server:2.1.1

docker pull nrel/openstudio-rserve:2.1.1

docker pull mongo

docker volume create --name osdata

Once the containers are spun up, use docker-compose with the .yml file located here and then from that folder run

docker-compose up

to add workers:

docker-compose scale worker=44

BrianLBall's avatar
2k
BrianLBall
answered 2017-04-28 10:33:12 -0500, updated 2017-04-28 10:41:18 -0500
edit flag offensive 0 remove flag delete link

Comments

1

In Brian's example, worker=44 allocates 44 cores. Your mileage may vary.

ljbrackney's avatar ljbrackney (2017-04-28 10:46:18 -0500) edit
1

4 cores are needed for the basic services (DB, Web and RServe). The rest can be workers.

BrianLBall's avatar BrianLBall (2017-05-01 09:56:10 -0500) edit

So that means it's pointless to try to run a local algorithmic analysis unless you have a machine with more than 4 cores?

Julien Marrec's avatar Julien Marrec (2017-06-21 09:52:42 -0500) edit
1

it would probably suffer from performance issues fighting over computer resources.

BrianLBall's avatar BrianLBall (2017-06-21 09:57:22 -0500) edit

Pretty much, which is why local mode is disabled when algorithms are selected. There's been discussion internally about packaging a full instance of OS Server for use by PAT locally. It's certainly doable, but it would only serve a tiny segment of users. The best solution is to provision a dedicated server box.

ljbrackney's avatar ljbrackney (2017-06-21 09:57:44 -0500) edit
add a comment see more comments
3

It's technically possible to enable those algorithms to run on local computing resources, but such problems are generally too large to be accommodated on the same computer. (You'll quickly find that problems balloon to hundreds or thousands of datapoints with a few mouse clicks in PAT!) There was a design decision1 made to restrict algorithms to only run on AWS or other machines that have been provisioned with OpenStudio server. The team may re-evaluate that in the future based on feedback.


1 The local instance of OS Server provisioned when PAT starts up is lighter weight and doesn't include R and all of the same support code that is installed on remote servers. All of the code required for the full server is available in the OpenStudio-Server GitHub repository.

ljbrackney's avatar
3.8k
ljbrackney
answered 2017-04-24 16:27:20 -0500
Julien Marrec's avatar
29.7k
Julien Marrec
updated 2017-04-26 16:43:18 -0500
edit flag offensive 0 remove flag delete link

Comments

If I can identify the sensitive inputs (maybe 30~50), and then use sampling methods (e.g. LHS) to decide which models we will run only based on these inputs. Can this way avoid to be too large to be accommodated on the same computer?

Yunyang Ye's avatar Yunyang Ye (2017-04-28 09:43:37 -0500) edit

The sampling problem you describe is the sort of thing we typically run on one of our dedicated 40+ core servers. Unless that's the class of machine you have at your desk, then you would be unhappy with "local" performance. There are other Q&As that have cropped up on Unmet Hours in recent days that may assist you in configuring your local computer or a dedicated server.

ljbrackney's avatar ljbrackney (2017-04-28 09:51:27 -0500) edit
add a comment see more comments