@@ -789,25 +789,29 @@ impl EthrexReplayCommand {
789789
790790 let backend = backend ( & opts. common . zkvm ) ?;
791791
792- // Always execute before proving, unless it's ZisK.
793- // This is because of ZisK's client initializing MPI, which can't be done
794- // more than once in the same process.
795- // https://docs.open-mpi.org/en/v5.0.1/man-openmpi/man3/MPI_Init_thread.3.html#description
796- let execution_result = if backend != Backend :: ZisK {
797- Some ( exec ( backend, cache. clone ( ) ) . await )
798- } else {
799- None
800- } ;
792+ match opts. common . action {
793+ Action :: Execute => {
794+ let execution_result = exec ( backend, cache. clone ( ) ) . await ;
801795
802- let proving_result = match opts. common . action {
803- Action :: Execute => None ,
804- Action :: Prove => Some ( prove ( backend, opts. common . proof_type , cache) . await ) ,
805- } ;
796+ println ! ( "Batch {batch} execution result: {execution_result:?}" ) ;
797+ }
798+ Action :: Prove => {
799+ // Always execute before proving, unless it's ZisK.
800+ // This is because of ZisK's client initializing MPI, which can't be done
801+ // more than once in the same process.
802+ // https://docs.open-mpi.org/en/v5.0.1/man-openmpi/man3/MPI_Init_thread.3.html#description
803+ #[ cfg( not( feature = "zisk" ) ) ]
804+ {
805+ let execution_result = exec ( backend, cache. clone ( ) ) . await ;
806+
807+ println ! ( "Batch {batch} execution result: {execution_result:?}" ) ;
808+ }
806809
807- println ! ( "Batch {batch} execution result: {execution_result:?}" ) ;
810+ let proving_result =
811+ prove ( backend, opts. common . proof_type , cache. clone ( ) ) . await ;
808812
809- if let Some ( proving_result ) = proving_result {
810- println ! ( "Batch {batch} proving result: {proving_result:?}" ) ;
813+ println ! ( "Batch {batch} proving result: {proving_result:?}" ) ;
814+ }
811815 }
812816 }
813817 #[ cfg( feature = "l2" ) ]
@@ -1022,23 +1026,27 @@ async fn replay_block(block_opts: BlockOptions) -> eyre::Result<()> {
10221026 let ( execution_result, proving_result) = if opts. no_zkvm {
10231027 ( Some ( replay_no_zkvm ( cache. clone ( ) , & opts) . await ) , None )
10241028 } else {
1025- // Always execute before proving, unless it's ZisK.
1026- // This is because of ZisK's client initializing MPI, which can't be done
1027- // more than once in the same process.
1028- // https://docs.open-mpi.org/en/v5.0.1/man-openmpi/man3/MPI_Init_thread.3.html#description
1029- # [ cfg ( feature = "zisk" ) ]
1030- let execution_result = None ;
1031- # [ cfg ( not ( feature = "zisk" ) ) ]
1032- let execution_result = Some ( exec ( backend , cache . clone ( ) ) . await ) ;
1033-
1034- let proving_result = if opts . common . action == Action :: Prove {
1035- // Only prove if requested
1036- Some ( prove ( backend , opts . common . proof_type , cache . clone ( ) ) . await )
1037- } else {
1038- None
1039- } ;
1029+ match opts . common . action {
1030+ Action :: Execute => {
1031+ let execution_result = exec ( backend , cache . clone ( ) ) . await ;
1032+
1033+ ( Some ( execution_result ) , None )
1034+ }
1035+ Action :: Prove => {
1036+ // Always execute before proving, unless it's ZisK.
1037+ // This is because of ZisK's client initializing MPI, which can't be done
1038+ // more than once in the same process.
1039+ // https://docs.open-mpi.org/en/v5.0.1/man-openmpi/man3/MPI_Init_thread.3.html#description
1040+ # [ cfg ( not ( feature = "zisk" ) ) ]
1041+ let execution_result = Some ( exec ( backend , cache . clone ( ) ) . await ) ;
1042+ # [ cfg ( feature = "zisk" ) ]
1043+ let execution_result = None ;
10401044
1041- ( execution_result, proving_result)
1045+ let proving_result = prove ( backend, opts. common . proof_type , cache. clone ( ) ) . await ;
1046+
1047+ ( execution_result, Some ( proving_result) )
1048+ }
1049+ }
10421050 } ;
10431051
10441052 let report = Report :: new_for (
@@ -1246,20 +1254,26 @@ pub async fn replay_custom_l1_blocks(
12461254
12471255 let backend = backend ( & opts. common . zkvm ) ?;
12481256
1249- // Always execute before proving, unless it's ZisK.
1250- // This is because of ZisK's client initializing MPI, which can't be done
1251- // more than once in the same process.
1252- // https://docs.open-mpi.org/en/v5.0.1/man-openmpi/man3/MPI_Init_thread.3.html#description
1253- #[ cfg( feature = "zisk" ) ]
1254- let execution_result = None ;
1255- #[ cfg( not( feature = "zisk" ) ) ]
1256- let execution_result = Some ( exec ( backend, cache. clone ( ) ) . await ) ;
1257-
1258- let proving_result = if opts. common . action == Action :: Prove {
1259- // Only prove if requested
1260- Some ( prove ( backend, opts. common . proof_type , cache. clone ( ) ) . await )
1261- } else {
1262- None
1257+ let ( execution_result, proving_result) = match opts. common . action {
1258+ Action :: Execute => {
1259+ let execution_result = exec ( backend, cache. clone ( ) ) . await ;
1260+
1261+ ( Some ( execution_result) , None )
1262+ }
1263+ Action :: Prove => {
1264+ // Always execute before proving, unless it's ZisK.
1265+ // This is because of ZisK's client initializing MPI, which can't be done
1266+ // more than once in the same process.
1267+ // https://docs.open-mpi.org/en/v5.0.1/man-openmpi/man3/MPI_Init_thread.3.html#description
1268+ #[ cfg( not( feature = "zisk" ) ) ]
1269+ let execution_result = Some ( exec ( backend, cache. clone ( ) ) . await ) ;
1270+ #[ cfg( feature = "zisk" ) ]
1271+ let execution_result = None ;
1272+
1273+ let proving_result = prove ( backend, opts. common . proof_type , cache. clone ( ) ) . await ;
1274+
1275+ ( execution_result, Some ( proving_result) )
1276+ }
12631277 } ;
12641278
12651279 let report = Report :: new_for (
0 commit comments