Installation on Windows Linux Subsystem: Difference between revisions
(Created page with "Today is 9/11/2018 - These are notes on how to install instructions for flooxs on 64-bit Ubuntu 18.04 Subsystem for Windows. These instructions are intended for linux/unix beginn...") |
No edit summary |
||
Line 2: | Line 2: | ||
= Get Linux Subsystem for Windows - and check out basic concepts page = | = Get Linux Subsystem for Windows - and check out basic concepts page = | ||
First, install the Linux Subsystem for Windows to enable the platform. If you already have Ubuntu installed, skip to step 3. | |||
1. Open the Windows PowerShell as an administrator and run the following command: | |||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |||
2. Navigate to the Windows Store. Search for Ubuntu and install the program | |||
3. | |||
If you've never used Linux / Unix before, you might find the following flooxs installation instructions confusing. I've started a page to explain some [[basic unix concepts]] that held me up as I was learning and trying to install flooxs. | If you've never used Linux / Unix before, you might find the following flooxs installation instructions confusing. I've started a page to explain some [[basic unix concepts]] that held me up as I was learning and trying to install flooxs. | ||
Line 22: | Line 29: | ||
= Get PETSC math package, with BLAS, LAPACK and MPI = | = Get PETSC math package, with BLAS, LAPACK and MPI = | ||
In this section, we will download, configure, and compile three supporting math packages that flooxs uses to solve matrix problems, as well as a compiler that these math packages use. | In this section, we will download, configure, and compile three supporting math packages that flooxs uses to solve matrix problems, as well as a compiler that these math packages use. | ||
= Edit FLOOXS Library Paths in your Arch File = | = Edit FLOOXS Library Paths in your Arch File = | ||
Line 201: | Line 44: | ||
If you get warnings, probably this is okay. Errors will never be okay. In general, you should resolve any errors in the "make depend" before trying to make. When you get an error, scroll up to see what directory you were in, check and see what file the error is in, and what line number it is giving you. Most likely if you get errors you simply did not set your paths correctly in your arch file. | If you get warnings, probably this is okay. Errors will never be okay. In general, you should resolve any errors in the "make depend" before trying to make. When you get an error, scroll up to see what directory you were in, check and see what file the error is in, and what line number it is giving you. Most likely if you get errors you simply did not set your paths correctly in your arch file. | ||
$ cd $FLXSHOME/src | $ cd $FLXSHOME/src | ||
$ make depend ARCH= | $ make depend ARCH=linux | ||
$ make ARCH= | $ make ARCH=linux | ||
= Do a CVS update if you want = | = Do a CVS update if you want = |
Revision as of 14:06, 11 September 2018
Today is 9/11/2018 - These are notes on how to install instructions for flooxs on 64-bit Ubuntu 18.04 Subsystem for Windows. These instructions are intended for linux/unix beginners.
Get Linux Subsystem for Windows - and check out basic concepts page
First, install the Linux Subsystem for Windows to enable the platform. If you already have Ubuntu installed, skip to step 3.
1. Open the Windows PowerShell as an administrator and run the following command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
2. Navigate to the Windows Store. Search for Ubuntu and install the program
3.
If you've never used Linux / Unix before, you might find the following flooxs installation instructions confusing. I've started a page to explain some basic unix concepts that held me up as I was learning and trying to install flooxs.
Get Your Flooxs!
1. Download the software and put it on your hard drive in a directory called flooxs
$ mkdir ~/flooxs - go to [1], download the latest linux executable file (get the one that says linux)
2. Unpack the flooxs file
Double click -> Export
This should make a directory called rel2008. Put it in your new flooxs folder. Inside rel2008 you should have these folders:
$ cd ~/flooxs/rel2008 $ ls arch bin help lib Params src support TclLib Test
To install flooxs, we first must install several supporting programs (such as math or graphing packages) in the support directory. Then, we will go into the src (short for "source") directory and compile flooxs from there.
Get PETSC math package, with BLAS, LAPACK and MPI
In this section, we will download, configure, and compile three supporting math packages that flooxs uses to solve matrix problems, as well as a compiler that these math packages use.
Edit FLOOXS Library Paths in your Arch File
In this section, we will edit a long list of library paths contained in your arch file. These paths tell flooxs where you have installed all the packages from above. First, let's find the file with all these paths:
$ cd $FLXSHOME/arch $ cp linux64 linux64_bk ;# (makes a backup) $ gedit linux64 &
This part is painstakingly annoying. For *each* path in this file, I had to navigate to that directory in an old, working flooxs directory, find what files were there, and then use
$ find . -name "*file*" -print
to see where the new ones were. Most of the time you are looking for .h or .a files, which are headers and library files respectively.
Here is my completed arch file that resulted in a successful compile and future operation of flooxs: linux64. You can see I commented out the old paths with #, and put my new paths underneath.
Compile Flooxs
If you get warnings, probably this is okay. Errors will never be okay. In general, you should resolve any errors in the "make depend" before trying to make. When you get an error, scroll up to see what directory you were in, check and see what file the error is in, and what line number it is giving you. Most likely if you get errors you simply did not set your paths correctly in your arch file.
$ cd $FLXSHOME/src $ make depend ARCH=linux $ make ARCH=linux
Do a CVS update if you want
If you are one of Dr. Law's students and you have a login to our computers, you can do a CVS update to get the latest version of the flooxs code. Don't worry if you cannot do this. The 2008 version works fine.
First, get cvs (concurrent versioning system) for your Ubuntu:
$ sudo apt-get install cvs $ cd $FLXSHOME/src/CVS (contains 3 files) $ ls $ gedit Root
Replace line there with:
:ext:<username>@swamp2.tec.ufl.edu:/home/killebrew0/flooxs/cur/cvsroot
where <username> is YOUR username. You will have to do this in each of the subdirectories too. Each subdirectory has a CVS directory with Root in it. You can use recursive grep to find these directories:
$ cd $FLXSHOME/src $ grep -r swamp2 .
This last command uses the grep program (grep) to recursively search (-r) for the pattern (swamp2) in the directory you are in (.) which because of the previous line is ($FLXSHOME/src). You will have to fix the "Root" file in each of the directories that this command prints out to have your username. You can "man grep" to find other options that will print prettier output, and you can also write your own script that will go in and replace your username automatically. Go ahead and post here if you make a script.
When you're done with that, then you can do the CVS update:
$ cd $FLXSHOME/src $ cvs update -log into swamp2 with your passwd
If you do a cvs update, there may be some conflicts with the new version that the cvs program was not intelligent enough to know how to merge. This is normal. As the intelligent user, you must resolve these conflicts. But how, you ask? Files with conflicts will have conflict markers in them. Conflict markers look like:
<<<<<<< filename your lines ======= other person's lines >>>>>> current version"
In this case, you want the other person's line, as this is Dr. Law's new version, and not your old version. Of course, you can always make a backup first. For example, I used this method to find the conflicts, then fixed them by hand:
$ find $FLXSHOME -name "<<<<<" -print $ cd $FLXSHOME/src $ cp Makefile Makefile_bk $ gedit Makefile & $ cd math $ gedit Makefile & $ gedit blas.h & # conflict here too
some other errors I got and how I resolved them
guess: seems dsp_defs.h is old, and slu_ddefs.h is new better one. Go through the files in the math directory and replace dsp_defs.h with slu_ddefs.h. Hopefully, that will do the trick.
$ cd src/math $ grep -r "dsp_defs.h" . ./Superlu.h:#include "dsp_defs.h" $ gedit Superlu.h &
- replace with #include "slu_ddefs.h" Where should SUPERLUDIR point? "It looks like it should point to the home directory of the install of SuperLU, so in your case it doesn't really work. I think you need to edit the Makefile in the math directory. There is an INCL definition that uses SUPERLUDIR. Change that to -I/usr/include/super..... - whatever your directory location.
- error: -I/home/nicrawfolerd/flooxs/rel2008/support/UMFPACKv5.0/AMD/Include Sles.cc Sles.cc: In member function ‘virtual int SlesMatrix::FinishLoad()’: Sles.cc:55: error: ‘MAT_ROWS_SORTED’ was not declared in this scope Sles.cc: In member function ‘virtual void SlesPrecond::NewMatrix(Matrix&)’: Sles.cc:111: error: ‘PCFactorSetMatOrdering’ was not declared in this scope make[1]: *** [/home/nicrawfolerd/flooxs/rel2008/lib/linux64/math.a(Sles.o)] Error 1 make[1]: Leaving directory `/home/nicrawfolerd/flooxs/rel2008/src/math' make: *** [libs] Error 1
"I'm not sure why, but I also know we don't use sles very often. Comment out the offending lines and let's see if we can get further."
so: line 55:
// ierr = MatSetOption(mat, MAT_ROWS_SORTED); //comment out to help compile?
line 111: has comment below it: // ierr = PCFactorSetMatOrdering(pc, matord); ///// Newer versions of PETSC might work with this - great! I have a newer version of PETSC!! // ierr = PCFactorSetMatOrderingType(pc, matord);
but this didn't work so I commented that last one out too. sles seems to be a problem. check SLESDIR in arch/linux64 file:
- in old slesdir is: nicrawfolerd@bluebox:~/flooxs/rel2008/support/petsc-2.3.2-p7/lib/linux-gnu-c-debug$ ls libpetsc.a libpetscdm.a libpetscmat.a libpetscts.a libpetsccontrib.a libpetscksp.a libpetscsnes.a libpetscvec.a - new slesdir is?: nicrawfolerd@bluebox:~/flooxs/rel2008/support/petsc-3.0.0-p11/linux-gnu-amd64/lib$ ls libfblas.a libmpich.a libpetsc.a libpetscmat.a libprometheus.a libflapack.a libmpichcxx.a libpetsccontrib.a libpetscsnes.a libpromfei.a libfmpich.a libmpichf90.a libpetscdm.a libpetscts.a pkgconfig libmetis.a libparmetis.a libpetscksp.a libpetscvec.a - MPILIB has: -old: nicrawfolerd@bluebox:~/flooxs/rel2008/support/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1/lib$ ls libfmpich.a libmpich.a libmpichcxx.a libmpichf90.a pkglist st2m5gyL -new: nicrawfolerd@bluebox:~/flooxs/rel2008/support/petsc-3.0.0-p11/externalpackages/mpich2-1.0.8/lib$ ls pkglist
These are not the same except for package list. I changed paths for MPILIB and MPIDIR (see arch/linux64 file), but got the same error. Finally, I recompiled petsc without prometheus and metis (edit linux-gnu-amd64.py, etc), and this got rid of the prometheus and metis erros, but still have 2 errors:
/home/nicrawfolerd/flooxs/rel2008/support/petsc-3.0.0-p11/linux-gnu-amd64/lib/libpetscdm.a(ao.o): In function `AOApplicationToPetscIS': ao.c:(.text+0x296): undefined reference to `ISStrideToGeneral' /home/nicrawfolerd/flooxs/rel2008/support/petsc-3.0.0-p11/linux-gnu-amd64/lib/libpetscdm.a(ao.o): In function `AOPetscToApplicationIS': ao.c:(.text+0x467): undefined reference to `ISStrideToGeneral' collect2: ld returned 1 exit status Command exited with non-zero status 1
This seems to be a problem with libpetscdm.a(ao.o). So, I looked in this file (ao.o) and commented out all lines with "ISStrideToGeneral". Flooxs compiled with no errors. However, the graphing was broken... turns out there's some issues with ./bltwish on newer blt versions. I solved this by downgrading my tcl/tk to v8.3, and updated the tcl/tk/blt sections in this wiki to reflect that change on 1/1/2010.