Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
3c26199
starting import launcher handling
jafranc Oct 30, 2025
abfd58f
starting import launcher handling
jafranc Oct 30, 2025
99a2176
Merge remote-tracking branch 'origin/main' into jafranc/feat/trame-HP…
jafranc Nov 14, 2025
2d1c395
some more imports
jafranc Nov 17, 2025
46899b4
wip
jafranc Nov 18, 2025
e9dd40d
wip
jafranc Nov 19, 2025
218c735
wip
jafranc Nov 19, 2025
8a361d2
wip
jafranc Nov 19, 2025
cad9c39
wip
jafranc Nov 20, 2025
84f4452
start login backend
jafranc Nov 20, 2025
ce820e7
ssh login
jafranc Nov 21, 2025
727c927
Unlock runner
jafranc Nov 21, 2025
3dc8a83
wip
jafranc Nov 21, 2025
077e6fa
full PoC
jafranc Nov 21, 2025
19c04e3
wip
jafranc Nov 22, 2025
3eaabe9
authorship
jafranc Nov 25, 2025
d54f8b3
change host
jafranc Nov 27, 2025
c1a8395
wip
jafranc Nov 28, 2025
8596472
update versions f/ VFileUpload
jafranc Nov 28, 2025
db83e7a
another view
jafranc Dec 1, 2025
21b4492
new list update
jafranc Dec 1, 2025
6c50a55
loading files complete
jafranc Dec 2, 2025
4535890
first working v
jafranc Dec 2, 2025
46a328d
Merge branch 'jafranc/feat/trame-HPC-launcher' of https://github.com/…
jafranc Dec 2, 2025
0c437b0
start status
jafranc Dec 2, 2025
81c1fc5
nicer
jafranc Dec 2, 2025
6405533
job status track
jafranc Dec 2, 2025
c0a5364
kill jobs enable
jafranc Dec 3, 2025
4195ef8
working w/o copyback
jafranc Dec 3, 2025
8c04e46
regexp working
jafranc Dec 3, 2025
485446c
less cumbersome
jafranc Dec 3, 2025
51f112f
first attempt at copy back
jafranc Dec 3, 2025
7c43b0e
last details
jafranc Dec 3, 2025
1b01967
update regex
jafranc Dec 4, 2025
e2dca24
fixed comment section
jafranc Dec 4, 2025
6e3dfc4
start simulation progress
jafranc Dec 4, 2025
f3acd23
notes and cleanup
jafranc Dec 8, 2025
6510a41
alternate strat copy back
jafranc Dec 8, 2025
06c5fe9
yapf
jafranc Dec 10, 2025
66368fc
discard sim_status_view
jafranc Dec 10, 2025
30f67fb
import error
jafranc Dec 11, 2025
495070e
spliting up big block
jafranc Dec 16, 2025
4d705bf
continuig
jafranc Dec 17, 2025
c14d425
wip
jafranc Dec 24, 2025
80ebd8f
refactor cluster entries
jafranc Dec 29, 2025
5d88f14
correct update
jafranc Dec 29, 2025
4fe819b
wip
jafranc Dec 29, 2025
b85c76a
some fixes
jafranc Dec 29, 2025
b1ef3df
completion bars
jafranc Dec 30, 2025
1dd6f1b
fast clean up
jafranc Dec 30, 2025
b02fa3d
update
jafranc Dec 30, 2025
a3ae2fc
Headers and some typing
jafranc Dec 30, 2025
8108151
clean up and typing
jafranc Dec 30, 2025
0e62301
some typing
jafranc Dec 30, 2025
de77419
adjust install and pathing
jafranc Jan 6, 2026
7a5001d
Merge commit '168105c52cb1f313ebdcebc9050a480a8c94434d' into jafranc/…
jafranc Jan 6, 2026
f5f9a6c
sd works for external mesh
jafranc Jan 7, 2026
89273f0
simpler
jafranc Jan 7, 2026
50a8c10
with internal mesh too
jafranc Jan 7, 2026
bb2d3f8
beautify
jafranc Jan 7, 2026
d5bc8e4
init paths before copy
jafranc Jan 7, 2026
9a91327
Add .geos to file type filter in simulation view
jafranc Jan 8, 2026
7405c36
env and assets loading logique
jafranc Jan 8, 2026
a86428c
small fix
jafranc Jan 8, 2026
aad6c24
fine-grained conf
jafranc Jan 19, 2026
ea923b4
typo
jafranc Jan 19, 2026
b6d64ca
typos
jafranc Jan 19, 2026
6f1a0a5
rename transfer partition
jafranc Jan 19, 2026
924fdca
fixing imporper eval of num unk
jafranc Feb 5, 2026
7808a0c
Merge branch 'main' into jafranc/feat/trame-HPC-launcher
jafranc Feb 5, 2026
9576aad
.vtk for wells meshes
jafranc Feb 27, 2026
48fd308
all req - wip
jafranc Feb 27, 2026
0f1b6cf
Merge remote-tracking branch 'origin/main' into jafranc/feat/trame-HP…
jafranc Feb 27, 2026
e2ac755
Merge branch 'main' into jafranc/feat/trame-HPC-launcher
jafranc May 6, 2026
ce37eef
add list of req files before run
jafranc May 7, 2026
69f81d2
mypying
jafranc May 7, 2026
c6e61c9
mypy
jafranc May 11, 2026
b4c2d8f
cleanup mypy/yapf
jafranc May 11, 2026
0582a23
old mypy/yapf fix
jafranc May 11, 2026
9bb73b0
last test fixes
jafranc May 11, 2026
192f6ed
yapf
jafranc May 11, 2026
f583ec4
Update .gitignore to include user-specs note
jafranc May 11, 2026
abf05f7
Merge remote-tracking branch 'origin/main' into jafranc/feat/trame-HP…
jafranc May 11, 2026
9ab7def
Merge branch 'jafranc/feat/trame-HPC-launcher' of https://github.com/…
jafranc May 11, 2026
9dc18a4
Update Docker image for integration tests
jafranc May 12, 2026
88d8429
Update test_geos_integration.yml
jafranc May 12, 2026
080f458
Update test_geos_integration.yml
jafranc May 12, 2026
97f55e5
test fix ci
jafranc May 13, 2026
a19215e
Update python-package.yml
jafranc May 13, 2026
31bef2f
Update test_geos_integration.yml
jafranc May 13, 2026
92f574b
Update test_geos_integration.yml
jafranc May 13, 2026
5a6d60c
Update PIP_CMD in test_geos_integration.yml
jafranc May 14, 2026
52edd32
Update test_geos_integration.yml
jafranc May 14, 2026
50629fe
Update installation of build dependencies
jafranc May 15, 2026
252d4ae
Update test_geos_integration.yml
jafranc May 15, 2026
93fbf44
Update test_geos_integration.yml
jafranc May 15, 2026
1c49947
Update test_geos_integration.yml
jafranc May 15, 2026
63881c0
CI fix
jafranc May 18, 2026
59e6442
fix CI
jafranc May 18, 2026
3fe1ece
Merge branch 'main' into jafranc/feat/trame-HPC-launcher
jafranc May 18, 2026
54695fa
allow break-packages in install
jafranc May 18, 2026
1bd1c92
Merge branch 'jafranc/feat/trame-HPC-launcher' of https://github.com/…
jafranc May 18, 2026
eb6d96e
remove wheel to avoid deb s conflict
jafranc May 18, 2026
141bfd4
fix CI
jafranc May 18, 2026
5d536cb
fix CI
jafranc May 18, 2026
cdaa6fc
fix CI
jafranc May 18, 2026
22f1a22
local env attempt
jafranc May 18, 2026
4417564
local env attempt
jafranc May 18, 2026
0f4a220
fixing bad copilot integration
jafranc May 18, 2026
d7316b4
restore full CI
jafranc May 18, 2026
7525816
restore full CI
jafranc May 18, 2026
616e3ef
few fixes
jafranc May 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
init paths before copy
  • Loading branch information
