ralna / CUTEst

The Constrained and Unconstrained Testing Environment with safe threads (CUTEst) for optimization software
Other
83 stars 18 forks source link

Issue in installing CUTEst and its MATLAB interface #8

Closed mviola13 closed 5 years ago

mviola13 commented 5 years ago

Dear Prof. Gould,

I was trying to install CUTEst in order to test some unconstrained minimization algorithms in MATLAB on the cutest problems. I am working on a linux (lubuntu 18.10) 64-bit virtual machine with Matlab R2018b and the gcc-6, gfortran-6, g++-6 compilers set as default. I have issues in installing cutest and its interface with MATLAB.

By following the instructions i move to $CUTEST and enter "$ARCHDEFS/install_optrove". The script wants to run "./bin/install_optrove", but since the current directory is "./cutest" it cannot find the file. I then decided to run directly "$ARCHDEFS/bin/install_optrove" and apparently both sifdecode and cutest were compiled in the right way. Since I was using gcc-6.5 and not gcc-6.3 I got the following message

Compiling mcutest Building with 'gcc'. Warning: You are using gcc version '6.5.0'. The version of gcc is not supported. The version currently supported with MEX is '6.3.x'. For a list of currently supported compilers see: https://www.mathworks.com/support/compilers/current_release. MEX completed successfully. [ OK ] CUTEst: matlab (double precision version) compiled successfully

I guess that, despite the different compiler version, everything went in the right way. (gcc-6.3 is not available through standard repositories... in order to get it I should compile it from the source. I tried, but my attempt to do so was not successfull.)

What happens is that if I try to run "cutest2matlab" in order to decode a problem and use it on MATLAB, I get the following output:

pc64.lnx.gfo [...] File successfully decoded

ERROR: Cannot find a matlab definitions file in /home/mviola/Documents/CutestExecutables/cutest/packages/pc64.lnx.gfo/double or /home/mviola/Documents/CutestExecutables/cutest/packages/defaults

Is there a way I can fix this issue?

Best regards, Marco

nimgould commented 5 years ago

Dear Marco

  1. I don't believe that there is an instruction ./bin/install_optrove in the file $ARCHDEFS/install_optrove . Are you sure you have set $ARCHDEFS ?
  2. The compiler supported by Mathworks at any release is often well behind those officially supported by Linux distributions. There is little mex users can do except to complain to Mathworks. As you say, it seems that the installation worked ok.
  3. cutest2matlab will check for $CUTEST/packages/defaults/matlab The message you get suggests that you have not defined $CUTEST. See point 1 in the installation README for CUTEST ...

    Now set the three environment variables $ARCHDEFS, $SIFDECODE and $CUTEST to point at the directories ./archdefs, ./sifdecode and ./cutest

I hope this helps

Nick

mviola13 commented 5 years ago

Dear Prof. Gould,

thanks a lot for your quick reply to my issue.

I already have set all the enviroment variables correctly. My $ARCHDEFS points to the folder I downloaded from ralna/ARCHDefs and, as you can see, the only content of $ARCHDEFS/install_optrove is

./bin/install_optrove

From the terminal I have no problem in opening "$CUTEST/packages/defaults/matlab". I really don't know which could be the issue.

Any idea?

Regards, Marco

nimgould commented 5 years ago

Dear Marco

I wonder if the first issue isn't simply a misunderstanding in English - "enter the command" means execute it, i.e., type $ARCHDEFS/install_optrove and press the enter key. As I said, the command itself does not mention bin/install_optrove.

The CUTEst script cutest2matlab calls ${CUTEST}/bin/runcutest and it is this that tests to see if /home/mviola/Documents/CutestExecutables/cutest/packages/defaults/matlab exists, via the expanded variable ${CUTEST}/packages/defaults/${PKG} I suggest you edit runcutest and insert the line echo "cutest variable = ${CUTEST}" to see what your version of bash is doing.

Good luck

Nick

mviola13 commented 5 years ago

Dear Prof. Gould,

Regarding the first issue, I think I didn't express myself correctly. Actually "$ARCHDEFS/install_optrove" is a link to "$ARCHDEFS/bin/install_optrove". The file was apparently corrupted and the link to the correct script was not recognized by the system. However, as I said, I solved this issue running the correct script contained in "$ARCHDEFS/bin/". I really don't know what was causing the issue with cutest2matlab. After having tried a few more times, I decided to do the only thing possible: I deleted the three folders and I downloaded again all the codes from GitHub, keeping the environment variables as they were (they were set correctly).

The only explanation I can give is that some of the files were corrupted.

I apologize for wasting your time.

Best regards, Marco