I downloaded Arango's Matlab packet, and tried to make my own grid file.
The MEX is also needed when using SeaGrid. As told by the instruction, I typed 'make_seagrid_mex' in matlab prompt, and errors came out like
Code: Select all
>> make_seagrid_mex
Warning: You are using gcc version "4.4.6". The earliest gcc version supported
with mex is "4.1". The latest version tested for use with mex is "4.2".
To download a different version of gcc, visit http://gcc.gnu.org
wait for the figure to finish plotting, then hit any key to continue
----------------------------------------------------------------
-> options file specified on command line:
FILE = ./mexrectopts.sh
----------------------------------------------------------------
-> MATLAB = /gpfs/fs1/tools/matlab2009
-> CC =
-> CC flags:
CFLAGS =
CDEBUGFLAGS =
COPTIMFLAGS =
CLIBS =
arguments = -DMX_COMPAT_32
-> CXX =
-> CXX flags:
CXXFLAGS =
CXXDEBUGFLAGS =
CXXOPTIMFLAGS =
CXXLIBS =
arguments = -DMX_COMPAT_32
-> FC =
-> 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 =
----------------------------------------------------------------
-> -c -I/gpfs/fs1/tools/matlab2009/extern/include -I/gpfs/fs1/tools/matlab2009/simulink/include -DMX_COMPAT_32 "mexrect.F"
/gpfs/fs1/tools/matlab2009/bin/mex: line 997: -c: command not found
mex: compile of ' "mexrect.F"' failed.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 8
mex -f ./mexrectopts.sh -v mexrect.F
Then I edit the mexrectopts.sh file by modifying the final part of it.
Namely, I set FC to gfortran since the machine I use doesnot have f77.
Code: Select all
#############################################################################
#
# 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="gfortran"
FFLAGS="-g -fno-second-underscore $FFLAGS"
# FOPTIMFLAGS="$FOPTIMFLAGS"
# FDEBUGFLAGS="$FDEBUGFLAGS"
# FLIBS="$FLIBS"
#
Code: Select all
>> make_seagrid_mex
Warning: You are using gcc version "4.4.6". The earliest gcc version supported
with mex is "4.1". The latest version tested for use with mex is "4.2".
To download a different version of gcc, visit http://gcc.gnu.org
wait for the figure to finish plotting, then hit any key to continue
----------------------------------------------------------------
-> options file specified on command line:
FILE = ./mexrectopts.sh
----------------------------------------------------------------
-> MATLAB = /gpfs/fs1/tools/matlab2009
-> CC =
-> CC flags:
CFLAGS =
CDEBUGFLAGS =
COPTIMFLAGS =
CLIBS =
arguments = -DMX_COMPAT_32
-> CXX =
-> CXX flags:
CXXFLAGS =
CXXDEBUGFLAGS =
CXXOPTIMFLAGS =
CXXLIBS =
arguments = -DMX_COMPAT_32
-> FC = gfortran
-> FC flags:
FFLAGS = -g -fno-second-underscore -g -fno-second-underscore
FDEBUGFLAGS =
FOPTIMFLAGS =
FLIBS =
arguments = -DMX_COMPAT_32
-> LD =
-> Link flags:
LDFLAGS =
LDDEBUGFLAGS =
LDOPTIMFLAGS =
LDEXTENSION =
arguments =
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =
----------------------------------------------------------------
-> gfortran -c -I/gpfs/fs1/tools/matlab2009/extern/include -I/gpfs/fs1/tools/matlab2009/simulink/include -g -fno-second-underscore -g -fno-second-underscore -DMX_COMPAT_32 "mexrect.F"
-> -o "mexrect" mexrect.o
/gpfs/fs1/tools/matlab2009/bin/mex: line 1056: -o: command not found
mex: link of ' "mexrect"' failed.
??? Error using ==> mex at 221
Unable to complete successfully.
Error in ==> make_seagrid_mex at 8
mex -f ./mexrectopts.sh -v mexrect.F
Moreover it is a x86_64 but not 32.
can anyone give me some ideas?
zhao