From Beocat
Jump to: navigation, search
No edit summary
No edit summary
Line 67: Line 67:
# Copy the file to Beocat (if you edited it locally).
# Copy the file to Beocat (if you edited it locally).
# Run the parameter sweep, the updated range will be used to generate files.
# Run the parameter sweep, the updated range will be used to generate files.
== Using the output sorting program ==
This program allows you to search for results that match your entered parameter values and save them to a new '''.csv''' file that you specify.
==== Option 1: run directly ====
# Log into Beocat and navigate to your '''proj''' folder
# Run the following command to run the script to search for results directly: <code>./sort_output.sh</code>
# When prompted, enter the parameters you are searching as <code>name1=value1 name2=value2 name3=value3 etc</code>, separated by spaces.
# For example, to search for WA wire type, fps of 213, and fc of 6000 I’d enter the following: <code>W_type=WA fps=213 fc=6000</code>
# Enter the name of the file you’d like results saved to when prompted.
# Repeat if you’d like to do other searches, otherwise end the program.
==== Option 2: run through the manager application ====
# Log into Beocat and navigate to your '''proj''' folder
# Run the following command to run the manager program: <code>./manage_jobs.sh</code>
# Enter <code>o</code> when prompted by the program
# When prompted, enter the parameters you are searching as <code>name1=value1 name2=value2 name3=value3 etc</code>, separated by spaces.
# For example, to search for WA wire type, fps of 213, and fc of 6000 I’d enter the following: <code>W_type=WA fps=213 fc=6000</code>
# Enter the name of the file you’d like results saved to when prompted.
# Repeat if you’d like to do other searches, otherwise end the program.
== Deleting all input or output files ==
Due to the very large number of input and output files this generates, there is also a simple program to delete the remaining files.
==== Option 1: run directly ====
# Log into Beocat and navigate to your '''proj''' folder
# Run the following command to run the script to delete the files directly: <code>./delete_files.sh</code>
# When prompted, enter yes for whichever groups of files you'd like to delete
==== Option 2: run through the manager application ====
# Log into Beocat and navigate to your '''proj''' folder
# Run the following command to run the manager program: <code>./manage_jobs.sh</code>
# Enter <code>d</code> when prompted by the program
# When prompted, enter yes for whichever groups of files you'd like to delete

Revision as of 14:55, 28 April 2020

Setting up Beocat to run a parameter sweep

  1. First, you need to copy the project with all of its files into Beocat.
  2. This can be done several ways, but make sure that you have them in the same folder, which needs to be named proj.
  3. If you want to name it differently, you need to update run.sh to have the path to the new folder on line 15, where it has the command python ~/proj/Main_P.py
  4. The project folders should be structured correctly if you kept them as given, but make sure that the project is structured as follows: proj folder containing: all python and .sh files, a references folder containing ASTMA1096.txt, wireproperties.txt, and a geo_points folder containing all geometric point files
  5. Make all .sh files in your proj folder executable, using the command chmod +x *.sh in your proj folder. This should make .sh files appear in green now, as shown below (note that not all files are shown) Cropped executable sh file.png
  6. Set up Beocat to run the Python files.
  7. You can run the set_up_beocat.sh file to do this automatically. Run it by going to the folder that the file is in and entering the command ./set_up_beocat.sh
  8. If set_up_beocat.sh doesn’t work, what you need to do is create a ‘virtual environment’ for running python. You can look at [help page] to see a different guide for doing so, but you can also look at the commands in set_up_beocat.sh to see an example of setting up the virtual environment.

Running a parameter sweep on Beocat

There are two ways to schedule the parameter sweep: directly or through the manager application.

Option 1: run directly

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the parameter sweep script by itself: ./sched_run.sh
  3. If you’d like to run a whole parameter sweep: enter yes when prompted
  4. Otherwise, enter no and then the number of jobs you do want to run
  5. Wait for the program to finish, it will create all the input files and schedule as many jobs at once as it can.
  6. Note: Do not delete the file remaining_jobs.csv unless you want to stop your current parameter sweep! It is used for keeping track of which chunks we have already submitted.
  7. Follow the Run the next batch of jobs section below

