[sage-support] Re: Solve equation efficiently

2019-07-29 Thread Kwankyu


On Thursday, July 25, 2019 at 12:08:20 AM UTC+9, chandra chowdhury wrote:
>
> I have matrices B and C of size (m,n) over integer with m>n. 
> I know there is matrix A of size (m,m) such that 
> AB=C. How to find A efficiently in Sage?
>

I guess there is no special way in Sage to solve your kind of problem. Just 
solve for each row of A. 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/021a81f6-9ba9-4066-bf30-9dd0796f97e7%40googlegroups.com.


[sage-support] Re: Help/Pointers on using docker with travis-ci

2019-07-29 Thread Nathan Dunfield
Simon,

You can start a container and open a shell on it via:

docker run -it image_name /bin/bash

The container will keep running until you exit the shell, if not longer.  
You can open a shell on any running container via

docker exec -it container_name /bin/bash

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/fb382921-6576-4789-be16-6012f9dfeea2%40googlegroups.com.


[sage-support] Help/Pointers on using docker with travis-ci

2019-07-29 Thread Simon King
Hi!

Last week at Sage Days 100 I learned how to put the code for my group
cohomology spkg on github and got an introduction on using travis-ci.
However, it seems that I need more help/pointers, in particular on docker.

The things that I want travis-ci to do are:
- Install dependencies of my code into a docker container. I guess that
  goes to the "before_install" section of my .travis.yml file. So, it
  should be pulling the latest sagemath-dev docker image, creating a
  container and sending the commands "sage -i meataxe" and "sage -b" to
  the container.
- Install the package itself. I guess that goes to the "install"
  section. It involves opening a sage shell, installing some C library
  with configure/make/make install, and install some Python/cython code
  with "pip install .".
- Run some tests; I guess that goes to the "script" section.

My problems:
How to keep a docker container running? Currently, after executing a
command, the docker container simply exits. It was suggested to me at
the workshop to put all commands used to install and test my software
into a single shell script and execute that (which means to send only
a single command to the docker container), but it doesn't seem clean
to me (better separate before_install, install and script).

I tried to create and start a container and send commands using "docker
container exec". It did work sometimes, i.e., after some commands the
container stays up and running, but, e.g., it happened that after
"docker container exec  sage -i meataxe" the container exited.

What is the recommendet way to proceed?

PS: I just tried some things again, getting a different error:
  docker container create --name bla sagemath/sagemath-dev:latest 
  docker container start bla
  docker container exec bla ls
  docker container exec bla sage -i meataxe
results in an error in the last command, namely

make build/make/Makefile --stop
make[1]: Entering directory '/home/sage/sage'
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for root user... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for ar... yes
checking for m4... yes
checking for pkg-config... no
checking for ranlib... yes
checking for strip... yes
checking for GNU or BSD tar... /bin/tar
checking for GNU make... /usr/bin/make
checking for latex... no
configure: You do not have 'latex', which is recommended, but not
configure: required. Latex is only really used for building pdf
configure: documents and for %latex mode in the Sage notebook.
checking for perl... /usr/bin/perl
checking for Perl version 5.8.0 or later... yes
checking for gcc... gcc
sed: can't read conftest.err: No such file or directory
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... configure: error: in `/home/sage/sage':
configure: error: cannot compute suffix of executables: cannot compile and link
See `config.log' for more details
If you would like to try to build Sage anyway (to help porting),
export the variable 'SAGE_PORT' to something non-empty.
make[1]: *** [build/make/Makefile] Error 1
Makefile:39: recipe for target 'build/make/Makefile' failed
make[1]: Leaving directory '/home/sage/sage'
Makefile:31: recipe for target 'all-toolchain' failed
make: *** [all-toolchain] Error 2

Why is that? "sage -i meataxe" did work before (at least with
  "cocker container run ...")

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/qhmm3s%2444lt%241%40blaine.gmane.org.