Wiki
Clone wikimofem-joseph / moFEM_rdb-srv1
# Using moFEM on rdb-srv1 Server #
##SSH Connection
For a graphical client through SSH connection requires XQuartz on Mac or Xming for Windows
Execute in terminal
- untrusted X11 forwarding
$ ssh -X username@rdb-srv1.eng.gla.ac.uk
where username should be replaced by your username.
- Then enter the password when it is prompted.
#####Definition of untrusted X11 forwarding
The remote machine is treated as an untrusted client. When your local client sends a command to the remote machine and receives the graphical output. If your command violates some security settings you'll receive an error instead.
Compressed SSH connection
$ ssh -X -C username@rdb-srv1.eng.gla.ac.uk
##Setting up moFEM
create directory for moFEM
$ mkdir moFEM
cd in moFEM and execute the follow to obtain moFEM source
$ git clone https://username@bitbucket.org/likask/mofem-joseph.git
where username is your bitbucket username, and bicbucket password might be prompted.
create a build directory for moFEM
$ mkdir ~/build_moFEM
$ cd ~/buid_moFEM
cmake moFEM in build_moFEM
$ cmake -DCMAKE_BUILD_TYPE=Release -DPETSC_DIR=/opt/petsc-3.4.3 -DPETSC_ARCH=arch-linux2-c-opt -DMOAB_DIR=/opt/local-moab-4.6.0/ -DCMAKE_CXX_FLAGS="-I/opt/local_boost_1_54_0/include -L/opt/local_boost_1_54_0/include" -DCMAKE_INSTALL_PREFIX=$HOME/local ../moFEM/mofem-joseph/mofem_v0.1/
compile moFEM
$ make -j 4
where -j 4 is multi-processor compiling, using 4 processors
test compilation using ctest
$ ctest --http1.0 -D Experimental
and results are sent to our CDash Dashboard, where warnings and errors are shown.
for more compilation warnings, run the Continuous test
$ ctest --http1.0 -D Continuous
####Another way of installing moFEM
After running the cmake command in the build directory execute
$ make install
$ cd ~/local/bin
$ ./mofem_build.sh $ ./mofem_update.sh $ ./mofem_fast_check.sh
##Working with moFEM
using git repository, allows you to work on several local branches and having several remote branches on bitbucket web page.
- to see which is the current branch
$ cd ~/moFEM/mofem-joseph/mofem_v0.1
$ git branch
-
create new local branch, named newBranch1
$ git branch newBranch1
-
checkout in this newBranch1
PS: you cannot checkout to another branch if you've got changes in the current one, which you have not committed of stashed!!$ git checkout newBranch1
-
delete local master or other branches
$ git branch -D master
-
to pull a remote branch (ex. CDashTesting) in your current local branch
$ git pull https://username@bitbucket.org/likask/mofem-joseph.git CDashTesting
-
committing all changes of current local branch
$ git commit -a -m "comment about the changes made"
-
push changes to remote branch newBranch1_remote
$ git push https://username@bitbucket.org/likask/mofem-joseph.git newBranch1_remote
-
see status of changes
$ git status
for more git commands visit Atlassian and gitref.org
one also can use git-cola as a gui of git.
Useful Stuff for the Server
###Colouring ssh -X connection
to view files and directories in different colours
execute this once when connected to the server
$ echo "alias ls='ls --color=always'" >> ~/.bashrc $ source ~/.bashrc
- Created by Michael Cortis
- any difficulties or suggestions email cmatgu@googlegroups.com
Updated