Option 2: run through the manager application

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the manager program by itself: ./manager.sh
  3. Enter s when prompted by the program
  4. If you’d like to run a whole parameter sweep: enter yes when prompted
  5. Otherwise, enter no and then the number of jobs you do want to run
  6. Wait for the program to finish, it will create all the input files and schedule as many jobs at once as it can.
  7. Complete any other operations you want to do and then exit the program.
  8. Note: Do not delete the file remaining_jobs.csv unless you want to stop your current parameter sweep! It is used for keeping track of which chunks we have already submitted.
  9. Follow the Run the next batch of jobs section below

Run the next batch of jobs/Resubmit failed jobs

Due to the limit on the number of jobs that can be submitted to Beocat, you will need to schedule the jobs in batches. There are two ways to handle doing this, as shown below. Please be sure that you wait for the majority of each batch to finish before scheduling the next batch

Option 1: run directly

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the script to submit the next jobs directly: ./manage_jobs.sh
  3. Repeat this process every couple of days until you see the message No jobs remaining to be run!

Option 2: run through the manager application

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the manager program: ./manage_jobs.sh
  3. Enter m when prompted by the program
  4. Repeat this process every couple of days until you see the message No jobs remaining to be run!

Running a single job with a specific file number

By default, if you just run the simulation by itself, it will use the input file with number 1. If you’d like to run a specific file number, please follow the instructions below.

If you just want to run the sim in your terminal

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the sim in your terminal: ./run.sh <file number you’d like to run>. For example, to run file number 3,521 you’d do: ./run.sh 3521
  3. Wait for it to finish, the results will be written in the output folder with the number you used.

If you'd like to schedule it on Beocat

  1. Log into Beocat and navigate to your proj folder
  2. Enter the following command to schedule the job: sbatch ./run.sh <file number you’d like to run>. For example, to run file number 3,521 you’d do: sbatch ./run.sh 3521
  3. Beocat will run the job once it has an opening and will write the results to the output folder

Changing the range of a parameter in the sweep

If you need to change the range of a parameter in the sweep, the process should be simple.

  1. Go to the Define parameter sweep ranges section of Parameter_Sweep_P.py, some of which is shown below. Param sweep ranges.png
  2. Edit the range of the parameter you want in the file and save it. For example, if I want FC to range from 5500 to 7500 instead of 6000 to 10000, I would change it to be FC_RANGE = [5500, 6000, 65000, 7000, 7500]
  3. Copy the file to Beocat (if you edited it locally).
  4. Run the parameter sweep, the updated range will be used to generate files.


Using the output sorting program

This program allows you to search for results that match your entered parameter values and save them to a new .csv file that you specify.

Option 1: run directly

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the script to search for results directly: ./sort_output.sh
  3. When prompted, enter the parameters you are searching as name1=value1 name2=value2 name3=value3 etc, separated by spaces.
  4. For example, to search for WA wire type, fps of 213, and fc of 6000 I’d enter the following: W_type=WA fps=213 fc=6000
  5. Enter the name of the file you’d like results saved to when prompted.
  6. Repeat if you’d like to do other searches, otherwise end the program.

Option 2: run through the manager application

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the manager program: ./manage_jobs.sh
  3. Enter o when prompted by the program
  4. When prompted, enter the parameters you are searching as name1=value1 name2=value2 name3=value3 etc, separated by spaces.
  5. For example, to search for WA wire type, fps of 213, and fc of 6000 I’d enter the following: W_type=WA fps=213 fc=6000
  6. Enter the name of the file you’d like results saved to when prompted.
  7. Repeat if you’d like to do other searches, otherwise end the program.

Deleting all input or output files

Due to the very large number of input and output files this generates, there is also a simple program to delete the remaining files.

Option 1: run directly

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the script to delete the files directly: ./delete_files.sh
  3. When prompted, enter yes for whichever groups of files you'd like to delete

Option 2: run through the manager application

  1. Log into Beocat and navigate to your proj folder
  2. Run the following command to run the manager program: ./manage_jobs.sh
  3. Enter d when prompted by the program
  4. When prompted, enter yes for whichever groups of files you'd like to delete