Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
32-bit Matlab on 64-bit Linux

Subject: 32-bit Matlab on 64-bit Linux

From: Gautam

Date: 29 Sep, 2010 20:09:10

Message: 1 of 7

Hi,

I've some mex code(compiled by somebody else on 32-bit machines) but I currently have a 64-bit version of Matlab installed on 64-bit ubuntu.

I saw this suggestion from somebody-
http://www.mathworks.cn/matlabcentral/newsreader/view_thread/100595
"The fix (since you can't recompile the .mex files) is to run the x86 version of Matlab, which you can install alongside the native x86_64 version. Once you've done that, whenever you need to run your .mexglx files, start Matlab with 'matlab -glnx86'."

So I decided to search if this was actually possible and I found two threads from mathworks.com which I personally believe contradict each other with their answers-
http://www.mathworks.com/support/solutions/en/data/1-O7POO/
http://www.mathworks.com/support/solutions/en/data/1-1CAT7/

So my question is whether 32-bit matlab can be installed on a 64bit machine ?

Thanks

Subject: 32-bit Matlab on 64-bit Linux

From: Michael

Date: 29 Sep, 2010 21:20:37

Message: 2 of 7

On Sep 29, 1:09 pm, "Gautam " <gautam.iiith...@gmail.com> wrote:
> Hi,
>
> I've some mex code(compiled by somebody else on 32-bit machines) but I currently have a 64-bit version of Matlab installed on 64-bit ubuntu.
>
> I saw this suggestion from somebody-http://www.mathworks.cn/matlabcentral/newsreader/view_thread/100595
> "The fix (since you can't recompile the .mex files) is to run the x86 version of Matlab, which you can install alongside the native x86_64 version. Once you've done that, whenever you need to run your .mexglx files, start Matlab with 'matlab -glnx86'."
>
> So I decided to search if this was actually possible  and I found two threads from mathworks.com which I personally believe contradict each other with their answers-http://www.mathworks.com/support/solutions/en/data/1-O7POO/http://www.mathworks.com/support/solutions/en/data/1-1CAT7/
>
> So my question is whether 32-bit matlab can be installed on a 64bit machine ?
>
> Thanks

I have 32- and 64-bit Matlab installed on Mac OS-X 10.6x, and both
work fine.

Good luck,
-Michael

Subject: 32-bit Matlab on 64-bit Linux

From: Gautam

Date: 29 Sep, 2010 22:02:05

Message: 3 of 7

Michael,

I already had this from one of the links: 'Mac users do not have the same kind of exposure to these concerns and can generally ignore this topic. This is because OS X 10.5 and 10.6 do not have any user-visible distinction between 32-bit and 64-“bit-ness” in the OS'.

My question pertains to the linux versions for matlab. I would have to call in one of our sys-admins to install the 32-bit version & just wanted to check if it can actually be done(before mailing them a request).

Thank you.

Subject: 32-bit Matlab on 64-bit Linux

From: Trent Jarvi

Date: 30 Sep, 2010 14:16:43

Message: 4 of 7


"Gautam " <gautam.iiith2k3@gmail.com> wrote in message
news:i80d0s$pu6$1@fred.mathworks.com...
> Michael,
>
> I already had this from one of the links: 'Mac users do not have the same
> kind of exposure to these concerns and can generally ignore this topic.
> This is because OS X 10.5 and 10.6 do not have any user-visible
> distinction between 32-bit and 64-“bit-ness” in the OS'.
>
> My question pertains to the linux versions for matlab. I would have to
> call in one of our sys-admins to install the 32-bit version & just wanted
> to check if it can actually be done(before mailing them a request).


Hi Gautam,

It can be done.

% matlab -nodisplay -glnx86
Information enclosed between the next two dashed lines is for internal use
only!
-------------------------------------------------------------------
Launching MATLAB_MEM_MGR="" /blah/matlab/bin/glnx86/MATLAB -nodisplay [PID =
11467]
-------------------------------------------------------------------
Listening for transport dt_socket at address: 4444

                            < M A T L A B (R) >
                  Copyright 1984-2010 The MathWorks, Inc.
                Version 7.11.0.584 (R2010b) 32-bit (glnx86)
                              August 16, 2010


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

>> mexext

mexglx

>> !uname -m
x86_64

>>

Subject: 32-bit Matlab on 64-bit Linux

From: Gautam

Date: 30 Sep, 2010 17:38:05

Message: 5 of 7

"Trent Jarvi" <tjarvi@mathworks.com> wrote in message <i8264b$h9d$1@fred.mathworks.com>...
>
>
>
> Hi Gautam,
>
> It can be done.
>
> % matlab -nodisplay -glnx86
> Information enclosed between the next two dashed lines is for internal use
> only!
> -------------------------------------------------------------------
> Launching MATLAB_MEM_MGR="" /blah/matlab/bin/glnx86/MATLAB -nodisplay [PID =
> 11467]
> -------------------------------------------------------------------
> Listening for transport dt_socket at address: 4444
>
> < M A T L A B (R) >
> Copyright 1984-2010 The MathWorks, Inc.
> Version 7.11.0.584 (R2010b) 32-bit (glnx86)
> August 16, 2010
>
>
> To get started, type one of these: helpwin, helpdesk, or demo.
> For product information, visit www.mathworks.com.
>
> >> mexext
>
> mexglx
>
> >> !uname -m
> x86_64
>
> >>
>

