I am trying to install SeaGrid on a new LINUX 64-bit machine. I have Matlab 2007b running. The SeaGrid download does not include a LINUX 64-bit mex directory.
If I want to compile my own mex files for this, what code should I use?
I tried using the mex_matlab72_linux32 directory (in hopes that it might work), and but it didn't :
## Unable to locate Mex-files. Please install
## "mexrect", "mexsepeli", and "mexinside",
## then adjust your Matlab path accordingly.
And I tried recompiling the code in the the linux32 directory, but it gives assembly language errors:
...
/tmp/ccb6lHuF.s: Assembler messages:
/tmp/ccb6lHuF.s:46: Error: suffix or operands invalid for `push'
/tmp/ccb6lHuF.s:50: Error: suffix or operands invalid for `push'
...
which I guess are related to the differences in the code for 64-bit machines and 32-bit machines. But I don't have any other code to work from, do I?
So, has anyone come across this problem? And how did you solve it.
Does anyone have SeaGrid mex files for a 64-bit linux machine to share or the code?
Thanks,
Susan
SeaGrid mex files for 64-bit Linux machine
-
- Posts: 34
- Joined: Tue Oct 28, 2008 3:19 pm
- Location: IT Power
Re: SeaGrid mex files for 64-bit Linux machine
Hi Howard,
I'm struggling with the similar problem right now.
Have you managed to sort this out ?
Cheers
I'm struggling with the similar problem right now.
Have you managed to sort this out ?
Cheers
Re: SeaGrid mex files for 64-bit Linux machine
we are using matlab 7.9.0.529 (R2009b) 64-bit (glnxa64).
The problem is now to get seagrid to work..
Here is the error I get:
>> mex -setup
Options files control which compiler to use, the compiler and link command
options, and the runtime libraries to link against.
Using the 'mex -setup' command selects an options file that is
placed in ~/.matlab/R2009b and used by default for 'mex'. An options
file in the current working directory or specified on the command line
overrides the default options file in ~/.matlab/R2009b.
To override the default options file, use the 'mex -f' command
(see 'mex -help' for more information).
The options files available for mex are:
1: /usr/local/MatLab/bin/gccopts.sh :
Template Options file for building gcc MEX-files
2: /usr/local/MatLab/bin/mexopts.sh :
Template Options file for building MEX-files via the system ANSI compiler
0: Exit with no changes
Enter the number of the compiler (0-2):
222^H^H^H^H^H^[
Please enter from 0-2
Enter the number of the compiler (0-2):
2
Overwrite /home/perezro/.matlab/R2009b/mexopts.sh ([y]/n)?
y
/usr/local/MatLab/bin/mexopts.sh is being copied to
/home/perezro/.matlab/R2009b/mexopts.sh
**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/support/soluti ... n=1-5C27B9
Building with the -largeArrayDims option enables the new API.
**************************************************************************
>>
>> make_seagrid_mex
Error: An invalid options file name was specified:
./mexopts.sh
is not a normal file or does not exist.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 4
mex -f ./mexopts.sh -v mexinside.c
>> make_seagrid_mex
Error: An invalid options file name was specified:
./mexopts.sh
is not a normal file or does not exist.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 4
mex -f ./mexopts.sh -v mexinside.c
Error: An invalid options file name was specified:
./home/perezro/seagrid/mex_matlab75_linux32/mexopts.sh
is not a normal file or does not exist.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 4
mex -f ./home/perezro/seagrid/mex_matlab75_linux32/mexopts.sh -v mexinside.c
Any idea about how to get it rigth!?
Thanks: R
The problem is now to get seagrid to work..
Here is the error I get:
>> mex -setup
Options files control which compiler to use, the compiler and link command
options, and the runtime libraries to link against.
Using the 'mex -setup' command selects an options file that is
placed in ~/.matlab/R2009b and used by default for 'mex'. An options
file in the current working directory or specified on the command line
overrides the default options file in ~/.matlab/R2009b.
To override the default options file, use the 'mex -f' command
(see 'mex -help' for more information).
The options files available for mex are:
1: /usr/local/MatLab/bin/gccopts.sh :
Template Options file for building gcc MEX-files
2: /usr/local/MatLab/bin/mexopts.sh :
Template Options file for building MEX-files via the system ANSI compiler
0: Exit with no changes
Enter the number of the compiler (0-2):
222^H^H^H^H^H^[
Please enter from 0-2
Enter the number of the compiler (0-2):
2
Overwrite /home/perezro/.matlab/R2009b/mexopts.sh ([y]/n)?
y
/usr/local/MatLab/bin/mexopts.sh is being copied to
/home/perezro/.matlab/R2009b/mexopts.sh
**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/support/soluti ... n=1-5C27B9
Building with the -largeArrayDims option enables the new API.
**************************************************************************
>>
>> make_seagrid_mex
Error: An invalid options file name was specified:
./mexopts.sh
is not a normal file or does not exist.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 4
mex -f ./mexopts.sh -v mexinside.c
>> make_seagrid_mex
Error: An invalid options file name was specified:
./mexopts.sh
is not a normal file or does not exist.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 4
mex -f ./mexopts.sh -v mexinside.c
Error: An invalid options file name was specified:
./home/perezro/seagrid/mex_matlab75_linux32/mexopts.sh
is not a normal file or does not exist.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 4
mex -f ./home/perezro/seagrid/mex_matlab75_linux32/mexopts.sh -v mexinside.c
Any idea about how to get it rigth!?
Thanks: R
Re: SeaGrid mex files for 64-bit Linux machine
Dear all,
I got new mex files for Seagrid 64bits. Tested for various environments, but I'm still not able to make them work in my computer. I copy the unpacked file in my machine and modify the path and try to load Seagrid but it did not work correctly... then I ask a colleague to help with "make" and after one day of going around we could not solve it..
If someone know what should I do, could please tell me..
Thank You: R
>> makefile
./mexopts.R2009b.sh: line 298: unexpected EOF while looking for matching `''
./mexopts.R2009b.sh: line 342: syntax error: unexpected end of file
./mexopts.R2009b.sh: line 298: unexpected EOF while looking for matching `''
./mexopts.R2009b.sh: line 342: syntax error: unexpected end of file
----------------------------------------------------------------
-> options file specified on command line:
FILE = ./mexopts.R2009b.sh
----------------------------------------------------------------
-> MATLAB = /APPLICATIONS/MatLab
-> CC = mpicc
-> CC flags:
CFLAGS =
CDEBUGFLAGS =
COPTIMFLAGS =
CLIBS =
arguments = -DMX_COMPAT_32
-> CXX = mpicxx
-> CXX flags:
CXXFLAGS =
CXXDEBUGFLAGS =
CXXOPTIMFLAGS =
CXXLIBS =
arguments = -DMX_COMPAT_32
-> FC = mpif90
-> FC flags:
FFLAGS =
FDEBUGFLAGS =
FOPTIMFLAGS =
FLIBS =
arguments = -DMX_COMPAT_32
-> LD =
-> Link flags:
LDFLAGS =
LDDEBUGFLAGS =
LDOPTIMFLAGS =
LDEXTENSION =
arguments =
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =
----------------------------------------------------------------
-> mpicxx -c -I/APPLICATIONS/MatLab/extern/include -DMATLAB_MEX_FILE -DMX_COMPAT_32 "zachrect.cpp"
-> mpif90 -c -I/APPLICATIONS/MatLab/extern/include -DMX_COMPAT_32 "rect.F"
-> -o "zachrect" zachrect.o rect.o
/APPLICATIONS/MatLab/bin/mex: line 1056: -o: command not found
mex: link of ' "zachrect"' failed.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> makefile at 2
mex -g -f ./mexopts.R2009b.sh -v zachrect.cpp rect.F
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
In order to compile these mex-files, you will need a fortran compiler.
Most of the testing I've done was with g95, although gfortran seems
to work as well. In order to compile on, say, R2009b, you will
need to look at the bottom of the mexopts.R2009b.sh options file
and see if there is a stanza for your architecture and fortran
compiler. If you don't find an exact match, take a look at other
options files.
In any case, you need to make sure values are provided for FC, LD,
FCLIBDIR, and FLIBS, although LD should pretty much always be "g++".
FC is the location of your fortran compiler, and FCLIBDIR is the
location of fortran libraries, which will be different depending
of whether you use g95 or gfortran, and what platform you are on.
For example, on the R2007b maci platform with g95 provided by fink,
the library is /sw/lib/libg95 (yes, thats "libg95", not "libf95"),
while on R2009b maci64 with g95 provided by macports, the library
is /opt/local/lib/libf95. The compile step is as simple as typing
"make R2009b"
Tested configurations include:
glnxa64 (g95): R2007b, R2008b, R2009a, R2009b
.....
......
...........
#############################################################################
#
# Architecture independent lines:
#
# Set and uncomment any lines which will apply to all architectures.
#
#----------------------------------------------------------------------------
# CC="$CC"
# CFLAGS="$CFLAGS"
# COPTIMFLAGS="$COPTIMFLAGS"
# CDEBUGFLAGS="$CDEBUGFLAGS"
# CLIBS="$CLIBS"
#
# FC="$FC"
# FFLAGS="$FFLAGS"
# FOPTIMFLAGS="$FOPTIMFLAGS"
# FDEBUGFLAGS="$FDEBUGFLAGS"
# FLIBS="$FLIBS"
#
# glnxa64
# FC="g95"
# LD="g++"
# # This must point to the location of libf95
# FCLIBDIR="/mathworks/hub/share/apps/BuildTools/Linux/glibc-2.3.4/x86_64/g95/g95-0.50-tmw-000/lib/gcc-lib/x86_64-unknown-linux-gnu/4.0.3"
# FLIBS="-L$FCLIBDIR -lf95 $FLIBS "
#
# maci64 (g95 via macports)
FC="g"
LD="g++"
# # This must point to the location of libf95
FCLIBDIR="/opt/local/lib"
#FLIBS="$MLIBS -L$FCLIBDIR -lf95 $FLIBS "
FLIBS="$MLIBS -L$FCLIBDIR -lf95 "
#
#
# LDFLAGS="$LDFLAGS"
# LDOPTIMFLAGS="$LDOPTIMFLAGS"
# LDDEBUGFLAGS="$LDDEBUGFLAGS"
#----------------------------------------------------------------------------
#############################################################################
I got new mex files for Seagrid 64bits. Tested for various environments, but I'm still not able to make them work in my computer. I copy the unpacked file in my machine and modify the path and try to load Seagrid but it did not work correctly... then I ask a colleague to help with "make" and after one day of going around we could not solve it..
If someone know what should I do, could please tell me..
Thank You: R
>> makefile
./mexopts.R2009b.sh: line 298: unexpected EOF while looking for matching `''
./mexopts.R2009b.sh: line 342: syntax error: unexpected end of file
./mexopts.R2009b.sh: line 298: unexpected EOF while looking for matching `''
./mexopts.R2009b.sh: line 342: syntax error: unexpected end of file
----------------------------------------------------------------
-> options file specified on command line:
FILE = ./mexopts.R2009b.sh
----------------------------------------------------------------
-> MATLAB = /APPLICATIONS/MatLab
-> CC = mpicc
-> CC flags:
CFLAGS =
CDEBUGFLAGS =
COPTIMFLAGS =
CLIBS =
arguments = -DMX_COMPAT_32
-> CXX = mpicxx
-> CXX flags:
CXXFLAGS =
CXXDEBUGFLAGS =
CXXOPTIMFLAGS =
CXXLIBS =
arguments = -DMX_COMPAT_32
-> FC = mpif90
-> FC flags:
FFLAGS =
FDEBUGFLAGS =
FOPTIMFLAGS =
FLIBS =
arguments = -DMX_COMPAT_32
-> LD =
-> Link flags:
LDFLAGS =
LDDEBUGFLAGS =
LDOPTIMFLAGS =
LDEXTENSION =
arguments =
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =
----------------------------------------------------------------
-> mpicxx -c -I/APPLICATIONS/MatLab/extern/include -DMATLAB_MEX_FILE -DMX_COMPAT_32 "zachrect.cpp"
-> mpif90 -c -I/APPLICATIONS/MatLab/extern/include -DMX_COMPAT_32 "rect.F"
-> -o "zachrect" zachrect.o rect.o
/APPLICATIONS/MatLab/bin/mex: line 1056: -o: command not found
mex: link of ' "zachrect"' failed.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> makefile at 2
mex -g -f ./mexopts.R2009b.sh -v zachrect.cpp rect.F
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
In order to compile these mex-files, you will need a fortran compiler.
Most of the testing I've done was with g95, although gfortran seems
to work as well. In order to compile on, say, R2009b, you will
need to look at the bottom of the mexopts.R2009b.sh options file
and see if there is a stanza for your architecture and fortran
compiler. If you don't find an exact match, take a look at other
options files.
In any case, you need to make sure values are provided for FC, LD,
FCLIBDIR, and FLIBS, although LD should pretty much always be "g++".
FC is the location of your fortran compiler, and FCLIBDIR is the
location of fortran libraries, which will be different depending
of whether you use g95 or gfortran, and what platform you are on.
For example, on the R2007b maci platform with g95 provided by fink,
the library is /sw/lib/libg95 (yes, thats "libg95", not "libf95"),
while on R2009b maci64 with g95 provided by macports, the library
is /opt/local/lib/libf95. The compile step is as simple as typing
"make R2009b"
Tested configurations include:
glnxa64 (g95): R2007b, R2008b, R2009a, R2009b
.....
......
...........
#############################################################################
#
# Architecture independent lines:
#
# Set and uncomment any lines which will apply to all architectures.
#
#----------------------------------------------------------------------------
# CC="$CC"
# CFLAGS="$CFLAGS"
# COPTIMFLAGS="$COPTIMFLAGS"
# CDEBUGFLAGS="$CDEBUGFLAGS"
# CLIBS="$CLIBS"
#
# FC="$FC"
# FFLAGS="$FFLAGS"
# FOPTIMFLAGS="$FOPTIMFLAGS"
# FDEBUGFLAGS="$FDEBUGFLAGS"
# FLIBS="$FLIBS"
#
# glnxa64
# FC="g95"
# LD="g++"
# # This must point to the location of libf95
# FCLIBDIR="/mathworks/hub/share/apps/BuildTools/Linux/glibc-2.3.4/x86_64/g95/g95-0.50-tmw-000/lib/gcc-lib/x86_64-unknown-linux-gnu/4.0.3"
# FLIBS="-L$FCLIBDIR -lf95 $FLIBS "
#
# maci64 (g95 via macports)
FC="g"
LD="g++"
# # This must point to the location of libf95
FCLIBDIR="/opt/local/lib"
#FLIBS="$MLIBS -L$FCLIBDIR -lf95 $FLIBS "
FLIBS="$MLIBS -L$FCLIBDIR -lf95 "
#
#
# LDFLAGS="$LDFLAGS"
# LDOPTIMFLAGS="$LDOPTIMFLAGS"
# LDDEBUGFLAGS="$LDDEBUGFLAGS"
#----------------------------------------------------------------------------
#############################################################################
- Attachments
-
- seagrid_mex_64bit_new.zip
- (70.25 KiB) Downloaded 405 times