Initializing Feel++

The core module provides the basic data structures to

  • setup and run Feel++ application in a parallel environment.

  • handle the command line options

  • download and upload data from and to Github and/or Girder

1. Setting up the Feel++ Environment

Start the Feel++ environment, test_core.py
import pyfeelpp.core as core
import sys

e=core.Environment(sys.argv)

print("pid:",e.worldComm().localRank() )
print("isMasterRank:",e.isMasterRank() )

To execute the previous example

Execute the script above on 4 parallel processes
mpiexec -n 4 python3 test_core.py

Command line options can be passed to the python script

get the version of pyfeelpp and Feel++
mpiexec -n 4 python3 test_core.py --version

2. Downloading data

import pyfeelpp.core as core
import sys
e=core.Environment(sys.argv)
rd = core.RemoteData("github:{repo:feelpp,path:README.adoc}", worldComm=e.worldCommPtr())
if rd.canDownload():
    d=e.downloadsRepository()
    print("download data in ", d);
    data=rd.download( d )
    print("downloaded data:",data)

To execute the previous example

Execute the script above on 4 parallel processes
mpiexec -n 4 python3 test_remotedata.py

and get the file README.adoc from the toplevel Feel++ github directory downloaded

Download remote file on {github} repository
Welcome to PyFeel++
version: 0.106.0-beta.2
[ Starting Feel++ ] application test_remotedata.py version 0.1 date 2018-Sep-18
 . test_remotedata.py files are stored in /feel/test_remotedata.py/np_1
 .. logfiles :/feel/test_remotedata.py/np_1/logs
download data in  /feel/test_remotedata.py/downloads
downloaded data: ['/feel/test_remotedata.py/downloads/README.adoc']
[env] Time : 1.39421s
[ Stopping Feel++ ] application test_remotedata.py execution time 1.39421s