direct-code-execution / ns-3-dce

Run real programs in the discrete time simulator ns3
http://www.nsnam.org/projects/direct-code-execution/
75 stars 46 forks source link

Ns 3.34 alignment #114

Closed tomhenderson closed 3 years ago

tomhenderson commented 3 years ago

This set of changes will align DCE with the upcoming ns-3.34 release; I plan to push in a week if no comments.

teto commented 3 years ago

circleCI doesn't like the

  - store_artifacts:
      path: ~/junit
      path: ~/testpy-output

in .circleci/config.yml it seems.

teto commented 3 years ago

@tomhenderson regarding my previous comment, according to doc I think https://circleci.com/docs/2.0/artifacts/ it should be

  - store_artifacts:
      path: ~/junit
  - store_artifacts:
      path: ~/testpy-output
teto commented 3 years ago

the cp: cannot create regular file '/home/ns3dce/junit/xml2junit.xsl': No space left on device is kinda concerning. Not sure if that's a LGTM error but if that is we may need to checkout if another provider such as Github action could improve it.

ParthPratim commented 3 years ago

the cp: cannot create regular file '/home/ns3dce/junit/xml2junit.xsl': No space left on device is kinda concerning. Not sure if that's a LGTM error but if that is we may need to checkout if another provider such as Github action could improve it.

Maybe this could be a possible lead : https://support.circleci.com/hc/en-us/articles/360007406013-How-can-I-remove-my-cached-docker-layers-

We could recursively run docker system prune -a -f on feature branches so that all the volumes storing docker caches, could be cleared.

I'm not sure if it's an allowed operation to execute docker rm commands after every build, so that we can avoid running into such issues in future too.

Sample commands :

docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
ParthPratim commented 3 years ago

This seems a bit strange to me, as I pushed a few commits to my branch but couldn't reproduce this issue. If someone has admin access, could re-run Tom Sir's last build with SSH access (there's this option in the dropdown menu Re-Run but it shows disabled for me) to check the memory usage, and if there are any pre-existing docker containers and images which haven't been cleared up.

I also tried to execute some dangling docker cleanup commands but all of them seem to be running inside the docker container and thus fail.

teto commented 3 years ago

There is a command to allocate a 5Gb cache to ccache so maybe that could be scaled down too. One could add a dh -h to see how much space is allocated to the build at different steps. But the most important right now is that the dce/ns-3 build doesn't complete :(

tomhenderson commented 3 years ago

I am not able to get circleci tests to pass because I cannot find a way to disable ns-3-dce-umip. I have commented it out in the config.yml in this branch, but yet it still is downloaded and built.

I plan to push this PR by Monday and we can separately update ns-3-dce-umip. Tests pass locally for me based on this branch.

ParthPratim commented 3 years ago

I am not able to get circleci tests to pass because I cannot find a way to disable ns-3-dce-umip. I have commented it out in the config.yml in this branch, but yet it still is downloaded and built.

It's probably because we are using github.com/nsnam/bake-git repo instead of the one we're currently using at the gitlab instance.

        if [ -z "${BAKE_BRANCH}" ] ; then export BAKE_BRANCH="master" ; fi
        if [ -z "${BAKE_MOD_VERSION}" ] ; then export BAKE_MOD_VERSION="dev" ; fi

        # we clone a fork of bake
        cd "$HOME" && git clone -b ${BAKE_BRANCH} https://gitlab.com/nsnam/bake.git ./bake

        # setup environment
        OS=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
        if [[ $OS = "\"Ubuntu\"" ]] ; then 
          sudo apt-get update; sudo apt-get install -y python-pip python3-pip ;
        elif [[ $OS = "Fedora" ]] ; then
          sudo yum -y update ; sudo yum install -y python-pip python3-pip;
        fi

        sudo pip install distro requests; sudo pip3 install distro requests                    
        cd "$HOME" && ./bake/bake.py configure -e dce-linux-${BAKE_MOD_VERSION}
        cd "$HOME" && ./bake/bake.py download -vvv

Replacing it with the code above, should avoid umip from building.

I tried the above, and it did avoid downloading and building umip : circleci-run : downloading bake and codes

tomhenderson commented 3 years ago

I am not able to get circleci tests to pass because I cannot find a way to disable ns-3-dce-umip. I have commented it out in the config.yml in this branch, but yet it still is downloaded and built.

It's probably because we are using github.com/nsnam/bake-git repo instead of the one we're currently using at the gitlab instance.

Prior to my final attempt, I had aligned the github bake-git master with gitlab.com/nsnam/bake.git master, and I also made the same deletion of dce-umip-dev, but it still failed by building a umip example.

tomhenderson commented 3 years ago

Prior to my final attempt, I had aligned the github bake-git master with gitlab.com/nsnam/bake.git master, and I also made the same deletion of dce-umip-dev, but it still failed by building a umip example.

umip examples need to be updated but that is beyond the scope of this patch.