[AMPL 2093] How to invoke NPSOL with AMPL?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 2093] How to invoke NPSOL with AMPL?

greatzwz

Hi, all:
Thank you for your attention. I have a question about how to invoke
NPSOL with AMPL.

I have installed NPSOL 5.0 in Ubuntu. It is working by example "./run
nlmain  ~/Linux-i686/optimized/examples/".

Therefore, I want to invoke NPSOL with AMPL. The following steps have
been done:
 1. downloaded netlibfiles.tar from netlib.bell-labs.com/netlib/ampl,
I extracted to this file to the directory "solvers", then extracted
all ".gz" files.
 2. in "solvers" directory, I used "make -f makefile.u" to compile,
the "amplsolver.a" is successfully created.
 3. go to the subdirectory "npsol" of "solvers", try to "make -f
makefile.u" for this subdirectory.  But it failed, the output message
is
    "make: *** No rule to make target `npsol.a', needed by `npsol'.
Stop."

  The question is where to find "npsol.a". Is it from my installed
NPSOL 5.0 or other places?
  If the subdirectory also can be compiled sucessfully? Do I just need
change my solver in AMPL by "option solver npsol" if I specify the
npsol executable path in the system path variables?

   Thank you so much for your time and help.
 
Weizhong Zhang

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

[AMPL 2094] Re: How to invoke NPSOL with AMPL?

Hans Mittelmann

In the npsol dir it should have made a libopt.a. use that as npsol.a
in the
solvers/npsol directory.


On Nov 24, 6:45 pm, [hidden email] wrote:

> Hi, all:
> Thank you for your attention. I have a question about how to invoke
> NPSOL with AMPL.
>
> I have installed NPSOL 5.0 in Ubuntu. It is working by example "./run
> nlmain  ~/Linux-i686/optimized/examples/".
>
> Therefore, I want to invoke NPSOL with AMPL. The following steps have
> been done:
>  1. downloaded netlibfiles.tar from netlib.bell-labs.com/netlib/ampl,
> I extracted to this file to the directory "solvers", then extracted
> all ".gz" files.
>  2. in "solvers" directory, I used "make -f makefile.u" to compile,
> the "amplsolver.a" is successfully created.
>  3. go to the subdirectory "npsol" of "solvers", try to "make -f
> makefile.u" for this subdirectory.  But it failed, the output message
> is
>     "make: *** No rule to make target `npsol.a', needed by `npsol'.
> Stop."
>
>   The question is where to find "npsol.a". Is it from my installed
> NPSOL 5.0 or other places?
>   If the subdirectory also can be compiled sucessfully? Do I just need
> change my solver in AMPL by "option solver npsol" if I specify the
> npsol executable path in the system path variables?
>
>    Thank you so much for your time and help.
>
> Weizhong Zhang
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

[AMPL 2098] Re: How to invoke NPSOL with AMPL?

greatzwz

Hans:
Thank you for your time.
 But I can only find "libnpsol_c.a" in /Linux-i686/optimized/lib/
after installing npsol .
Should this be renamed as "npsol.a"?

What I did to  hook NPSOL 5.0 by npsol (AMPL interface) to AMPL
1. in solvers/npsol directory,  make -f makefile.u   to create
amplsover.a
2. copy NPSOL 5.0 source file (npUnix/src) to solvers/npsol/src
3. go to solvers/npsol   make -f makefile.u
    Many errors  such as
     "npsol.c:107: error: ‘Edaginfo’ has no member named ‘nlc_’"....

Is "libnposl_c.a" the correct file as npsol.a? If not, it seems I
cannot find either lipopt.a or npsol.a.
Is the procedure to hook NPSOL 5.0 with AMPL by npsol (AMPL interface)
correct?

Thank you so much for your help.
                                                       Weizhong

On 25 Nov, 09:52, Hans Mittelmann <[hidden email]> wrote:

> In the npsol dir it should have made a libopt.a. use that as npsol.a
> in the
> solvers/npsol directory.
>
> On Nov 24, 6:45 pm, [hidden email] wrote:
>
> > Hi, all:
> > Thank you for your attention. I have a question about how to invoke
> > NPSOL with AMPL.
>
> > I have installed NPSOL 5.0 in Ubuntu. It is working by example "./run
> > nlmain  ~/Linux-i686/optimized/examples/".
>
> > Therefore, I want to invoke NPSOL with AMPL. The following steps have
> > been done:
> >  1. downloaded netlibfiles.tar from netlib.bell-labs.com/netlib/ampl,
> > I extracted to this file to the directory "solvers", then extracted
> > all ".gz" files.
> >  2. in "solvers" directory, I used "make -f makefile.u" to compile,
> > the "amplsolver.a" is successfully created.
> >  3. go to the subdirectory "npsol" of "solvers", try to "make -f
> > makefile.u" for this subdirectory.  But it failed, the output message
> > is
> >     "make: *** No rule to make target `npsol.a', needed by `npsol'.
> > Stop."
>
> >   The question is where to find "npsol.a". Is it from my installed
> > NPSOL 5.0 or other places?
> >   If the subdirectory also can be compiled sucessfully? Do I just need
> > change my solver in AMPL by "option solver npsol" if I specify the
> > npsol executable path in the system path variables?
>
> >    Thank you so much for your time and help.
>
> >WeizhongZhang
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

