← Back to team overview

yade-mpi team mailing list archive

Re: Compile on Froggy cluster

 

Thanks for putting these together Will!

We might consider adding a line that creates an alias for yadedaily:

echo "alias
yadempi-daily='/nix/store/gbdypqd9h84gkda2idd4yfzvwl5gq4w2-yadedaily-mpi/bin/yadempi-daily'"
>> ~/.bashrc
source ~/.bashrc

Can we add this line to the build file somehow?

After following the directions and adding an alias, I am able to run
yadempi-daily. But I cannot run python update-daily.py or the final mpiexec
test. Here are the errors I ran into while following the directions:

[robertcaulk@froggy2 ~]$ nix-env --switch-profile
$NIX_USER_PROFILE_DIR/yade_mpi_profile
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main
thread

[robertcaulk@froggy2 mpi]$ python update-daily.py
Traceback (most recent call last):
  File "update-daily.py", line 14, in <module>
    out = check_output(['nix-prefetch-git'] + [url], stderr=stderr)
  File
"/nix/store/cgh53inblyqz0rprsfxjysmqvm6ylp24-python-2.7.15-env/lib/python2.7/subprocess.py",
line 216, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File
"/nix/store/cgh53inblyqz0rprsfxjysmqvm6ylp24-python-2.7.15-env/lib/python2.7/subprocess.py",
line 394, in __init__
    errread, errwrite)
  File
"/nix/store/cgh53inblyqz0rprsfxjysmqvm6ylp24-python-2.7.15-env/lib/python2.7/subprocess.py",
line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

[robertcaulk@frog4 ~]$ time mpiexec -np 10 yadempi-daily -n -x
testMPI_2D.py 100 100
-bash: mpiexec: command not found

Cheers,

Robert

On Mon, Nov 19, 2018 at 4:46 PM Bruno Chareyre <
bruno.chareyre@xxxxxxxxxxxxxxx> wrote:

> Hi there,
> I wanted to let you know that yade-mpi is now running on froggy cluster
> (Grenoble) based on the NIX package by William (thanks!).
> An alternative method without using NIX has been also found by Deepak. It
> may be more transparent than NIX in terms of compilation, so also good to
> have (Deepak, could you please forward your explanations here?).
>
> Here is a quick walkthrough (one-liner at the end), please try it and let
> us know if you find problems, so we can update it before moving it to
> ciment's wiki.
> Cheers
> Bruno
> ___________
>
> // Connect to froggy*ssh yourlogin@xxxxxxxxxxxxxxxxxxxxxxxx <yourlogin@xxxxxxxxxxxxxxxxxxxxxxxx>**ssh froggy.ujf-grenoble.fr <http://froggy.ujf-grenoble.fr>*
>
> // Activate NIX and create/switch to user profile*source /applis/site/nix.sh  **nix-env --switch-profile $NIX_USER_PROFILE_DIR/yade_mpi_profile*
>
> // set python2.7 environment (copy-paste the 3 lines at once), or jump directly to the one-liner at the end of this message*printf "with import <nixpkgs> {};\npython.buildEnv.override {\n    \**extraLibs = with pkgs.python27Packages;[ pip virtualenv ipython numpy \**scipy matplotlib];\n    ignoreCollisions = true;\n}\n" > python27-env.nix; nix-env -if python27-env.nix
> *
> // checkout yade-nix package and unzip, update sources, compile, install*wget https://github.com/bchareyre/nix-yade/archive/master.zip <https://github.com/bchareyre/nix-yade/archive/master.zip>; unzip master**cd nix-yade-master/mpi**python update-daily.py *   <----- to re-compile after changes upstream start here again*nix-build daily.nix	*  <----- will compile (~10min)*nix-env -if **daily.nix	*  <----- load package, yadempi-daily is now available in path*cd ~*
>
> // go run something in interactive mode*/*/ 1) download test script from github/yade-mpi (part of the sources we just compiled but they are well hidden)*wget https://github.com/bchareyre/yade-mpi/raw/master/examples/mpi/testMPI_2D.py <https://github.com/bchareyre/yade-mpi/raw/master/examples/mpi/testMPI_2D.py> --no-check-certificate*
>
>
> // 2) start interactive job*oarsub -I -l /nodes=1/core=10,walltime=00:30:00 -t devel --project pr-hackathon2018*
>
> // 3) submit in single thread, then multithread, for 90k spheres (100x100x(10-1))*time yadempi-daily -n -x **testMPI_2D.py 100 100 10**Total force on floor= -12300237.8629
> real    2m19.895s
> user    2m18.320s
> **time mpiexec -np 10 yadempi-daily -n -x **testMPI_2D.py 100 100
> master:Total force on floor=-12286573.8994
> real    0m59.425s
> user    9m35.380s
> *
>
>
> One-liner for yade install (copy paste as a whole):
>
> *printf "with import <nixpkgs> {};\npython.buildEnv.override {\n    \**extraLibs = with pkgs.python27Packages;[ pip virtualenv ipython numpy \**scipy matplotlib];\n    ignoreCollisions = true;\n}\n" > python27-env.nix; nix-env -if python27-env.nix
> **wget https://github.com/bchareyre/nix-yade/archive/master.zip <https://github.com/bchareyre/nix-yade/archive/master.zip>; unzip master**cd nix-yade-master/mpi; **python update-daily.py; **nix-build daily.nix; **nix-env -if **daily.nix; **cd ~**wget https://github.com/bchareyre/yade-mpi/raw/master/examples/mpi/testMPI_2D.py <https://github.com/bchareyre/yade-mpi/raw/master/examples/mpi/testMPI_2D.py> --no-check-certificate*
>
>
>
>
>
> --
> _______________
> Bruno Chareyre
> Associate Professor
> ENSE³ - Grenoble INP
> Lab. 3SR
> BP 53
> 38041 Grenoble cedex 9
> Tél : +33 4 56 52 86 21
> Fax : +33 4 76 82 70 43
> ________________
>
> Email too brief?
> Here's why! http://emailcharter.org
>
> --
> Mailing list: https://launchpad.net/~yade-mpi
> Post to     : yade-mpi@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-mpi
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References