When I try that(matlab -glnx86), I got(content between hash marks):
##################################
---------------------------------------------------------------------------
Warning: Cannot locate Java Runtime Environment (JRE) . . .
 
         1. Either a correct JRE was not available for redistribution when
            this release was shipped, in which case you should refer to the
            Release Notes for additional information about how to get it.
 
         2. Or you have tried to use the MATLAB_JAVA environment variable
            to specify an alternate JRE, but MATLAB cannot find it. Please
            run 'matlab -n' to determine what value you are using for
            MATLAB_JAVA and fix accordingly.
---------------------------------------------------------------------------

    matlab: No MATLAB bin directory for this machine architecture.

           ARCH = glnx86
##################################################################
I also tried ---> matlab -glnx86 -nojvm
and I get
##################################
    matlab: No MATLAB bin directory for this machine architecture.

           ARCH = glnx86
##################################

Is that because the 32-bit version was not installed ?

Subject: 32-bit Matlab on 64-bit Linux

From: Trent Jarvi

Date: 30 Sep, 2010 18:49:37

Message: 6 of 7


"Gautam " <gautam.iiith2k3@gmail.com> wrote in message
news:i82htt$h9s$1@fred.mathworks.com...
> "Trent Jarvi" <tjarvi@mathworks.com> wrote in message
> <i8264b$h9d$1@fred.mathworks.com>...
>>
>>
>>
>> Hi Gautam,
>>
>> It can be done.
>>
>> % matlab -nodisplay -glnx86
>> Information enclosed between the next two dashed lines is for internal
>> use only!
>> -------------------------------------------------------------------
>> Launching MATLAB_MEM_MGR="" /blah/matlab/bin/glnx86/MATLAB -nodisplay
>> [PID = 11467]
>> -------------------------------------------------------------------
>> Listening for transport dt_socket at address: 4444
>>
>> < M A T L A B (R) >
>> Copyright 1984-2010 The MathWorks, Inc.
>> Version 7.11.0.584 (R2010b) 32-bit (glnx86)
>> August 16, 2010
>>
>>
>> To get started, type one of these: helpwin, helpdesk, or demo.
>> For product information, visit www.mathworks.com.
>>
>> >> mexext
>>
>> mexglx
>>
>> >> !uname -m
>> x86_64
>>
>> >>
>>
>
> When I try that(matlab -glnx86), I got(content between hash marks):
> ##################################
> ---------------------------------------------------------------------------
> Warning: Cannot locate Java Runtime Environment (JRE) . . .
>
> 1. Either a correct JRE was not available for redistribution when
> this release was shipped, in which case you should refer to the
> Release Notes for additional information about how to get it.
>
> 2. Or you have tried to use the MATLAB_JAVA environment variable
> to specify an alternate JRE, but MATLAB cannot find it. Please
> run 'matlab -n' to determine what value you are using for
> MATLAB_JAVA and fix accordingly.
> ---------------------------------------------------------------------------
>
> matlab: No MATLAB bin directory for this machine architecture.
>
> ARCH = glnx86
> ##################################################################
> I also tried ---> matlab -glnx86 -nojvm
> and I get
> ##################################
> matlab: No MATLAB bin directory for this machine architecture.
>
> ARCH = glnx86
> ##################################
>
> Is that because the 32-bit version was not installed ?

Hi Gautam.

Yes. You need to have the 32 bit version installed. There will be a
<MATLABROOT>/bin/glnx86 directory after installing 32 bit MATLAB. The 32
bit JRE will also be installed under <MATLABROOT>/sys/java/jre/glnx86. If
you look in those directories now, I suspect you will just see the glnxa64
versions.

Subject: 32-bit Matlab on 64-bit Linux

From: Gautam

Date: 6 Oct, 2010 21:01:19

Message: 7 of 7

"Trent Jarvi" <tjarvi@mathworks.com> wrote in message <i82m41$npm$1@fred.mathworks.com>...
>
>
> Hi Gautam.
>
> Yes. You need to have the 32 bit version installed. There will be a
> <MATLABROOT>/bin/glnx86 directory after installing 32 bit MATLAB. The 32
> bit JRE will also be installed under <MATLABROOT>/sys/java/jre/glnx86. If
> you look in those directories now, I suspect you will just see the glnxa64
> versions.
>
>

Thanks for the help Trent.
I finally got the 32 version installed on my 64-bit machine. There are some issues with the gcc compiler(my guess is the paths need to be corrected accordingly) but I think I'll be able to resolve that.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us