use of stamps_mc_header

310 views
Skip to first unread message

陈宇

unread,
Sep 12, 2018, 11:06:06 PM9/12/18
to MAINSAR
Dear all,

Has anyone successfuly used the command "stamps_mc_header"?

I set the n_cores=3, I run stamps_mc_header(2,2), it finished fast and gave the following :

>> stamps_mc_header(2,2)
1Done, ... pausing 20s for next job launch 
2Done, ... pausing 20s for next job launch 
3Done, ... pausing 20s for next job launch 


I checked the output files, no new outputs in the patch folders. In the INSAR_masterdate folder, the log_stamps_split_XX files showed nothing, as follows:

                            < M A T L A B (R) >
                  Copyright 1984-2015 The MathWorks, Inc.
                   R2015b (8.6.0.267246) 64-bit (glnxa64)
                              August 20, 2015

 
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
 
>> 


Does anyone know the reason?

Thank you very much

Yu 

David Bekaert

unread,
Sep 13, 2018, 1:33:05 AM9/13/18
to mai...@googlegroups.com
Better to print the statement that is being excecuted, not launching the job from within mc_header_Stamps , and launch the commands manual in multiple terminals. Rather use functionality to split patches and were you run the command. 

Outputs do not get logged depending on the type of operating system. It is not meant as a one fit all solution and not critical for running conventional stamps. you might need to look at the last 5 lines of code to make it work for your system. But would recommend the approach suggested above.

David

--
You received this message because you are subscribed to the Google Groups "MAINSAR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mainsar+u...@googlegroups.com.
To post to this group, send email to mai...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

陈宇

unread,
Sep 13, 2018, 1:35:55 AM9/13/18
to MAINSAR
David, Thanks a lot.

Yu

alexis.ap...@gmail.com

unread,
Sep 13, 2018, 5:38:09 AM9/13/18
to MAINSAR
Hello,

I did some changes that helped running successfully stamps_mc_header on Linux.
The problem is that you need to call the matlab command with nohup and that matlab looses the STAMPS path when running this way so you need to add it in the command calling matlab.
The script attached contains those fixes. Needs to run from $STAMPS/matlab. I hope it helps!
If you can use real multiple cores stamps_mc_header gives great performance gains for sure!

Best Regards
Alex Apostolakis
stamps_mc_header.m

alexis.ap...@gmail.com

unread,
Sep 13, 2018, 6:47:04 AM9/13/18
to MAINSAR
Clarification : The script needs just to be in the matlab directory of STAMPS ($STAMPS/matlab) where the original stamps_mc_header is. (It doesn't "need to run from $STAMPS/matlab")

陈宇

unread,
Sep 13, 2018, 11:48:51 PM9/13/18
to MAINSAR
Hi Alex,

thank you very much for these helpful information. 

Yu

Stoorm

unread,
Sep 17, 2018, 9:39:04 AM9/17/18
to MAINSAR
Hello, Alex

I used the script with your corrections, but unfortunately, I still have the same problem. The script starts data preparation (split) after every 20s for each patch (core), but does not start the calculation.
Thanks for your study of this problem.

Best regards
Vitaliy.


четверг, 13 сентября 2018 г., 12:38:09 UTC+3 пользователь alexis.ap...@gmail.com написал:

alexis.ap...@gmail.com

unread,
Sep 17, 2018, 12:52:34 PM9/17/18
to MAINSAR
Hello Vitaliy,

I'm writing my approach to the problem that will may help you.

First I tried to run stamps_mc_header (from the directory where the PATCH_X directories are).
Even though it displayed the messages every 20secs it failed to start the matlab commands but it had normally created the patch_list_split_<nthcpu> files and copied the parms.mat file to each PATCH_X directory.

I tried to run the matlab commands formed by the original script from a terminal but they did not work.
I then tried to run the stamps function from within matlab with the parallelisation option like this:

stamps(<start_step>, <end_step>, [], 0, 'patch_list_split_<nthcpu>', 1  )

It run successfully.

After some tries I manage to form the following shell command that run successfully on my system.
nohup matlab -nodesktop -nodisplay -r "addpath('your_stamps_mat_dir'); stamps(<start_step>, <end_step>, [], 0, 'patch_list_split_<nthcpu>', 1  ); exit" > log_stamps_split_<nthcpu>

The change is that I start with nohup (avoiding unexpected termination) and I add the matlab path of Stamps that is lost from matlab when started this way.
I believe that this way the command should successfully run on a wider range of system configuration.
This is the command that is formed by the script I posted. It also assumes that the system variable to StaMPS folder is STAMPS (line 156)
(Of course it needs to find the patch_list_split_<nthcpu> files and the parms.mat to each PATCH_X directory)

You may also uncomment the fprintf at line 163 of the posted script to see the command formed and try it directly from terminal or only the stamps  function from matlab.
Be sure to run from the directory where the PATCH_X directories are.

The command formed by the original script stamps_mc_header is like this:
matlab -nodesktop -nodisplay -r "stamps(<start_step>, <end_step>, [], 0, 'patch_list_split_<nthcpu>', 1  ); exit" > log_stamps_split_<ncpu>

Best Regards,
Alex Apostolakis


vamsh...@gmail.com

unread,
Jan 22, 2022, 12:41:25 PM1/22/22
to MAINSAR
Thanks for the code. 
Reply all
Reply to author
Forward
0 new messages