File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
user_session/routers/surface Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,8 @@ async def _create_new_job(self, user_id: str) -> None:
9292 # these could be dynamic based on e.g. the selected ensemble sizess by the user.
9393 json = {
9494 "resources" : {
95- "limits" : {"memory" : "128GiB " , "cpu" : "16 " },
96- "requests" : {"memory" : "32GiB" , "cpu" : "4 " },
95+ "limits" : {"memory" : "64GiB " , "cpu" : "4 " },
96+ "requests" : {"memory" : "32GiB" , "cpu" : "2 " },
9797 }
9898 },
9999 )
Original file line number Diff line number Diff line change @@ -70,13 +70,13 @@ async def well_intersection_reals_from_user_session(
7070 for res in res_array :
7171 tot_mb += len (res ) / (1024 * 1024 )
7272 bytesios = [BytesIO (bytestr ) for bytestr in res_array ]
73- xtgeofiles = [_XTGeoFile (bytestr ) for bytestr in bytesios ]
74- test = [BytesIO (bytestr ).read () for bytestr in res_array ]
73+ # xtgeofiles = [_XTGeoFile(bytestr) for bytestr in bytesios]
74+ # test = [BytesIO(bytestr).read() for bytestr in res_array]
7575 elapsed_bytesio = timer .lap_s ()
7676
77- surfaces = [
78- xtgeo .surface_from_file (bytestr , fformat = "irap_binary" ) for bytestr in bytesios
79- ]
77+ # surfaces = [
78+ # xtgeo.surface_from_file(bytestr, fformat="irap_binary") for bytestr in bytesios
79+ # ]
8080 elapsed_xtgeo = timer .lap_s ()
8181
8282 # surfaces2 = [
@@ -140,12 +140,8 @@ def read_header(buf):
140140
141141def read_values_optimized (header , buf ):
142142 stv = 100
143- n_blocks = (len (buf ) - stv ) // (
144- header ["ncol" ] * 4 + 8
145- ) # approximate number of blocks
146- datav = np .empty (
147- (header ["ncol" ] * n_blocks ,), dtype = np .float32
148- ) # preallocated array
143+ n_blocks = (len (buf ) - stv ) // (header ["ncol" ] * 4 + 8 )
144+ datav = np .empty ((header ["ncol" ] * n_blocks ,), dtype = np .float32 ) # preallocate
149145
150146 idx = 0
151147 while stv < len (buf ):
You can’t perform that action at this time.
0 commit comments