jafranc committed Jan 7, 2026
commit d5bc8e4d5ccb63943ae6b3526893963f12f5f2d0
2 changes: 1 addition & 1 deletion geos-trame/src/geos/trame/app/io/hpc_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def compute( n_unknowns: int,
memory_per_unknown_bytes: int,
node_memory_gb: int,
cores_per_node: int,
min_unknowns_per_rank: int = 10,
min_unknowns_per_rank: int = 10000,
strong_scaling: bool = True ) -> list[ dict ]:
"""Suggests node/rank distribution for a cluster computation.

Expand Down
102 changes: 58 additions & 44 deletions geos-trame/src/geos/trame/app/io/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,28 @@ def run_simulation() -> None:
# if server.state.access_granted and server.state.sd and server.state.simulation_xml_filename:
if server.state.access_granted and server.state.simulation_xml_filename and server.state.decomposition:
if Authentificator.ssh_client:
# create remote path
try:
sftp = Authentificator.ssh_client.open_sftp()
sftp.stat( server.state.simulation_remote_path )
except FileNotFoundError:
import posixpath
jpart = '/'
for part in server.state.simulation_remote_path.split('/')[1:]:
try:
jpart = posixpath.join(jpart,part)
sftp.stat( str(jpart) ) # exists?
except FileNotFoundError:
sftp.mkdir( str(jpart) )
except PermissionError:
print( f"Permission error creating root folder at {jpart}")
raise
except:
print( f"Error creating root folder at {jpart}")
raise

# create local path
os.makedirs(server.state.simulation_dl_path, exist_ok=True)

Authentificator._sftp_copy_tree( Authentificator.ssh_client,
Simulation.gen_tree( server.state.simulation_xml_filename ),
Expand Down Expand Up @@ -158,52 +180,42 @@ def _start_result_streams( self ) -> None:
def check_jobs( self ) -> None:
"""Check on running jobs and update their names and progresses."""
if Authentificator.ssh_client:
try:
jid = self._server.state.job_ids
for index, job in enumerate( jid ):
job_id = job[ 'job_id' ]
jid = self._server.state.job_ids
for index, job in enumerate( jid ):
job_id = job[ 'job_id' ]
_, sout, _ = Authentificator._execute_remote_command(
Authentificator.ssh_client, f'sacct -j {job_id} -o JobID,JobName,State --noheader' )
job_line = sout.strip().split( "\n" )[ -1 ]

jid[ index ][ 'status' ] = job_line.split()[ 2 ]
jid[ index ][ 'name' ] = job_line.split()[ 1 ]

if ( jid[ index ][ 'status' ] == 'RUNNING' ):
_, sout, _ = Authentificator._execute_remote_command(
Authentificator.ssh_client,
f"sacct -j {job_id} -o ElapsedRaw,TimelimitRaw --noheader --parsable2 | head -n 1 " )
progress_line = sout.strip().split( "|" )
jid[ index ][ 'slprogress' ] = str(
float( progress_line[ 0 ] ) / float( progress_line[ 1 ] ) / 60 * 100 )

# getthe completed status
pattern = re.compile( r'\((\d+(?:\.\d+)?)%\s*completed\)' )
_, sout, _ = Authentificator._execute_remote_command(
Authentificator.ssh_client, f'sacct -j {job_id} -o JobID,JobName,State --noheader' )
job_line = sout.strip().split( "\n" )[ -1 ]

jid[ index ][ 'status' ] = job_line.split()[ 2 ]
jid[ index ][ 'name' ] = job_line.split()[ 1 ]

if ( jid[ index ][ 'status' ] == 'RUNNING' ):
_, sout, _ = Authentificator._execute_remote_command(
Authentificator.ssh_client,
f"sacct -j {job_id} -o ElapsedRaw,TimelimitRaw --noheader --parsable2 | head -n 1 " )
progress_line = sout.strip().split( "|" )
jid[ index ][ 'slprogress' ] = str(
float( progress_line[ 0 ] ) / float( progress_line[ 1 ] ) / 60 * 100 )

# getthe completed status
pattern = re.compile( r'\((\d+(?:\.\d+)?)%\s*completed\)' )
_, sout, _ = Authentificator._execute_remote_command(
Authentificator.ssh_client,
f"grep \"completed\" {self._server.state.simulation_remote_path}/job_GEOS_{job_id}.out | tail -1"
)
m = pattern.search( sout.strip() )
if m:
jid[ index ][ 'simprogress' ] = str( m.group( 1 ) )

print(
f"{job_line}-{job_id}\n job id:{jid[index]['job_id']}\n status:{jid[index]['status']}\n name:{jid[index]['name']} \n --- \n"
Authentificator.ssh_client,
f"grep \"completed\" {self._server.state.simulation_remote_path}/job_GEOS_{job_id}.out | tail -1"
)
self._server.state.job_ids = jid
self._server.state.dirty( "job_ids" )
self._server.state.flush()

except PermissionError as e:
print( f"Permission error: {e}" )
except IOError as e:
print( f"Error accessing remote file or path: {e}" )
except Exception as e:
print( f"An error occurred during SFTP: {e}" )

return None
else:
return None
m = pattern.search( sout.strip() )
if m:
jid[ index ][ 'simprogress' ] = str( m.group( 1 ) )

print(
f"{job_line}-{job_id}\n job id:{jid[index]['job_id']}\n status:{jid[index]['status']}\n name:{jid[index]['name']} \n --- \n"
)
self._server.state.job_ids = jid
self._server.state.dirty( "job_ids" )
self._server.state.flush()

return None

@staticmethod
def render_and_run( template_name: str, dest_name: str, server: Server, **kwargs: Any ) -> str:
Expand Down Expand Up @@ -289,4 +301,6 @@ def gen_tree( xml_filename: Any ) -> dict:
}
}
}

print( f"Generated FILE_TREE: {FILE_TREE}" )
return FILE_TREE
40 changes: 31 additions & 9 deletions geos-trame/src/geos/trame/app/io/ssh_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,34 @@ def dfs_tree( node: list | dict, path: str, sftp: paramiko.SFTPClient, remote_ro
if isinstance( node, list ):
for file in node:
print( f"copying {lp/Path(file.get('name'))} to {rp/Path(file.get('name'))}" )
with sftp.file( str( rp / Path( file.get( 'name' ) ) ), 'w' ) as f:
f.write( file.get( 'content' ) )
try:
with sftp.file( str( rp / Path( file.get( 'name' ) ) ), 'w' ) as f:
f.write( file.get( 'content' ) )
except:
print( f"Error copying {lp/Path(file.get('name'))} to {rp/Path(file.get('name'))}")
raise
elif isinstance( node, dict ):
if "files" in node:
files = node[ 'files' ]
for file in files:
print( f"copying {lp/Path(file.get('name'))} to {rp/Path(file.get('name'))}" )
with sftp.file( str( rp / Path( file.get( 'name' ) ) ), 'w' ) as f:
f.write( file.get( 'content' ) )
try:
with sftp.file( str( rp / Path( file.get( 'name' ) ) ), 'w' ) as f:
f.write( file.get( 'content' ) )
except:
print( f"Error copying {lp/Path(file.get('name'))} to {rp/Path(file.get('name'))}")
raise
if "subfolders" in node:
for subfolder, content in node[ "subfolders" ].items():
try:
sftp.stat( str( rp / Path( subfolder ) ) )
except FileNotFoundError:
print( f"creating {rp/Path(subfolder)}" )
sftp.mkdir( str( rp / Path( subfolder ) ) )
try:
print( f"creating {rp/Path(subfolder)}" )
sftp.mkdir( str( rp / Path( subfolder ) ) )
except:
print( f"Error creating {rp/Path(subfolder)} on remote.")
raise
Authentificator.dfs_tree( content, str( lp / Path( subfolder ) ), sftp, remote_root )

for folder, content in node.items():
Expand All @@ -108,7 +120,11 @@ def dfs_tree( node: list | dict, path: str, sftp: paramiko.SFTPClient, remote_ro
sftp.stat( str( rp / Path( folder ) ) )
except FileNotFoundError:
print( f"creating {rp/Path(folder)}" )
sftp.mkdir( str( rp / Path( folder ) ) )
try:
sftp.mkdir( str( rp / Path( folder ) ) )
except:
print( f"Error creating {rp/Path(subfolder)} on remote.")
raise
Authentificator.dfs_tree( content, str( lp / Path( folder ) ), sftp, remote_root )

@staticmethod
Expand Down Expand Up @@ -226,9 +242,15 @@ def _execute_remote_command( client: paramiko.SSHClient, command: str ) -> tuple

print( f"Command exited with status: {exit_status}" )
return ( exit_status, stdout_data, stderr_data )


except PermissionError as e:
print( f"Permission error: {e}" )
return ( -1, "", "" )
except IOError as e:
print( f"Error accessing remote file or path: {e}" )
return ( -1, "", "" )
except Exception as e:
print( f"Error executing command: {e}" )
print( f"An error occurred during SFTP: {e}" )
return ( -1, "", "" )

@staticmethod
Expand Down
1 change: 0 additions & 1 deletion geos-trame/src/geos/trame/app/ui/simulation_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def run_remove_jobfile( index_to_remove: int ) -> None:
server.state.simulation_xml_filename = []
server.state.selected_cluster_names = [ cluster.name for cluster in Authentificator.sim_constants ]
# server.state.decompositions = []
# server.state.sd = None

vuetify.VDivider( vertical=True, thickness=5, classes="mx-4" )
with vuetify.VCol( cols=1 ):
Expand Down
Loading