Run exe file in MATLAB using multiple cores

Hi,
I am using MATLAB to run OpenSeesSP.exe. Typically, I use the below code to run OpenSees using single core and it runs in MATLAB command window
system(['OpenSeesSP ' 'fileName.tcl']);
To run OpenSeesSP using multiple cores, I use the following code. However, OpenSeesSP runs in an external cmd window
!"C:\Program Files\MPICH2\bin\mpiexec.exe" -np 5 OpenSeesSP.exe fileName.tcl &
What should I use to run OpenSeesSP with multiple cores in MATLAB command window not in an external cmd window. I tried the below line of code but it did not work.
system(['"C:\Program Files\MPICH2\bin\mpiexec.exe" -np 5 OpenSeesSP.exe' 'fileName.tcl']);
Basically, I am gonna use this command in a for loop where I need some output from OpenSeesSP to proceed with the for loop. Thus, I need MATLAB to wait until OpenSeesSP completes its analysis.
Thanks!

댓글 수: 3

Mario Malic
Mario Malic 2020년 9월 22일
편집: Mario Malic 2020년 9월 23일
See here, these properties might be what you're looking for
Exe_Process.StartInfo.UseShellExecute
Exe_Process.StartInfo.CreateNoWindow
Also, try with
system(['''C:\Program Files\MPICH2\bin\mpiexec.exe'' -np 5 OpenSeesSP.exe' 'fileName.tcl']);
% ^^ ^^ double apostrophee
Or OpenSeesSP.exe accepts argument for multiple cores, without running mpiexec.
Try specifiy the full path to OpenSeesSP.exe
Jan
Jan 2021년 2월 3일
Please explain, what "did not work" means. The details matter to understand, what the problem is.

댓글을 달려면 로그인하십시오.

답변 (2개)

Byron Z
Byron Z 2021년 1월 19일

0 개 추천

Hi, I'm using opensees to caculate a large model BUT I found that I can't download the OpenseesSP.exe...... Could you give me a copy file or a link?

댓글 수: 8

Mario Malic
Mario Malic 2021년 1월 19일
When I checked this last time, the program was hosted on one of the University sites.
Byron Z
Byron Z 2021년 2월 2일
eh, do you remember any information about the site? I've found it for several weeks, and the information was little. So, maybe, I think, can you email me your OpenSeesSP-set-up file?
Thanks a lot, sin
Byron Z
Byron Z 2021년 2월 3일
when i click the submit bottom, i found it error:database error 111., trying everything i can do for seveal weeks and i couldn't download OpenSeesSP.exe file. that's why I'm looking for someone for emailing me the set-up file who uses this software. So, really, can you send it to me? Please, email: shicunfuyang@gmail.com
Walter Roberson
Walter Roberson 2021년 2월 3일
편집: Walter Roberson 2021년 2월 3일
I do not have the software.
Could you confirm that you went through the registration page, and were told that your registration was accepted?
Byron Z
Byron Z 2021년 2월 3일
when I go to the registration page, it shows not found. So I don't know weather the website is shut down.
So I really want to know that when you submit your email, what page or error you get? And can you download the software, not like me? I'm really going crazy when I calculate the model by only one core......
https://opensees.berkeley.edu/community/ucp.php?mode=register just might work??
Byron Z
Byron Z 2021년 2월 3일
hhhhhhhhhaaaaaaaaa, yes!!! thankyou, I've download it, thank you again

댓글을 달려면 로그인하십시오.

matias garrido
matias garrido 2021년 2월 1일
편집: matias garrido 2021년 2월 1일

0 개 추천

Hi, I'm run OpenSeesSPv2.4 with a parfor (run each model with 2 cores, and run simultaneusly 4 models). I use this code lines for run OpenSeesSP since matlab.
% Run the model.
% -------------------------------------------------------------------------
oldFolder = cd(Path_current);
command = ['mpiexec -n 2 OpenSeesSP_x64 Dynamic_Analysis.tcl'];
[status,~] = system(command); % Run OpenSees.
cd(oldFolder);
I hope that it will help you.
What is your OpenSeesSP version?, I need a current version of OpenSeesSP, at least a version that allow run a model with 6 inputs ground motion (3 translational with 3 rotational).
Bests, M.

카테고리

도움말 센터File Exchange에서 Downloads에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2020년 9월 22일

댓글:

2021년 2월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by