Skip to content

Commit

Permalink
Merge pull request #71 from scs-lab/70-create-local-development-envio…
Browse files Browse the repository at this point in the history
…rnments-with-docker

70 create local development enviornments with docker
  • Loading branch information
JaimeCernuda authored May 30, 2023
2 parents f24d2f3 + f55ce0e commit 7cb63d9
Show file tree
Hide file tree
Showing 79 changed files with 3,125 additions and 1,097 deletions.
33 changes: 33 additions & 0 deletions CI/docker/chornolog.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Use scs-lab/base:1.0 as base image
FROM spack/ubuntu-jammy:latest as coeus-builder
ENV DOCKER_TAG=0.2

# What we want to install and how we want to install it
# is specified in a manifest file (spack.yaml)
RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - [email protected]" \
&& echo " - [email protected]~fortran +verbs +argobots ^[email protected] fabrics=mlx,rxd,rxm,shm,sockets,tcp,udp,verbs" \
&& echo " - [email protected] ^[email protected] fabrics=mlx,rxd,rxm,shm,sockets,tcp,udp,verbs" \
&& echo " - [email protected] ^[email protected] fabrics=mlx,rxd,rxm,shm,sockets,tcp,udp,verbs" \
&& echo " - [email protected]~boostsys ^[email protected] fabrics=mlx,rxd,rxm,shm,sockets,tcp,udp,verbs" \
&& echo " - [email protected]" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml

# Install the software, remove unnecessary deps
RUN cd /opt/spack-environment && spack env activate . && spack install --fail-fast && spack gc -y

FROM ubuntu:22.04
ENV DEBIAN_FRONTEND="noninteractive"

RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y pkg-config cmake build-essential environment-modules gfortran git python3 gdb

COPY --from=coeus-builder /opt/spack-environment /opt/spack-environment
COPY --from=coeus-builder /opt/software /opt/software
COPY --from=coeus-builder /opt/view /usr
15 changes: 15 additions & 0 deletions CI/docker/chronolog-ssh.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM scslab/chronolog:0.1
ENV DEBIAN_FRONTEND="noninteractive"

RUN apt-get install -y openssh-server sudo

RUN passwd -d root

RUN mkdir /var/run/sshd
RUN sed -i'' -e's/^#PermitRootLogin prohibit-password$/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& sed -i'' -e's/^#PasswordAuthentication yes$/PasswordAuthentication yes/' /etc/ssh/sshd_config \
&& sed -i'' -e's/^#PermitEmptyPasswords no$/PermitEmptyPasswords yes/' /etc/ssh/sshd_config \
&& sed -i'' -e's/^UsePAM yes/UsePAM no/' /etc/ssh/sshd_config

EXPOSE 22
CMD ["/usr/bin/sudo", "/usr/sbin/sshd", "-D"]
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ option(CHRONOLOG_ENABLE_DOXYGEN "Enable Doxygen documentation generation." OFF)
# add_compile_options(-Wextra)
#endif()

#set(CMAKE_BUILD_TYPE "Debug")
# Change some compilation flags depending on the build type
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Compiling ChronoLog in Debug Mode")
Expand Down Expand Up @@ -133,7 +134,7 @@ endif()
#-----------------------------------------------------------------------------
# Dependencies common to all subdirectories
#-----------------------------------------------------------------------------
find_package(MPI REQUIRED COMPONENTS CXX)
#find_package(MPI REQUIRED COMPONENTS CXX)
find_package(Boost REQUIRED)
find_package(Thallium REQUIRED)
#find_library(ROCKSDB_LIB rocksdb)
Expand Down Expand Up @@ -201,18 +202,22 @@ if(CHRONOLOG_BUILD_TESTING)
endif()

# External header only libraries
add_subdirectory(external_libs)
#add_subdirectory(external_libs)

add_subdirectory(tools)
#add_subdirectory(tools)

# ChronoLog client library
add_subdirectory(Client)

# ChronoVisor
add_subdirectory(ChronoAPI)
#add_subdirectory(ChronoAPI)

# ChronoVisor
add_subdirectory(ChronoVisor)

# ChronoLog client library
add_subdirectory(Client)
# ChronoKeeper
add_subdirectory(ChronoKeeper)


# custom
add_custom_target(make_all cd ${CMAKE_BINARY_DIR} && make)
Expand Down
12 changes: 0 additions & 12 deletions ChronoAPI/ChronoLog/include/ChronoLog.h

This file was deleted.

8 changes: 7 additions & 1 deletion ChronoAPI/ChronoLog/include/ClocksourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
#include <ctime>
#include <typeinfo>
#include <unistd.h>
#include <emmintrin.h>
//#include <emmintrin.h>
#include <enum.h>
#include <log.h>

#ifdef TSC_ENABLED
#include <emmintrin.h>
#define lfence() _mm_lfence()
#define mfence() _mm_mfence()
#endif

class Clocksource {
public:
Expand All @@ -38,6 +41,7 @@ class ClocksourceCStyle : public Clocksource {
}
};

#ifdef TSC_ENABLED
class ClocksourceTSC : public Clocksource {
public:
uint64_t getTimestamp() override {
Expand All @@ -47,6 +51,8 @@ class ClocksourceTSC : public Clocksource {
return t;
}
};
#endif

class ClocksourceCPPStyle : public Clocksource {
public:
uint64_t getTimestamp() override {
Expand Down
Loading

0 comments on commit 7cb63d9

Please sign in to comment.