[AMPL 2096] Re: How to invoke NPSOL with AMPL?

greatzwz
In reply to this post by Hans Mittelmann

Hans:
Thank you so much.

I can only find libnpsol_c.a under the Linux-i686/optimized/lib/.
Should I use libnpsol_c.a as npsol.a?

After that, in directory solvers/npsol,   type " make -f makefile.u"
The output message is showing a lot of errors in npsol.c
"npsol.c:270: error: ‘Edaginfo’ has no member named ‘n_obj_’"

                  Weizhong




npsol.c:267: error: ‘Edaginfo’ has no member named ‘n_obj_’

On Nov 25, 9:52 am, Hans Mittelmann <[hidden email]> wrote:

> In the npsol dir it should have made a libopt.a. use that as npsol.a
> in the
> solvers/npsol directory.
>
> On Nov 24, 6:45 pm, [hidden email] wrote:
>
> > Hi, all:
> > Thank you for your attention. I have a question about how to invoke
> > NPSOL with AMPL.
>
> > I have installed NPSOL 5.0 in Ubuntu. It is working by example "./run
> > nlmain  ~/Linux-i686/optimized/examples/".
>
> > Therefore, I want to invoke NPSOL with AMPL. The following steps have
> > been done:
> >  1. downloaded netlibfiles.tar from netlib.bell-labs.com/netlib/ampl,
> > I extracted to this file to the directory "solvers", then extracted
> > all ".gz" files.
> >  2. in "solvers" directory, I used "make -f makefile.u" to compile,
> > the "amplsolver.a" is successfully created.
> >  3. go to the subdirectory "npsol" of "solvers", try to "make -f
> > makefile.u" for this subdirectory.  But it failed, the output message
> > is
> >     "make: *** No rule to make target `npsol.a', needed by `npsol'.
> > Stop."
>
> >   The question is where to find "npsol.a". Is it from my installed
> > NPSOL 5.0 or other places?
> >   If the subdirectory also can be compiled sucessfully? Do I just need
> > change my solver in AMPL by "option solver npsol" if I specify the
> > npsol executable path in the system path variables?
>
> >    Thank you so much for your time and help.
>
> > Weizhong Zhang
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

[AMPL 2099] Re: How to invoke NPSOL with AMPL?

Hans Mittelmann
In reply to this post by greatzwz

I have the Fortran source so names are different. It seems ampl/
solvers/nposl works with the f77 source. I suggest you ask David Gay
<[hidden email]> if you can make with C source and how.
HM

On Nov 25, 1:37 pm, [hidden email] wrote:

> Hans:
> Thank you for your time.
>  But I can only find "libnpsol_c.a" in /Linux-i686/optimized/lib/
> after installing npsol .
> Should this be renamed as "npsol.a"?
>
> What I did to  hook NPSOL 5.0 by npsol (AMPL interface) to AMPL
> 1. in solvers/npsol directory,  make -f makefile.u   to create
> amplsover.a
> 2. copy NPSOL 5.0 source file (npUnix/src) to solvers/npsol/src
> 3. go to solvers/npsol   make -f makefile.u
>     Many errors  such as
>      "npsol.c:107: error: ‘Edaginfo’ has no member named ‘nlc_’"....
>
> Is "libnposl_c.a" the correct file as npsol.a? If not, it seems I
> cannot find either lipopt.a or npsol.a.
> Is the procedure to hook NPSOL 5.0 with AMPL by npsol (AMPL interface)
> correct?
>
> Thank you so much for your help.
>                                                        Weizhong
>
> On 25 Nov, 09:52, Hans Mittelmann <[hidden email]> wrote:
>
> > In the npsol dir it should have made a libopt.a. use that as npsol.a
> > in the
> > solvers/npsol directory.
>
> > On Nov 24, 6:45 pm, [hidden email] wrote:
>
> > > Hi, all:
> > > Thank you for your attention. I have a question about how to invoke
> > > NPSOL with AMPL.
>
> > > I have installed NPSOL 5.0 in Ubuntu. It is working by example "./run
> > > nlmain  ~/Linux-i686/optimized/examples/".
>
> > > Therefore, I want to invoke NPSOL with AMPL. The following steps have
> > > been done:
> > >  1. downloaded netlibfiles.tar from netlib.bell-labs.com/netlib/ampl,
> > > I extracted to this file to the directory "solvers", then extracted
> > > all ".gz" files.
> > >  2. in "solvers" directory, I used "make -f makefile.u" to compile,
> > > the "amplsolver.a" is successfully created.
> > >  3. go to the subdirectory "npsol" of "solvers", try to "make -f
> > > makefile.u" for this subdirectory.  But it failed, the output message
> > > is
> > >     "make: *** No rule to make target `npsol.a', needed by `npsol'.
> > > Stop."
>
> > >   The question is where to find "npsol.a". Is it from my installed
> > > NPSOL 5.0 or other places?
> > >   If the subdirectory also can be compiled sucessfully? Do I just need
> > > change my solver in AMPL by "option solver npsol" if I specify the
> > > npsol executable path in the system path variables?
>
> > >    Thank you so much for your time and help.
>
> > >WeizhongZhang
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---