Skip to content

Commit

Permalink
MPM v1.1.0u3 template notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
kks32 committed Nov 20, 2023
1 parent 1f8b265 commit e0230d6
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 59 deletions.
32 changes: 24 additions & 8 deletions example-notebooks/mpm/papermill-mpm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"execution_count": 1,
"id": "79aac18b-20ea-4a89-b9e9-85d50d69d84a",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
]
}
],
"source": [
"!pip install papermill --quiet"
]
Expand Down Expand Up @@ -52,14 +62,20 @@
" \"path\": {\n",
" \"name\": \"path\",\n",
" \"inferred_type_name\": \"str\",\n",
" \"default\": \"'/MyData/mpm-benchmarks/2d/uniaxial_stress/'\",\n",
" \"default\": \"\\\"/MyData/mpm-benchmarks/2d/uniaxial_stress/\\\"\",\n",
" \"help\": \"path to input file\"\n",
" },\n",
" \"input_file\": {\n",
" \"name\": \"input_file\",\n",
" \"inferred_type_name\": \"str\",\n",
" \"default\": \"'mpm.json'\",\n",
" \"default\": \"\\\"mpm.json\\\"\",\n",
" \"help\": \"input file.json\"\n",
" },\n",
" \"duration\": {\n",
" \"name\": \"duration\",\n",
" \"inferred_type_name\": \"str\",\n",
" \"default\": \"\\\"00:10:00\\\"\",\n",
" \"help\": \"Runtime duration ('HH:MM:SS')\"\n",
" }\n",
"}\n"
]
Expand All @@ -82,19 +98,19 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "455571f2-daa2-4099-95a7-3518003e833a",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "51a8b21830b54c058a36a1ccfa56cc5b",
"model_id": "7e3a30ebadf544d5bcee10b0cbdda95d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Executing: 0%| | 0/13 [00:00<?, ?cell/s]"
"Executing: 0%| | 0/17 [00:00<?, ?cell/s]"
]
},
"metadata": {},
Expand All @@ -106,13 +122,13 @@
" \"template-mpm-run.ipynb\", # input template notebook\n",
" \"mpm1.ipynb\", # Your modified notebook\n",
" # Parameters that you can specify in the template notebook\n",
" parameters=dict(path=\"/MyData/mpm-benchmarks/2d/uniaxial_stress/\"),\n",
" parameters=dict(path=\"/MyData/mpm-benchmarks/2d/uniaxial_stress/\", duration=\"00:05:00\"),\n",
")"
]
}
],
"metadata": {
"IMAGE_NAME": "taccsciapps/ds-nb-img:base-0.1.2",
"IMAGE_NAME": "taccsciapps/ds-nb-img:base-0.1.3",
"UUID": "5c6ea4e0-6dde-11ee-b4d3-9a799580253c",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
Expand Down
80 changes: 29 additions & 51 deletions example-notebooks/mpm/template-mpm-run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 21,
"id": "b7fa3e9a-7bf3-441c-917f-fb57a94ee017",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -48,25 +48,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"id": "6a0daf58-cf6c-41f9-89b7-bc60d7042e04",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"fatal: destination path '/home/jupyter/MyData/mpm-benchmarks' already exists and is not an empty directory.\n"
]
}
],
"source": [
"!git clone https://github.com/cb-geo/mpm-benchmarks ~/MyData/mpm-benchmarks"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 22,
"id": "8593c08c-c96a-4a66-9b52-80b8b5c27e44",
"metadata": {
"tags": [
Expand Down Expand Up @@ -95,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 23,
"id": "91b811a4-45d9-4223-a145-c0f4e393af66",
"metadata": {},
"outputs": [],
Expand All @@ -116,7 +98,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 24,
"id": "0153c5cc-f4b9-460b-b4c6-d92eb8c6ede5",
"metadata": {},
"outputs": [
Expand All @@ -128,9 +110,9 @@
"---Job Info---\n",
"\n",
"{\n",
" \"appId\": \"mpm-1.1.0u3\",\n",
" \"appId\": \"mpm-1.0.0\",\n",
" \"name\": \"mpm-uniaxial\",\n",
" \"batchQueue\": \"development\",\n",
" \"batchQueue\": \"skx-dev\",\n",
" \"nodeCount\": 1,\n",
" \"processorsPerNode\": 1,\n",
" \"memoryPerNode\": \"1\",\n",
Expand Down Expand Up @@ -175,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 25,
"id": "4e6dc010-d821-45d5-805b-84620363f468",
"metadata": {},
"outputs": [],
Expand All @@ -185,15 +167,15 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 26,
"id": "06dd17dc-2540-46b3-9036-3245a9b6cfae",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Waiting for job to start: 2it [00:30, 15.09s/it, Status: RUNNING]\n",
"Waiting for job to start: 2it [00:30, 15.13s/it, Status: RUNNING] \n",
"Monitoring job: 0%| | 0/40 [00:00<?, ?it/s]"
]
},
Expand All @@ -208,7 +190,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Monitoring job: 10%|████▊ | 4/40 [01:00<09:03, 15.08s/it]"
"Monitoring job: 10%|████▊ | 4/40 [01:00<09:04, 15.13s/it]"
]
},
{
Expand All @@ -222,7 +204,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Monitoring job: 12%|██████ | 5/40 [01:15<08:49, 15.13s/it]"
"Monitoring job: 12%|██████ | 5/40 [01:15<08:50, 15.15s/it]"
]
},
{
Expand All @@ -245,7 +227,7 @@
"'FINISHED'"
]
},
"execution_count": 7,
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -256,7 +238,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 27,
"id": "614f3568-d290-44d9-896d-608375293a58",
"metadata": {},
"outputs": [
Expand All @@ -266,10 +248,17 @@
"text": [
"Runtime Summary\n",
"---------------\n",
"PENDING time: 0:00:00\n",
"QUEUED time: 0:00:05\n",
"RUNNING time: 0:01:09\n",
"TOTAL time: 0:01:35\n",
"PENDING time: 0:00:00\n",
"PROCESSING_INPUTS time: 0:00:03\n",
"STAGING_INPUTS time: 0:00:05\n",
"STAGED time: 0:00:00\n",
"STAGING_JOB time: 0:00:03\n",
"SUBMITTING time: 0:00:06\n",
"QUEUED time: 0:00:05\n",
"RUNNING time: 0:01:09\n",
"CLEANING_UP time: 0:00:00\n",
"ARCHIVING time: 0:00:08\n",
"TOTAL time: 0:01:39\n",
"---------------\n"
]
}
Expand All @@ -280,21 +269,10 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "5e2c642e-88c3-42be-acb6-2966cc31f90c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Transitioning from status ARCHIVING to FINISHED in phase ARCHIVING.'"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"ag.jobs.get(jobId=job[\"id\"])[\"lastStatusMessage\"]"
]
Expand All @@ -309,17 +287,17 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 20,
"id": "daf7f33a-594c-4a69-b2d3-bc39a434d154",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/home/jupyter/MyData/archive/jobs/job-7f1dcdf6-e747-47f0-9266-f210454faf13-007'"
"'/home/jupyter/MyData/archive/jobs/job-8d70a2b2-9295-4233-bade-9cc1834e9603-007'"
]
},
"execution_count": 10,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
Expand Down

0 comments on commit e0230d6

Please sign in to comment.