Netgen with EIDORS - matlab

i want to run netgen in a command line in EIDORS Matlab but every time i come across this problem that matlab ask me for the path of the netgen. i receive this message every time.
'ng' is not recognized as an internal or external command,
operable program or batch file.
Netgen call failed. Is netgen installed and on the search path?
If you are running under windows, I can attempt to create
a batch file to access netgen.
Please enter the directory in which to find netgen.
If you don't have a copy, download it fromhttp://www.hpfem.jku.at/netgen/
Note that you MUST use names without spaces. Thus
instead of C:/Program Files/ write C:/Progra~1/
netgen_path?
yet i define new system variable in windows advanced system configuration and over there i gave the path of the tcl library but it didn't work.
May any body help me ?

Install netgen first. Go here to download:
http://sourceforge.net/projects/netgen-mesher/
Go "Files" entry to download more variant version of netgen. Take note that EIDORS 3.6 is only compatible up to the latest version of netgen-5.0.
I am using Windows 7, 64-bit Operating System. Installation of netgen with x64 and Win32 are worked fine for me. But because as you said, EIDORS requires netgen path to be no space, so when installation, I choose a path other than default "Program Files" (or similar), which has no space.
When EIDORS asks for the netgen path, give the path name until "\bin". These procedures are worked in my computer.

You can place the netgen.exe path " ...\bin " within the matlab toolbox:
How to Set Path in Matlab
thereby not needing to paste the path into EIDORS each time you run it in MATLAB.
Also downloading EIDORS 3.8 with Netgen 5.3 as a zip file avoids having to install netgen separately.

Related

Using Matlab runtime on Mac and Linux

I am trying to use MCR to run an executable file that I created using
mcc -mv mycode.m
I installed MCR (2017a Matlab) for Mac from here https://uk.mathworks.com/products/compiler/matlab-runtime.html. After this, I edited the .bashrc file to set the path as instructed at the end of installation by:
export DYLD_LIBRARY_PATH=/Applications/MATLAB/MATLAB_Runtime/v92/runtime/maci64:/Applications/MATLAB/MATLAB_Runtime/v92/sys/os/maci64:/Applications/MATLAB/MATLAB_Runtime/v92/bin/maci64
After the above I typed in terminal to run the executable file as:
sh mycode.sh
But this gives the following message
Usage: mycode.sh deployedMCRroot args
Can anyone help me with what I may be missing here?
I am right now installing MCR on the same machine on which I used MATLAB to
generate executable file. I am doing this to test the output file.
deployedMCRroot refers to the directory in which you installed the MCR. Supposing that your script doesn't require any additional argument, if you installed MCR under /Applications/MCR/, you should type the following command in order to make your script work:
sh mycode.sh /Applications/MCR/
Normally, at installation time, the MCR framework is installed in the chosen directory but placed into a subfolder describing its version. So it's possible that you may be required the correct MCR framework specifying the proper version as follows:
sh mycode.sh /Applications/MCR/v70/

MATLAB how to set the path before running an executable

When the executable runs I'm trying to make it access another folder saved on my flash drive. I have tried adding addpath() before the script but that doesn't work. I am trying to make the executable search for the mcr folder I have installed on my flash drive before running the main project. So far it keeps crashing trying to search for the runtime folder.
Error
Could not find version 9.0.1 of MATLAB Runtime.
Attempting to load mclmcrrt9_0_1.dll.
Please install the correct version of the MATLAB Runtime. Contact your vendor if you do not have an installer for the MATLAB Runtime.
I understand that when you install the MATLAB Runtime it installs in the C Drive. But I installed it on my flash drive. So that when I used different PC's I didn't have to install the runtime every time. But every time I use a different PC that error always shows. So I'm trying to set the PATH in my executable so that it will always know to find the Runtime folder on my flash drive.
You have to set the path before you launch the (matlab created) exe - you cant set it from within Matlab. You can do this by creating a script, e.g. on windows create run.bat (drive and path to your exe assumed)
path = E:\MCR\v90\runtime\win64
yourMatlab.exe

unable to run php cli from the command line when xampp portable is installed in another drive

I have installed a xampp portable package on my drive D, added the php folder path inside it on the system environment so I would be able to run php basically anywhere from the command line. but when i try to check if its working by executing the "php -v" command, it runs but i get this following error/warning messages.
"Warning: PHP Startup: Unable to load dynamic library 'xampp-portable\php\ext[:any].dll - The specified module could not be found."
*the [:any] there just means some dll filename.
and i get a lot of that warnings with just varying dll filenames,
anyway, here's the catch. when i do change my current path in the command line to somewhere in drive D, and then run the same command "php -v" it runs smoothly.
so what configuration should i do to fix this problem?
by the way, i do the same with mysql, putting its bin directory path on the system enviroment, run it in both inside drive C and drive D. and it runs smoothly. so i guess this problem is only on php.
I've posted the same question in xampp forums and this is the answer that was given to me. I'll be quoting the answer as it was and give credit to the one who answere it.
XAMPP is very proud that it don't have to set any environment
variables or registry values.
What you want to do is not possible with XAMPP portable without
mapping to a specific Drive letter. All configurations in xampp
portable have relative paths, so if you want to use cli from a
different drive letter, php can be executed, but all extensions of
them throw errors.
I would install the full version of XAMPP, map it to the current drive
letter with help of the setup_xampp.bat file and use the XAMPP control
panel Shell instead of default command line (advantage: The XAMPP
control panel shell sets local include paths to the needed XAMPP
folders).
Works for me (i can even use pear, git, composer, and other cli
scripts with the Xampp Shell if correct integrated).
best wishes, Altrea
credits to Altrea
Open your php.ini file, replace all relative paths to absolute paths. Eg: \xampp\ to C:\xampp\

Running Matlab MCR and MATLAB on the Same Machine

I'm having trouble getting a compiled .exe file to run with MCR instead of Matlab (I can tell because the program is using multiple threads, which it would not do if it were running with MCR). The MATLAB documentation (http://www.mathworks.com/help/toolbox/compiler/f12-999353.html) says:
"To run deployed components against the MCR install, mcr_root\ver\runtime\win32|win64 must appear on your system path before matlabroot\runtime\win32|win64.
If mcr_root\ver\runtime\arch appears first on the compiled application path, the application uses the files in the MCR install area.
If matlabroot\runtime\arch appears first on the compiled application path, the application uses the files in the MATLAB Compiler installation area."
Can anyone connect the dots a bit more for me? I don't know what this means. Thanks!
I had the same problem: my compiled code was multithreaded, which I did not want.
The problem got solved by compiling with the option:
-R -singleCompThread
You need to set properly the PATH global environment variable in Windows. How you do it exactly depends on Windows version.
Here is the first link from Google by query "set path on Windows": http://www.computerhope.com/issues/ch000549.htm
This variable is a list of directories. Make sure you have a directory with MCR executable earlier in this list than a directory with MATLAB executable.

Runtime error for MCC compiled program using parfor

I have problems running a program compiled with MCC that uses parfor. The non-compiled .m version works (no bug). When I run the compiled version, I get
"distcomp.remoteparfor" is undefined. I believe I exactly have the error described in
the following link.
http://www.mathworks.com/support/solutions/en/data/1-PAHWE/index.html?product=CO&solution=1-PAHWE
However, since MCR is not installed on my machine (got Matlab and MCC),
I am wondering what the pathes $APPNAME_mcr/java/jar/toolbox and
$MCR/MATLAB Component Runtime/v70/java/jar/toolbox correspond to. I found
the distcomp.jar file in C:\Program Files\MATLAB\R2011b\java\jar\toolbox, but I don't know where to put it since see any path corresponding to $MCR/MATLAB Component Runtime/v70/java/jar/toolbox since MCR is not installed.
Thanks a lot!
Fred
No need to install the MCR if you are simply trying to run the application on the same machine that has MATLAB. The question to ask is, HOW are you launching the compiled application? From a DOS command window? From within MATLAB using the SYSTEM command?
If you are launching the application from a DOS / UNIX command line, then the important thing to keep in mind is that the MATLAB binaries need to be on your system path i.e. just make sure:
$MATLABROOT\bin\$ARCH
is on your system path. Where $MATLABROOT is the matlab installation folder, and $ARCH is your system architecture. For example:
c:\work\matlab\bin\win64
on my machine since my installation folder which contains MATLAB is:
c:\work
and i am on a win64 machine.
The problem is solved. The solution is to make the program
a function instead of a script :
http://www.mathworks.com/matlabcentral/answers/22825-parfor-errors-when-file-is-compiled